sagemath/sage

Move all code from src/setup.py, src/fpickle_setup.py to sage_setup

Closed this issue · 53 comments

This is preparation for splitting sagelib into separate distutils packages, but a useful cleanup in any case.

As a follow-up of this ticket, as part of Meta-ticket #29705, the remaining very short src/setup.py should probably be moved to build/pkgs/sagelib/src/ (alongside a symlink src -> SAGE_ROOT/src)

Depends on #29411

CC: @kiwifb @vbraun @isuruf @dimpase @jhpalmieri @fchapoton @orlitzky

Component: refactoring

Keywords: sd109

Author: Matthias Koeppe

Branch: a56dc35

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29702

Dependencies: #29411

Description changed:

--- 
+++ 
@@ -1,2 +1,3 @@
 This is preparation for splitting sagelib into separate distutils packages.
 
+When done, the remaining very short `setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink src -> SAGE_ROOT/src)

Branch pushed to git repo; I updated commit sha1. New commits:

681d46esrc/setup.py: Move class sage_install to new module sage_setup.command.sage_install
423ad52src/module_list.py: Move library_order to new module sage_setup.library_order

Branch pushed to git repo; I updated commit sha1. New commits:

758aa13src/setup.py: Move classes sage_build_* to new modules sage_setup.command.sage_*

Changed commit from 423ad52 to 758aa13

Branch pushed to git repo; I updated commit sha1. New commits:

9e6e021src/setup.py: Move excepthook to new module sage_setup.excepthook

Changed commit from 758aa13 to 9e6e021

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
 This is preparation for splitting sagelib into separate distutils packages.
 
-When done, the remaining very short `setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink src -> SAGE_ROOT/src)
+As a follow-up of this ticket, the remaining very short `setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink src -> SAGE_ROOT/src)
+
+

Author: Matthias Koeppe

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-This is preparation for splitting sagelib into separate distutils packages.
+This is preparation for splitting sagelib into separate distutils packages, but a useful cleanup in any case.
 
 As a follow-up of this ticket, the remaining very short `setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink src -> SAGE_ROOT/src)
 

Branch pushed to git repo; I updated commit sha1. New commits:

24800f5sage.graphs.graph_decompositions: Make it a namespace package by removing __init__.py (which had unnecessary reimports only)
f29d703Mark src/sage/ext_data as directories that are not namespace packages
bceab3asage_setup.find.find_python_sources: Handle native namespace packages and 'nonamespace' files

Changed commit from 9e6e021 to bceab3a

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

Changed commit from bceab3a to 9e6e021

comment:14

(that was pushed to wrong ticket; fixed)

comment:15

Ready for review

Changed commit from 9e6e021 to 09e3297

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

62f2841Merge branch 't/29697/src_setup_py__src_sage_env_py__sage_include_directories___do_not_add_another_copy_of_sage_inc__sage_local_lib_to_include_dirs__library_dirs' into t/29411/make_sagelib_a_script_package
048ce5bbuild/pkgs/sagelib/spkg-install: Also poison environment variables SAGE_LOCAL etc.
4590c4cbuild/pkgs/sagelib/spkg-install: Add comment regarding SAGE_SPKG_INST
ed312c5build/pkgs/sagelib/spkg-install: Also poison SAGE_PKGCONFIG, SAGE_SPKG_SCRIPTS
6ee66ddsrc/setup.py: Update comment (not specific to gcc)
0a7fb48Move src/fpickle_setup.py to srs/sage_setup/
f4a9269src/setup.py: Move class sage_install to new module sage_setup.command.sage_install
5660d8fsrc/module_list.py: Move library_order to new module sage_setup.library_order
43d4f83src/setup.py: Move classes sage_build_* to new modules sage_setup.command.sage_*
09e3297src/setup.py: Move excepthook to new module sage_setup.excepthook
comment:17

Redone on top of new version of #29411

Changed keywords from none to sd109

Changed commit from 09e3297 to b3102e9

Branch pushed to git repo; I updated commit sha1. New commits:

1cfed7cbuild/pkgs/sagelib/spkg-install: Do not poison SAGE_LOCAL, used in script installed by spkg pkgconf
62c7531Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
b3102e9Merge tag '9.2.beta0' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
comment:20

Merged newer version of #29411 and latest beta

Changed commit from b3102e9 to 2b42029

Branch pushed to git repo; I updated commit sha1. New commits:

2b42029src/sage_setup/command/__init__.py: New

Branch pushed to git repo; I updated commit sha1. New commits:

a830304src/sage_setup/command/sage_build_cython.py: Fix adding setup.py as dependency

Changed commit from 2b42029 to a830304

