Opened 4 years ago

Last modified 15 hours ago

#21508 new task

Meta-ticket: Clean up src/setup.py to bring it to standard setuptools behavior

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.3
Component: build Keywords:
Cc: jdemeyer, vbraun, embray, leif, fbissey, was, mmezzarobba, dimpase, jhpalmieri Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

Sub-tasks:

  • #21480: Make sagelib setup.py self-contained and independent of SAGE_ROOT
  • #21613: Make setup.py not depend on make
  • #21604: Cleaning up stale installed files in setup()
    • See also #21654: Disentangle cleaning of stale installed files in build directory and in install directory
  • #21600: Use custom build_ext to compile Cython code

In particular,

  • src/setup.py --help should return immediately.
  • src/setup.py clean should not build anything but just clean (and everything that is now done by make clean in the src directory should be done by it; see #29411)

Also the following should be done:

  • #29702: Move all code from src/setup.py, src/fpickle_setup.py to sage_setup
  • #21516: Fix sagelib sdist (src/setup.py sdist)
  • #21535: Make src/setup.py respect --build-base and --inplace, independent of SAGE_CYTHONIZED
  • #21573: Make sure src/setup.py respects --install-base and --root
  • #21678 Testsuite for src/setup.py
  • #30580 sage_setup: Remove import-time dependency (setup_requires) on pkgconfig, numpy

Also see:

  • #20108: Use package_data instead of data_files in setup.py
  • #21682: Add a separate "cythonize" command to setup.py
  • #12659: build the sage library in place
  • #13190: make sage use setuptools instead of distutils
  • #29701: Meta-ticket: Replace use of OptionalExtension? by namespace packages

Change History (34)

comment:1 Changed 4 years ago by jdemeyer

  • Dependencies set to #20596

comment:2 Changed 4 years ago by jdemeyer

  • Type changed from defect to task

comment:3 Changed 4 years ago by mkoeppe

  • Description modified (diff)

comment:4 Changed 4 years ago by mkoeppe

  • Summary changed from Clean up src/setup.py to Clean up src/setup.py, fix 'setup.py sdist'

comment:5 Changed 4 years ago by mkoeppe

  • Cc leif fbissey added
  • Description modified (diff)

comment:6 Changed 4 years ago by mkoeppe

  • Description modified (diff)
  • Summary changed from Clean up src/setup.py, fix 'setup.py sdist' to Clean up src/setup.py to bring it to standard distutils behavior

comment:7 Changed 4 years ago by mkoeppe

  • Cc was mmezzarobba added
  • Description modified (diff)

comment:8 Changed 4 years ago by embray

and everything that is now done by make clean should be done by it

By which you mean the makefile in src/ right?

comment:9 Changed 4 years ago by mkoeppe

  • Description modified (diff)

Yes -- I've clarified it in the description.

comment:10 Changed 4 years ago by jdemeyer

  • Dependencies changed from #20596 to #21600
  • Description modified (diff)

comment:11 Changed 4 years ago by jdemeyer

  • Dependencies changed from #21600 to #21604, #21600

comment:12 Changed 4 years ago by jdemeyer

  • Dependencies changed from #21604, #21600 to #21480, #21604, #21600
  • Description modified (diff)

comment:13 Changed 4 years ago by embray

Definitely keep in touch with me as a point of contact on any work you do on this--I know distutils + setuptools from top to bottom.

comment:14 Changed 4 years ago by embray

  • Description modified (diff)

comment:15 Changed 4 years ago by mkoeppe

Let me just say that I consider #21613 not an important step towards this task ("... standard distutils behavior"). The present task ticket (#21508) is concerned with getting the behavior of setup.py standard (how does it respond to standard commands and options), not necessarily its implementation. The fact that setup.py with #21480 invokes make is an implementation detail, which is not very relevant for the goal of #21507.

comment:16 follow-up: Changed 4 years ago by embray

Except it is pretty non-standard for it to have non-trivial side-effects (e.g. running a subprocess that generates files) unconditionally. Behavior-wise that should only happen when it's actually important for that to happen, such as during the build command.

comment:17 in reply to: ↑ 16 Changed 4 years ago by mkoeppe

Replying to embray:

Except it is pretty non-standard for it to have non-trivial side-effects (e.g. running a subprocess that generates files) unconditionally. Behavior-wise that should only happen when it's actually important for that to happen, such as during the build command.

I agree that it should happen during the build command.

comment:18 follow-up: Changed 4 years ago by embray

I will work on #21613, and you'll see it's not that big a deal.

comment:19 in reply to: ↑ 18 Changed 4 years ago by jdemeyer

Replying to embray:

I will work on #21613, and you'll see it's not that big a deal.

Beware of conflicts with other tickets, in particular #21600 and its dependencies.

comment:20 Changed 4 years ago by embray

Yep. I don't think there will be significant conflicts, but I can make those tickets dependencies of #21613 and ensure any work I do there integrates well with the others before suggesting it to be merged.

comment:21 Changed 4 years ago by mkoeppe

  • Description modified (diff)

comment:22 Changed 4 years ago by mkoeppe

  • Description modified (diff)

comment:23 Changed 4 years ago by embray

  • Description modified (diff)

comment:24 Changed 4 years ago by mkoeppe

  • Description modified (diff)

comment:25 Changed 4 years ago by mkoeppe

  • Description modified (diff)

comment:26 Changed 6 months ago by mkoeppe

  • Cc dimpase jhpalmieri added
  • Milestone changed from sage-7.5 to sage-9.2
  • Summary changed from Clean up src/setup.py to bring it to standard distutils behavior to Meta-ticket: Clean up src/setup.py to bring it to standard distutils behavior

comment:27 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:28 Changed 5 months ago by dimpase

  • Description modified (diff)

comment:29 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:30 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:31 Changed 5 months ago by mkoeppe

  • Dependencies #21480, #21604, #21600 deleted

comment:32 Changed 5 months ago by mkoeppe

  • Description modified (diff)
  • Summary changed from Meta-ticket: Clean up src/setup.py to bring it to standard distutils behavior to Meta-ticket: Clean up src/setup.py to bring it to standard setuptools behavior

comment:33 Changed 6 weeks ago by mkoeppe

  • Description modified (diff)

comment:34 Changed 15 hours ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3
Note: See TracTickets for help on using tickets.