Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mkoeppe opened this issue Jun 11, 2020 · 130 comments
Closed

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jun 11, 2020

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:


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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 11, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 11, 2020

Dependencies: #29702

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Install sage_setup with pip Install sage_setup with pip, move sage_include_directories, cython_aliases from sage.env to sage_setup Jun 12, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 12, 2020

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

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2020

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 14, 2020

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 14, 2020

Commit: 4ce81bf

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 14, 2020

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 14, 2020

Changed commit from 4ce81bf to 4a9dd3a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 14, 2020

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

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Jun 14, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Install sage_setup with pip, move sage_include_directories, cython_aliases from sage.env to sage_setup Install sage_setup with pip as a prerequisite for building/installing sagelib Jun 15, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.2 Jun 21, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe added this to the sage-9.5 milestone Jul 24, 2021
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 12, 2021

Changed commit from 6b1b222 to a41b507

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 12, 2021

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

85d1d27Merge tag '9.4.rc1' into t/32046/use_pip___use_feature_in_tree_build__replace_use_of_sdh_setup_bdist_wheel_by_sdh_pip_install
050f8dfbuild/pkgs/numpy/spkg-install.in: Use sdh_pip_install, sdh_prefix_args
a41b507Merge branch 't/32046/use_pip___use_feature_in_tree_build__replace_use_of_sdh_setup_bdist_wheel_by_sdh_pip_install' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 12, 2021

Changed dependencies from #31577, #29585, #32073, #32046 to #32046

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 12, 2021

Changed commit from a41b507 to 478ffcd

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 12, 2021

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

290fa2fbuild/pkgs/sagelib/src: Restore lost symlink
478ffcdMerge #32046

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 13, 2021

Changed commit from 478ffcd to b2368c6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 13, 2021

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

b2368c6pkgs/sage-setup/setup.cfg: Add pkgconfig as install_requires

@jhpalmieri
Copy link
Member

comment:92

I'm getting a lot of doctest failures:

sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/utils.py  # 15 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/find.py  # 38 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/rdf.py  # 11 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/optional_extension.py  # 12 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/__init__.py  # 5 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/generator.py  # 70 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/clean.py  # 13 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/storage.py  # 97 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/memory.py  # 57 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/cdf.py  # 9 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/cc.py  # 20 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/python.py  # 25 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/instructions.py  # 39 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/rr.py  # 21 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/base.py  # 22 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/autogen/interpreters/specs/element.py  # 11 doctests failed
sage -t --long --warn-long 100.8 --random-seed=0 src/sage_setup/util.py  # 6 doctests failed

The directory local/lib/python3.9/site-packages/sage_setup doesn't have much in it anymore, and I'm guessing that this causes the problems.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 3, 2021

Changed commit from b2368c6 to f84730e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 3, 2021

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

db8e30dMerge tag '9.5.beta0' into t/29847/install_sage_setup_with_pip__move_sage_include_directories__cython_aliases_from_sage_env_to_sage_setup
37f9b0cbuild/make/Makefile.in: For script packages, make sure that 'sage -f' uninstalls first
456d8a9build/make/Makefile.in (sage_setup-clean): Clean the build tree
f84730esage_setup.clean: Do not clean the sage_setup installation in site-packages

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 3, 2021

comment:95

Thanks for catching this. When configure --enable-editable is not used, the "cleaner" erased sage_setup's files at the end of the sagelib installation. Fixed now, tamed the cleaner.

@dimpase
Copy link
Member

dimpase commented Sep 7, 2021

comment:96

seems to work for me (without --enable-editable).

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 7, 2021

comment:97

Thank you!

@vbraun
Copy link
Member

vbraun commented Sep 13, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants