sagemath/sage

Install sage_setup with setuptools as a prerequisite for building/installing sagelib

Closed this issue · 130 comments

sage_setup will be used by the build system of various distribution packages (#29705).

So we make it a regular distribution package itself, with sources in pkgs/sage-setup/ (#31577) and install it with pip.

The actual Python source files are not moved because sage_setup takes part in Sage doctesting (see #31577).

sagelib's setup.py will no longer install sage_setup.

sage-setup will become a build-system requires of sagemath-standard (declared in pyproject.toml)

Follow-up:

  • #29924: Do not fail if sage.env, sage.* are not available

References:

python - pip ignores dependency_links in setup.py - Stack Overflow
https://stackoverflow.com/questions/12518499/pip-ignores-dependency-links-in-setup-py

dependency_links flag ignored when package exists on PyPI · Issue #987 · pypa/setuptools
pypa/setuptools#987

Suggest alternatives for --process-dependency-links · Issue #6162 · pypa/pip
pypa/pip#6162

PEP 508 -- Dependency specification for Python Software Packages | Python.org
https://www.python.org/dev/peps/pep-0508/#pep440

PEP 440 -- Version Identification and Dependency Specification | Python.org
https://www.python.org/dev/peps/pep-0440/#local-version-segments

Depends on #32046

CC: @kiwifb @jhpalmieri @dimpase

Component: build

Keywords: sd111

Author: Matthias Koeppe

Branch/Commit: f84730e

Reviewer: Dima Pasechnik

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

Description changed:

--- 
+++ 
@@ -2,4 +2,5 @@
 
 So we make it a regular distutils package itself and install it with pip.
 
+We remove the dependencies on `sage.*` that are still in `sage_setup`. 
 

Dependencies: #29702

Description changed:

--- 
+++ 
@@ -4,3 +4,16 @@
 
 We remove the dependencies on `sage.*` that are still in `sage_setup`. 
 
+```
+./docbuild/ ........
+./optional_extension.py:22:from sage.misc.package import list_packages
+./optional_extension.py:44:    from sage.misc.package import is_package_installed
+./fpickle_setup.py:11:# into sage.misc.fpickle, and then here. It was needed due to
+./fpickle_setup.py:12:# chicken vs egg issue, as we cannot use sage.misc.fpickle in
+./library_order.py:77:from sage.env import cython_aliases
+./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
+./command/sage_install.py:28:        from sage.repl.ipython_kernel.install import SageKernelSpec
+./autogen/interpreters/__main__.py:4:from sage.env import SAGE_SRC
+```
+
+

Description changed:

--- 
+++ 
@@ -8,8 +8,6 @@
 ./docbuild/ ........
 ./optional_extension.py:22:from sage.misc.package import list_packages
 ./optional_extension.py:44:    from sage.misc.package import is_package_installed
-./fpickle_setup.py:11:# into sage.misc.fpickle, and then here. It was needed due to
-./fpickle_setup.py:12:# chicken vs egg issue, as we cannot use sage.misc.fpickle in
 ./library_order.py:77:from sage.env import cython_aliases
 ./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
 ./command/sage_install.py:28:        from sage.repl.ipython_kernel.install import SageKernelSpec

Description changed:

--- 
+++ 
@@ -14,4 +14,6 @@
 ./autogen/interpreters/__main__.py:4:from sage.env import SAGE_SRC
 ```
 
+To be determined:
+- When and by what distribution should `sage.env` be installed?
 

Description changed:

--- 
+++ 
@@ -2,16 +2,25 @@
 
 So we make it a regular distutils package itself and install it with pip.
 
-We remove the dependencies on `sage.*` that are still in `sage_setup`. 
+We remove some dependencies on `sage.*` that are still in `sage_setup`. 
+
+```
+./library_order.py:77:from sage.env import cython_aliases
+./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
+```
+
+Harmless dependencies on `sage.*`:
 
 ```
 ./docbuild/ ........
+  (will be invoked later, when sage.* is installed)
 ./optional_extension.py:22:from sage.misc.package import list_packages
 ./optional_extension.py:44:    from sage.misc.package import is_package_installed
-./library_order.py:77:from sage.env import cython_aliases
-./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
+  (no longer used, only kept around in case user packages use it)
+./autogen/interpreters/__main__.py:4:from sage.env import SAGE_SRC
+  (only used when invoked interactively)
 ./command/sage_install.py:28:        from sage.repl.ipython_kernel.install import SageKernelSpec
-./autogen/interpreters/__main__.py:4:from sage.env import SAGE_SRC
+  (just need to make sure that `sage_setup.command.sage_install` is only used by the distribution that installs `sage.repl.ipython_kernel`)
 ```
 
 To be determined:

Changed dependencies from #29702 to #29702, #29706, #29785

Description changed:

--- 
+++ 
@@ -2,12 +2,13 @@
 
 So we make it a regular distutils package itself and install it with pip.
 
-We remove some dependencies on `sage.*` that are still in `sage_setup`. 
+We remove some dependencies on `sage.*` that are still in `sage_setup`: 
 
 ```
 ./library_order.py:77:from sage.env import cython_aliases
 ./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
 ```
+... by moving functions these functions to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 
 Harmless dependencies on `sage.*`:
 

Description changed:

--- 
+++ 
@@ -9,6 +9,8 @@
 ./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
 ```
 ... by moving functions these functions to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
+
+... and remove the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (as noted in #29711).
 
 Harmless dependencies on `sage.*`:
 

Description changed:

--- 
+++ 
@@ -26,6 +26,4 @@
   (just need to make sure that `sage_setup.command.sage_install` is only used by the distribution that installs `sage.repl.ipython_kernel`)
 ```
 
-To be determined:
-- When and by what distribution should `sage.env` be installed?
 

Description changed:

--- 
+++ 
@@ -8,7 +8,7 @@
 ./library_order.py:77:from sage.env import cython_aliases
 ./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
 ```
-... by moving functions these functions to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
+... by moving the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 
 ... and remove the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (as noted in #29711).
 

Changed dependencies from #29702, #29706, #29785 to #29702, #29706, #29785, #29855

Commit: 4ce81bf

Last 10 new commits:

eed920esrc/sage/tests: Move Extension options from src/module_list.py to distutils directives
0d25d1dsrc/sage/structure: Move Extension options from src/module_list.py to distutils directives
808f46asrc/sage/stats: Move Extension options from src/module_list.py to distutils directives
10f7542src/sage/schemes: Move Extension options from src/module_list.py to distutils directives
5867c05src/sage/modular/pollack_stevens/dist.pyx: Add missing distutils directives
c536daaRemove self-listing in distutils sources directive
b1b3787sage.env.cython_aliases: Fix for systems without zlib pc
2ba1d7bMerge branch 't/29706/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files' into t/29785/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_
bb6cc0cMerge branch 't/29785/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup
4ce81bfsage_setup.command.sage_build_cython: Use SAGE_GMP_PREFIX, SAGE_NTL_PREFIX for header dependencies instead of SAGE_INC

Changed commit from 4ce81bf to 4a9dd3a

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

041c9e8sage_setup.command.sage_build_cython: Use SAGE_GMP_PREFIX, SAGE_NTL_PREFIX for header dependencies instead of SAGE_INC
4a9dd3aMerge branch 't/29855/sagelib_setup_py__fix_dependencies_on_header_files_of_packages_gmp__ntl' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

Description changed:

--- 
+++ 
@@ -10,7 +10,7 @@
 ```
 ... by moving the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 
-... and remove the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (as noted in #29711).
+... and remove the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (this is #29855; see also #29711).
 
 Harmless dependencies on `sage.*`:
 

Description changed:

--- 
+++ 
@@ -8,9 +8,9 @@
 ./library_order.py:77:from sage.env import cython_aliases
 ./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
 ```
-... by moving the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
+... by handling the case that the functions `sage_include_directories`, `cython_aliases` cannot be imported from sage.env
 
-... and remove the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (this is #29855; see also #29711).
+... and removing the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (this is #29855; see also #29711).
 
 Harmless dependencies on `sage.*`:
 
@@ -26,4 +26,6 @@
   (just need to make sure that `sage_setup.command.sage_install` is only used by the distribution that installs `sage.repl.ipython_kernel`)
 ```
 
+Follow-up:
+- #29871: move the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 

Description changed:

--- 
+++ 
@@ -1,6 +1,9 @@
 sage_setup will be used by the build system of various distutils packages (#29705).
 
-So we make it a regular distutils package itself and install it with pip.
+So we make it a regular distutils package itself and install it with `setup.py install`.
+
+We install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
+
 
 We remove some dependencies on `sage.*` that are still in `sage_setup`: 
 
@@ -27,5 +30,5 @@
 ```
 
 Follow-up:
-- #29871: move the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
+- ???? #29871: move the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 

Description changed:

--- 
+++ 
@@ -29,6 +29,4 @@
   (just need to make sure that `sage_setup.command.sage_install` is only used by the distribution that installs `sage.repl.ipython_kernel`)
 ```
 
-Follow-up:
-- ???? #29871: move the functions `sage_include_directories`, `cython_aliases` to `sage_setup` (and leave a perhaps deprecated reimport behind). Should be done after #29706, #29785, which touch these functions.
 

Description changed:

--- 
+++ 
@@ -2,7 +2,7 @@
 
 So we make it a regular distutils package itself and install it with `setup.py install`.
 
-We install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
+We also install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
 
 We remove some dependencies on `sage.*` that are still in `sage_setup`: 

Description changed:

--- 
+++ 
@@ -5,28 +5,4 @@
 We also install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
 
-We remove some dependencies on `sage.*` that are still in `sage_setup`: 
-
-```
-./library_order.py:77:from sage.env import cython_aliases
-./command/sage_build_cython.py:21:from sage.env import (SAGE_INC, cython_aliases, sage_include_directories)
-```
-... by handling the case that the functions `sage_include_directories`, `cython_aliases` cannot be imported from sage.env
-
-... and removing the use of `SAGE_INC` by using instead the environment variables set in `sage-build-env-config` (this is #29855; see also #29711).
-
-Harmless dependencies on `sage.*`:
-
-```
-./docbuild/ ........
-  (will be invoked later, when sage.* is installed)
-./optional_extension.py:22:from sage.misc.package import list_packages
-./optional_extension.py:44:    from sage.misc.package import is_package_installed
-  (no longer used, only kept around in case user packages use it)
-./autogen/interpreters/__main__.py:4:from sage.env import SAGE_SRC
-  (only used when invoked interactively)
-./command/sage_install.py:28:        from sage.repl.ipython_kernel.install import SageKernelSpec
-  (just need to make sure that `sage_setup.command.sage_install` is only used by the distribution that installs `sage.repl.ipython_kernel`)
-```
-
-
+Follow-up: #29924
comment:24
[sagelib-9.1.rc5] running build
[sagelib-9.1.rc5] Generating auto-generated sources
[sagelib-9.1.rc5] Building interpreters for fast_callable
[sagelib-9.1.rc5] -> Rebuilding interpreters because /Users/mkoeppe/s/sage/sage-rebasing/src/sage_setup/autogen/interpreters/memory.py changed
[sagelib-9.1.rc5] running build_cython
[sagelib-9.1.rc5] Enabling Cython debugging support
[sagelib-9.1.rc5] Updating Cython code....
[sagelib-9.1.rc5] Compiling sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx because it changed.
[sagelib-9.1.rc5] error: [Errno 21] Is a directory: '/Users/mkoeppe/s/sage/sage-rebasing/src/sage/cpython'

Hm....

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

7582906build/pkgs/sage_setup: New
010c6e3src/setup.py: Do not install sage_setup; instead, make the sage_setup package a dependency

Changed commit from 4a9dd3a to 010c6e3

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

18aae7fsage_setup.command.sage_build_cython: Fix up - add list brackets
2d0d0a7Merge branch 't/29855/sagelib_setup_py__fix_dependencies_on_header_files_of_packages_gmp__ntl' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

Changed commit from 010c6e3 to 2d0d0a7

comment:27

Replying to @mkoeppe:

[sagelib-9.1.rc5] error: [Errno 21] Is a directory: '/Users/mkoeppe/s/sage/sage-rebasing/src/sage/cpython'

Hm....

That was coming from the mistake in #29855.

Changed commit from 2d0d0a7 to 0459006

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

0459006.gitignore: Ignore generated files in build/pkgs/*/src

Work Issues: Install scripts, add spkg-src

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

c66384dbuild/pkgs/sage_setup/spkg-install: Fixup use of --root

Changed commit from 0459006 to c66384d

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

58956e6build/pkgs/sage_setup/spkg-src: New

Changed commit from c66384d to 58956e6

Changed work issues from Install scripts, add spkg-src to Install scripts

Description changed:

--- 
+++ 
@@ -2,7 +2,9 @@
 
 So we make it a regular distutils package itself and install it with `setup.py install`.
 
-We also install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
+Follow-up: 
+- #29924: Do not fail if `sage.env`, `sage.*` are not available
+- #29950: Build sagelib using the installed `sage_setup`, add `spkg-src`
+- #21559 or follow-up: install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
-Follow-up: #29924

Author: Matthias Koeppe

Changed work issues from Install scripts to none

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

0e17023Merge tag '9.2.beta2' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

Changed commit from 58956e6 to 0e17023

Changed dependencies from #29702, #29706, #29785, #29855 to #29702, #29855

Description changed:

--- 
+++ 
@@ -2,6 +2,7 @@
 
 So we make it a regular distutils package itself and install it with `setup.py install`.
 
+`sagelib`'s `setup.py` (`src/setup.py`) will no longer install `sage_setup`.
 
 Follow-up: 
 - #29924: Do not fail if `sage.env`, `sage.*` are not available

Description changed:

--- 
+++ 
@@ -1,6 +1,6 @@
 sage_setup will be used by the build system of various distutils packages (#29705).
 
-So we make it a regular distutils package itself and install it with `setup.py install`.
+So we make it a regular distutils package itself and install it with `setup.py install`. (That's `build/pkgs/sage_setup/src/setup.py`.)
 
 `sagelib`'s `setup.py` (`src/setup.py`) will no longer install `sage_setup`.
 

Changed commit from 0e17023 to 0d22cef

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

0d22cefbuild/pkgs/sage_setup/spkg-src: chmod +x

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

21eb31ebuild/pkgs/sage_setup/src/tox.ini, requirements.txt: New

Changed commit from 0d22cef to 21eb31e

Changed commit from 21eb31e to eeeaa47

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

eeeaa47build/pkgs/sage_setup/src/setup.cfg: Add nested packages

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

4dcaf1cbuild/pkgs/sage_setup/src/setup.cfg: Add remaining nested packages

Changed commit from eeeaa47 to 4dcaf1c

Description changed:

--- 
+++ 
@@ -9,3 +9,23 @@
 - #29950: Build sagelib using the installed `sage_setup`, add `spkg-src`
 - #21559 or follow-up: install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
+
+---
+References:
+
+python - pip ignores dependency_links in setup.py - Stack Overflow
+https://stackoverflow.com/questions/12518499/pip-ignores-dependency-links-in-setup-py
+
+dependency_links flag ignored when package exists on PyPI · Issue #987 · pypa/setuptools
+https://github.com/pypa/setuptools/issues/987
+
+Suggest alternatives for --process-dependency-links · Issue #6162 · pypa/pip
+https://github.com/pypa/pip/issues/6162
+
+PEP 508 -- Dependency specification for Python Software Packages | Python.org
+https://www.python.org/dev/peps/pep-0508/#pep440
+
+PEP 440 -- Version Identification and Dependency Specification | Python.org
+https://www.python.org/dev/peps/pep-0440/#local-version-segments
+
+

Changed dependencies from #29702, #29855 to #29702, #29855, #30011

Work Issues: merge #30011, remove dep on six

comment:46

should we wait for #29855, #30011 merged?

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

212d183trac 30011: remove sage_setup/fpickle_setup.py
0ef60f5Merge branch 'u/jhpalmieri/sage_setup__remove_use_of_six' of git://trac.sagemath.org/sage into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup
44cc65dbuild/pkgs/sage_setup/dependencies: New

Changed commit from 4dcaf1c to 44cc65d

Changed work issues from merge #30011, remove dep on six to none

comment:49

This ticket is not so urgent (I've set its milestone to 9.3)

Work Issues: Merge #29950

Changed work issues from Merge #29950 to Merge #30010

Changed dependencies from #29702, #29855, #30011 to #29500, #30010

Changed commit from 44cc65d to 8d465d7

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

8aa6fd9build/bin/sage-dist-helpers (sdh_pip_install): Build a wheel, store it
d369aabbuild/bin/sage-dist-helpers (sdh_store_and_pip_install_wheel): New, factored out from sdh_pip_install
2d435abbuild/pkgs/numpy/spkg-install.in: Install via setup.py bdist_wheel
55993b6build/bin/sage-dist-helpers: Fixup
0a64674build/pkgs/gambit/spkg-install.in: Install via bdist_wheel
ca58693build/pkgs/pillow/spkg-install.in: Install via bdist_wheel
65773f7Merge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30010/split_sage_setup_docbuild_out_to_a_separate_package
14ab446build/pkgs/sage_setup_docbuild/spkg-install: Install via setup.py bdist_wheel
3c5584dMerge branch 't/30010/split_sage_setup_docbuild_out_to_a_separate_package' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup
8d465d7build/pkgs/sage_setup/spkg-install: Install via setup.py bdist_wheel

Changed work issues from Merge #30010 to none

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

db56301build/pkgs/sagelib/src/requirements.txt: Update

Changed commit from 8d465d7 to db56301

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

650c500build/pkgs/sage_setup/src: Set version, remove sage_setup.docbuild package
1bb5b34build/pkgs/sage_setup/type: Change to standard

Changed commit from db56301 to 1bb5b34

Description changed:

--- 
+++ 
@@ -2,12 +2,10 @@
 
 So we make it a regular distutils package itself and install it with `setup.py install`. (That's `build/pkgs/sage_setup/src/setup.py`.)
 
-`sagelib`'s `setup.py` (`src/setup.py`) will no longer install `sage_setup`.
+`sagelib`'s `setup.py` will no longer install `sage_setup`.
 
 Follow-up: 
 - #29924: Do not fail if `sage.env`, `sage.*` are not available
-- #29950: Build sagelib using the installed `sage_setup`, add `spkg-src`
-- #21559 or follow-up: install some scripts in `src/bin` that belong to sage-the-distribution using the `scripts` feature of setuptools.
 
 
 ---

Changed dependencies from #29500, #30010 to #30010

Changed keywords from none to sd111

comment:58

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

kliem commented
comment:59

Needs rebase.

Description changed:

--- 
+++ 
@@ -3,6 +3,8 @@
 So we make it a regular distutils package itself and install it with `setup.py install`. (That's `build/pkgs/sage_setup/src/setup.py`.)
 
 `sagelib`'s `setup.py` will no longer install `sage_setup`.
+
+`sage_setup` will become a `build-system requires` (declared in `pyproject.toml`)
 
 Follow-up: 
 - #29924: Do not fail if `sage.env`, `sage.*` are not available

Changed dependencies from #30010 to #30010, #30913, #31377

Work Issues: rebase

Changed work issues from rebase to rebase on #31577

Description changed:

--- 
+++ 
@@ -1,10 +1,12 @@
-sage_setup will be used by the build system of various distutils packages (#29705).
+sage_setup will be used by the build system of various distribution packages (#29705).
 
-So we make it a regular distutils package itself and install it with `setup.py install`. (That's `build/pkgs/sage_setup/src/setup.py`.)
+So we make it a regular distribution package itself, with sources in `pkgs/sage-setup/` (#31577) and install it with `pip`.
+
+The actual Python source files are not moved because `sage_setup` takes part in Sage doctesting (see #31577).
 
 `sagelib`'s `setup.py` will no longer install `sage_setup`.
 
-`sage_setup` will become a `build-system requires` (declared in `pyproject.toml`)
+`sage-setup` will become a `build-system requires` of `sagemath-standard` (declared in `pyproject.toml`)
 
 Follow-up: 
 - #29924: Do not fail if `sage.env`, `sage.*` are not available

Changed dependencies from #30010, #30913, #31377 to #31577

Changed commit from 1bb5b34 to 2b25c06

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

d3a8f5fbuild/pkgs/sage_setup/spkg-src: New
9c71594build/pkgs/sage_setup/spkg-src: chmod +x
23cd1d9build/pkgs/sage_setup/src/tox.ini, requirements.txt: New
ae23b43build/pkgs/sage_setup/src/setup.cfg: Add nested packages
7c7b38abuild/pkgs/sage_setup/src/setup.cfg: Add remaining nested packages
2e9b850build/pkgs/sage_setup/dependencies: New
5511555build/pkgs/sage_setup/spkg-install: Install via setup.py bdist_wheel
3e28f39build/pkgs/sage_setup/src: Set version, remove sage_setup.docbuild package
4d387bbbuild/pkgs/sage_setup/type: Change to standard
2b25c06Move sage_setup distribution source to pkgs/sage-setup

Changed commit from 2b25c06 to f51ca1c

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

287372asrc/pyproject.toml.m4: Add sage_setup as build-system requires
f51ca1csrc/setup.cfg.m4: Change license_file to license_files

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

35e38cdFixup

Changed commit from f51ca1c to 35e38cd

Changed commit from 35e38cd to cf606f7

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

a1d33bcbuild/pkgs/pillow/spkg-install.in, build/bin/sage-dist-helpers: Remove debugging code
413f6b5build/pkgs/{jupyter_jsmol,python_igraph,pillow}/spkg-install.in: Use --build-option, not --global-option
1e993d4Fixup
9ec5bc2pkgs/sagemath-standard/setup.py, src/setup.py, src/MANIFEST.in: Exclude sage_setup
9ec930cUpdate paths in comments
d8d5755pkgs/sage-setup/tox.ini: Update paths in comments
b4b5c19build/bin/write-dockerfile.sh: ADD pkgs
40abff0pkgs/sage-setup/setup.cfg: README.rst, not README.md
782b64bpkgs/sagemath-standard: Remove symlink to SAGE_ROOT/src/sage_setup
cf606f7build/bin/write-dockerfile.sh: ADD src/sage_setup before building TARGETS_PRE

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

a1b8832build/pkgs/sage_setup/spkg-src: Use python3

Changed commit from cf606f7 to a1b8832

Changed work issues from rebase on #31577 to none

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

9270417tox.ini, build/bin/write-dockerfile.sh, tox*.yml: Use all-sage-local as default TARGETS_PRE
870f9aabuild/pkgs/memory_allocator/install-requires.txt: Fix filename
61c25a0build/pkgs/sage_conf/install-requires.txt: New

Changed commit from a1b8832 to 61c25a0

Reviewer: Dima Pasechnik

comment:70

ok, fine

comment:71

Thanks!

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

7f0bd4aMerge tag '9.4.beta4' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

Changed commit from 61c25a0 to 7f0bd4a