Changed commit from a830304 to 00a1d57

Branch pushed to git repo; I updated commit sha1. New commits:

38b6bcfMerge tag '9.2.beta0' into t/29411/make_sagelib_a_script_package
f9a30f6build/pkgs/sagelib/spkg-install: Fix up error exits
00a1d57Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

Description changed:

--- 
+++ 
@@ -1,5 +1,5 @@
 This is preparation for splitting sagelib into separate distutils packages, but a useful cleanup in any case.
 
-As a follow-up of this ticket, the remaining very short `setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink src -> SAGE_ROOT/src)
+As a follow-up of this ticket, as part of Meta-ticket #29705, the remaining very short `src/setup.py` should probably be moved to `build/pkgs/sagelib/src/` (alongside a symlink `src` -> `SAGE_ROOT/src`)
 
 

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

d0dff56Trac #29345: replace a few uses of "source" with "."
5ac420bTrac #29345: fix some bashisms in sage-env's resolvelinks() function.
0a61795Trac #29345: don't force SHELL=bash any longer.
5db5318Trac #29345: remove "break" statements from AC_SEARCH_LIBS.
e810ad1Trac #29345: don't use sage's config.status for the lrcalc build.
93c9921Trac #29345: replace the function that populates the CVXOPT_* variables.
0e66a0aTrac #29345: add Dima's SPKG patches for ksh compatibility.
df3f05ebuild/make/Makefile.in [SCRIPT_PACKAGE_templ]: cd into the SPKG directory; adjust spkg-install scripts
5372065Merge branch 't/29793/script_packages_should_cd_into_the_spkg_directory' into t/29411/make_sagelib_a_script_package
c166b97Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup

Changed commit from 00a1d57 to c166b97

Changed commit from c166b97 to 8a41326

Branch pushed to git repo; I updated commit sha1. New commits:

cc30471build/bin/write-dockerfile.sh: Do not ADD removed file src/Makefile.in
8a41326Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
comment:28

please rebase this over 9.2.beta1

comment:29

rebased over rebased #29411


Last 10 new commits:

b212ce8build/pkgs/sagelib/spkg-install: Fix up error exits
5790687build/bin/write-dockerfile.sh: Do not ADD removed file src/Makefile.in
851ab76Make sagelib a script package
f39a017Move src/fpickle_setup.py to srs/sage_setup/
363f792src/setup.py: Move class sage_install to new module sage_setup.command.sage_install
a7cde9csrc/module_list.py: Move library_order to new module sage_setup.library_order
7c4bbf6src/setup.py: Move classes sage_build_* to new modules sage_setup.command.sage_*
ddc49aasrc/setup.py: Move excepthook to new module sage_setup.excepthook
9cff0c6src/sage_setup/command/__init__.py: New
56705f8src/sage_setup/command/sage_build_cython.py: Fix adding setup.py as dependency

Changed commit from 8a41326 to 56705f8

comment:30

Argh! I have a million tickets depending on this

Reviewer: Dima Pasechnik

comment:31

well, I don't quite know how to deal with it. The rebased branch works for me. Should we revert all these rebases, and just hope that the merges will work?

comment:32

Yes, please restore to the unrebased ones. I know that the merges work, I am already testing on them

comment:33

It's also fine with me if you merge in the current develop, but rebasing is too disruptive.

Changed commit from 56705f8 to a56dc35

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. Last 10 new commits:

5db5318Trac #29345: remove "break" statements from AC_SEARCH_LIBS.
e810ad1Trac #29345: don't use sage's config.status for the lrcalc build.
93c9921Trac #29345: replace the function that populates the CVXOPT_* variables.
0e66a0aTrac #29345: add Dima's SPKG patches for ksh compatibility.
df3f05ebuild/make/Makefile.in [SCRIPT_PACKAGE_templ]: cd into the SPKG directory; adjust spkg-install scripts
5372065Merge branch 't/29793/script_packages_should_cd_into_the_spkg_directory' into t/29411/make_sagelib_a_script_package
c166b97Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
cc30471build/bin/write-dockerfile.sh: Do not ADD removed file src/Makefile.in
8a41326Merge branch 't/29411/make_sagelib_a_script_package' into t/29702/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
a56dc35Merge tag '9.2.beta1' into t/29702/public/move_all_code_from_src_setup_py__src_fpickle_setup_py_to_sage_setup
comment:35

Replying to @mkoeppe:

It's also fine with me if you merge in the current develop

Did that, needs review

comment:36

lgtm

comment:37

Thank you!

comment:39

Thank you, the setup.py looks sooo much cleaner now.

Changed commit from a56dc35 to none