Opened 4 years ago

Last modified 5 weeks ago

#21508 new task

Clean up src/setup.py to bring it to standard distutils behavior — at Version 21

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: #21480, #21604, #21600 Stopgaps:

Description (last modified by mkoeppe)

All building (including cythonizing) should done within the call to setup, not before it.

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()
  • #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)

Also see:

  • #20108: Use package_data instead of data_files in setup.py
  • #21516 - Fix sagelib sdist (src/setup.py sdist)

Change History (21)

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)
Note: See TracTickets for help on using tickets.