-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
pkgs/sagemath-standard
: Move metadata from setup.cfg
to pyproject.toml
#36951
Changes from 1 commit
1a71556
58d0e88
272e7c1
33861f6
70535aa
cdafcd7
58e6b82
43b6200
a6bea03
5ca0e45
90c16ff
18cb712
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,156 @@ | ||
include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- | ||
[build-system] | ||
# Minimum requirements for the build system to execute. | ||
requires = [ | ||
"sage_setup[autogen]", | ||
# Some version of sage-conf is required. | ||
# Note that PEP517/518 have no notion of optional sage_spkg dependencies: | ||
# https://github.com/pypa/pip/issues/6144 | ||
esyscmd(`sage-get-system-packages install-requires-toml \ | ||
sage_conf \ | ||
setuptools \ | ||
wheel \ | ||
sage_setup \ | ||
cypari \ | ||
cysignals \ | ||
cython \ | ||
gmpy2 \ | ||
jinja2 \ | ||
jupyter_core \ | ||
numpy \ | ||
pkgconfig \ | ||
pplpy \ | ||
memory_allocator \ | ||
')] | ||
SPKG_INSTALL_REQUIRES_sage_conf | ||
SPKG_INSTALL_REQUIRES_setuptools | ||
SPKG_INSTALL_REQUIRES_wheel | ||
SPKG_INSTALL_REQUIRES_sage_setup | ||
SPKG_INSTALL_REQUIRES_cypari | ||
SPKG_INSTALL_REQUIRES_cysignals | ||
SPKG_INSTALL_REQUIRES_cython | ||
SPKG_INSTALL_REQUIRES_gmpy2 | ||
SPKG_INSTALL_REQUIRES_jupyter_core | ||
SPKG_INSTALL_REQUIRES_memory_allocator | ||
SPKG_INSTALL_REQUIRES_numpy | ||
SPKG_INSTALL_REQUIRES_pkgconfig | ||
SPKG_INSTALL_REQUIRES_pplpy | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "sagemath-standard" | ||
description = "Sage: Open Source Mathematics Software: Standard Python Library" | ||
dependencies = [ | ||
SPKG_INSTALL_REQUIRES_sage_conf | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can simply use dynamic metadata and
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, but that would not be an improvement. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setuptools automatically includes the linked files (and only these) in the sdist. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These file paths There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In any case, changes to this design are outside of the scope of this PR. This design is already in place in
|
||
SPKG_INSTALL_REQUIRES_six | ||
dnl From build/pkgs/sagelib/dependencies | ||
SPKG_INSTALL_REQUIRES_conway_polynomials | ||
SPKG_INSTALL_REQUIRES_cypari | ||
SPKG_INSTALL_REQUIRES_cysignals | ||
SPKG_INSTALL_REQUIRES_cython | ||
SPKG_INSTALL_REQUIRES_gmpy2 | ||
SPKG_INSTALL_REQUIRES_importlib_metadata | ||
SPKG_INSTALL_REQUIRES_importlib_resources | ||
SPKG_INSTALL_REQUIRES_jupyter_core | ||
SPKG_INSTALL_REQUIRES_lrcalc_python | ||
SPKG_INSTALL_REQUIRES_memory_allocator | ||
SPKG_INSTALL_REQUIRES_numpy | ||
SPKG_INSTALL_REQUIRES_pkgconfig | ||
SPKG_INSTALL_REQUIRES_pplpy | ||
SPKG_INSTALL_REQUIRES_primecountpy | ||
SPKG_INSTALL_REQUIRES_requests | ||
SPKG_INSTALL_REQUIRES_typing_extensions | ||
dnl From Makefile.in: SAGERUNTIME | ||
SPKG_INSTALL_REQUIRES_ipython | ||
SPKG_INSTALL_REQUIRES_pexpect | ||
dnl From Makefile.in: DOC_DEPENDENCIES | ||
SPKG_INSTALL_REQUIRES_sphinx | ||
SPKG_INSTALL_REQUIRES_networkx | ||
SPKG_INSTALL_REQUIRES_scipy | ||
SPKG_INSTALL_REQUIRES_sympy | ||
SPKG_INSTALL_REQUIRES_matplotlib | ||
SPKG_INSTALL_REQUIRES_pillow | ||
SPKG_INSTALL_REQUIRES_mpmath | ||
SPKG_INSTALL_REQUIRES_ipykernel | ||
SPKG_INSTALL_REQUIRES_jupyter_client | ||
SPKG_INSTALL_REQUIRES_ipywidgets | ||
SPKG_INSTALL_REQUIRES_fpylll | ||
dnl pycryptosat # Sage distribution installs it as part of cryptominisat. According to its README on https://pypi.org/project/pycryptosat/: "The pycryptosat python package compiles while compiling CryptoMiniSat. It cannot be compiled on its own, it must be compiled at the same time as CryptoMiniSat." | ||
dnl Packages with important upper version bounds | ||
SPKG_INSTALL_REQUIRES_ptyprocess | ||
] | ||
dynamic = ["version"] | ||
include(`pyproject_toml_metadata.m4')dnl' | ||
|
||
[project.optional-dependencies] | ||
R = [ | ||
SPKG_INSTALL_REQUIRES_rpy2 | ||
] | ||
|
||
[project.readme] | ||
file = "README.rst" | ||
content-type = "text/x-rst" | ||
|
||
[tool.setuptools] | ||
script-files = [ | ||
# The sage script | ||
"bin/sage", | ||
# Other scripts that should be in the path also for OS packaging of sage: | ||
"bin/sage-eval", | ||
# Included because it is useful for doctesting/coverage testing user scripts too: | ||
"bin/sage-runtests", | ||
"bin/sage-fixdoctests", | ||
"bin/sage-coverage", | ||
# The following is deprecated but might still be used in user package install scripts | ||
"bin/sage-cython", | ||
# Helper scripts invoked by sage script | ||
# (they would actually belong to something like libexec) | ||
"bin/sage-cachegrind", | ||
"bin/sage-callgrind", | ||
"bin/sage-massif", | ||
"bin/sage-omega", | ||
"bin/sage-valgrind", | ||
"bin/sage-venv-config", | ||
"bin/sage-version.sh", | ||
"bin/sage-cleaner", | ||
# Only makes sense in sage-the-distribution. TODO: Move to another installation script. | ||
"bin/sage-list-packages", | ||
# Uncategorized scripts in alphabetical order | ||
"bin/math-readline", | ||
"bin/sage-env", | ||
# sage-env-config -- installed by sage_conf | ||
# sage-env-config.in -- not to be installed | ||
"bin/sage-grep", | ||
"bin/sage-grepdoc", | ||
"bin/sage-inline-fortran", | ||
"bin/sage-ipynb2rst", | ||
"bin/sage-ipython", | ||
"bin/sage-notebook", | ||
"bin/sage-num-threads.py", | ||
"bin/sage-preparse", | ||
"bin/sage-python", | ||
"bin/sage-run", | ||
"bin/sage-run-cython", | ||
"bin/sage-startuptime.py", | ||
"bin/sage-update-version", | ||
] | ||
license-files = ["LICENSE.txt"] | ||
include-package-data = false | ||
|
||
[tool.setuptools.package-data] | ||
"sage.libs.gap" = ["sage.gaprc"] | ||
"sage.interfaces" = ["sage-maxima.lisp"] | ||
"sage.doctest" = ["tests/*"] | ||
"sage.repl.rich_output" = ["example*"] | ||
sage = [ | ||
"ext_data/*", | ||
"ext_data/kenzo/*", | ||
"ext_data/singular/*", | ||
"ext_data/singular/function_field/*", | ||
"ext_data/images/*", | ||
"ext_data/doctest/*", | ||
"ext_data/doctest/invalid/*", | ||
"ext_data/gap/*", | ||
"ext_data/gap/joyner/*", | ||
"ext_data/mwrank/*", | ||
"ext_data/notebook-ipython/*", | ||
"ext_data/nbconvert/*", | ||
"ext_data/graphs/*", | ||
"ext_data/pari/*", | ||
"ext_data/pari/dokchitser/*", | ||
"ext_data/pari/buzzard/*", | ||
"ext_data/pari/simon/*", | ||
"ext_data/magma/*", | ||
"ext_data/magma/latex/*", | ||
"ext_data/magma/sage/*", | ||
"ext_data/valgrind/*", | ||
"ext_data/threejs/*", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {file = ["VERSION.txt"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem here. All of those are not build-system requirements. According to pep 517 this should only list packages that are needed to run the build-system (not to build a wheel).
Only sage-setup and setuptools are necessary to run the build system, and indeed they suffice to build a sdist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I salute you for starting to read the specs.
But you're a little bit too quick to declare that this "needs work".
There is not "one true" declaration of build-system requirements.
As I explained to you elsewhere, setuptools does not support declarations of PEP-517/660 hooks (other backends do). When we decide to use setuptools as the PEP-517/660 build-backend, we work with what is supported. We have to build wheels, the wheels need all of these things, hence we declare them as build-system requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, the present PR does not even make a change to what is declared...