Opened 2 years ago

Last modified 13 months ago

#29847 closed enhancement

Install sage_setup with pip as a prerequisite for building/installing sagelib — at Version 20

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.5
Component: build Keywords: sd111
Cc: François Bissey, John Palmieri, Dima Pasechnik Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/mkoeppe/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup (Commits, GitHub, GitLab) Commit: 4a9dd3ad8c103784403e8ecce172427b2f5c0eff
Dependencies: #29702, #29706, #29785, #29855 Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

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.

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:

./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:

  • ???? #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.

Change History (20)

comment:1 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:2 Changed 2 years ago by Matthias Köppe

Dependencies: #29702

comment:3 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:4 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:5 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:6 Changed 2 years ago by Matthias Köppe

Summary: Install sage_setup with pipInstall sage_setup with pip, move sage_include_directories, cython_aliases from sage.env to sage_setup

comment:7 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:8 Changed 2 years ago by Matthias Köppe

Dependencies: #29702#29702, #29706, #29785
Description: modified (diff)

comment:9 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:10 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:11 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:12 Changed 2 years ago by Matthias Köppe

Branch: u/mkoeppe/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

comment:13 Changed 2 years ago by Matthias Köppe

Commit: 4ce81bf162906ba72c5fc8ca7c349dedf33cd033
Dependencies: #29702, #29706, #29785#29702, #29706, #29785, #29855

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

comment:14 Changed 2 years ago by git

Commit: 4ce81bf162906ba72c5fc8ca7c349dedf33cd0334a9dd3ad8c103784403e8ecce172427b2f5c0eff

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

comment:15 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:16 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:17 Changed 2 years ago by Matthias Köppe

Description: modified (diff)

comment:18 Changed 2 years ago by Matthias Köppe

Summary: Install sage_setup with pip, move sage_include_directories, cython_aliases from sage.env to sage_setupInstall sage_setup with pip as a prerequisite for building/installing sagelib

comment:19 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.3sage-9.2

comment:20 Changed 2 years ago by Matthias Köppe

Cc: François Bissey added
Description: modified (diff)
Note: See TracTickets for help on using tickets.