Skip to content

Commit f16eb4b

Browse files
committed
Revert "gh-36964: Add # sage_setup: distribution directives to all files, remove remaining # coding: utf-8"
This reverts commit 6ecb1d8, reversing changes made to 8ea5214.
1 parent 15fcf52 commit f16eb4b

File tree

3,547 files changed

+2061
-5665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,547 files changed

+2061
-5665
lines changed

bootstrap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ save () {
232232
src/environment-optional-3.[89].yml src/environment-optional-3.1[0-9].yml \
233233
src/Pipfile \
234234
src/pyproject.toml \
235-
src/requirements.txt
235+
src/requirements.txt \
236+
src/setup.cfg
236237

237238
# Update version
238239
echo "$NEWCONFVERSION" >$PKG/package-version.txt

build/bin/write-dockerfile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ $ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-
236236
$ADD config/config.rpath config/config.rpath
237237
$ADD src/doc/bootstrap src/doc/bootstrap
238238
$ADD src/bin src/bin
239-
$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/VERSION.txt src/
239+
$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt src/
240240
$ADD m4 ./m4
241241
$ADD pkgs pkgs
242242
$ADD build ./build
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# According to https://github.com/python/typing_extensions/blob/main/CHANGELOG.md,
22
# version 4.4.0 adds another Python 3.11 typing backport
3-
typing_extensions >= 4.4.0; python_version<"3.11"
3+
typing_extensions >= 4.4.0; python_version<'3.11'

pkgs/sagemath-categories/known-test-failures.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"ntests": 28
2727
},
2828
"sage.categories.affine_weyl_groups": {
29-
"ntests": 15
29+
"ntests": 14
3030
},
3131
"sage.categories.algebra_ideals": {
3232
"failed": true,
@@ -148,7 +148,7 @@
148148
},
149149
"sage.categories.coxeter_groups": {
150150
"failed": true,
151-
"ntests": 363
151+
"ntests": 362
152152
},
153153
"sage.categories.cw_complexes": {
154154
"failed": true,
@@ -301,7 +301,7 @@
301301
},
302302
"sage.categories.finite_complex_reflection_groups": {
303303
"failed": true,
304-
"ntests": 199
304+
"ntests": 178
305305
},
306306
"sage.categories.finite_coxeter_groups": {
307307
"ntests": 6
@@ -493,6 +493,10 @@
493493
"failed": true,
494494
"ntests": 13
495495
},
496+
"sage.categories.inner_product_spaces": {
497+
"failed": true,
498+
"ntests": 9
499+
},
496500
"sage.categories.integral_domains": {
497501
"failed": true,
498502
"ntests": 22
@@ -779,7 +783,7 @@
779783
},
780784
"sage.cpython.debug": {
781785
"failed": true,
782-
"ntests": 13
786+
"ntests": 14
783787
},
784788
"sage.cpython.dict_del_by_value": {
785789
"failed": true,
@@ -822,6 +826,7 @@
822826
"ntests": 321
823827
},
824828
"sage.doctest.reporting": {
829+
"failed": true,
825830
"ntests": 124
826831
},
827832
"sage.doctest.sources": {
@@ -1086,7 +1091,7 @@
10861091
},
10871092
"sage.misc.sageinspect": {
10881093
"failed": true,
1089-
"ntests": 332
1094+
"ntests": 329
10901095
},
10911096
"sage.misc.superseded": {
10921097
"failed": true,
@@ -1119,7 +1124,6 @@
11191124
"ntests": 128
11201125
},
11211126
"sage.repl.configuration": {
1122-
"failed": true,
11231127
"ntests": 22
11241128
},
11251129
"sage.repl.display.fancy_repr": {
@@ -1145,7 +1149,6 @@
11451149
"ntests": 42
11461150
},
11471151
"sage.repl.inputhook": {
1148-
"failed": true,
11491152
"ntests": 7
11501153
},
11511154
"sage.repl.interface_magic": {
@@ -1154,7 +1157,7 @@
11541157
},
11551158
"sage.repl.interpreter": {
11561159
"failed": true,
1157-
"ntests": 114
1160+
"ntests": 118
11581161
},
11591162
"sage.repl.ipython_extension": {
11601163
"failed": true,
@@ -1185,7 +1188,7 @@
11851188
},
11861189
"sage.repl.load": {
11871190
"failed": true,
1188-
"ntests": 38
1191+
"ntests": 42
11891192
},
11901193
"sage.repl.preparse": {
11911194
"failed": true,
@@ -1312,6 +1315,9 @@
13121315
"sage.structure.global_options": {
13131316
"ntests": 145
13141317
},
1318+
"sage.structure.graphics_file": {
1319+
"ntests": 8
1320+
},
13151321
"sage.structure.indexed_generators": {
13161322
"failed": true,
13171323
"ntests": 90

pkgs/sagemath-standard/setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../src/setup.cfg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../src/setup.cfg.m4

pkgs/sagemath-standard/setup.py

Lines changed: 19 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -69,60 +69,25 @@
6969
from sage_setup.autogen import autogen_all
7070
autogen_all()
7171

72-
# TODO: This should be quiet by default
73-
print("Discovering Python/Cython source code....")
74-
t = time.time()
75-
from sage.misc.package import is_package_installed_and_updated
76-
77-
distributions = [
78-
'',
79-
"sagemath-brial",
80-
"sagemath-categories",
81-
"sagemath-combinat",
82-
"sagemath-eclib",
83-
"sagemath-environment",
84-
"sagemath-flint",
85-
"sagemath-gap",
86-
"sagemath-giac",
87-
"sagemath-glpk",
88-
"sagemath-graphs",
89-
"sagemath-groups",
90-
"sagemath-homfly",
91-
"sagemath-lcalc",
92-
"sagemath-libbraiding",
93-
"sagemath-libecm",
94-
"sagemath-linbox",
95-
"sagemath-modules",
96-
"sagemath-mpmath",
97-
"sagemath-ntl",
98-
"sagemath-objects",
99-
"sagemath-pari",
100-
"sagemath-plot",
101-
"sagemath-polyhedra",
102-
"sagemath-repl",
103-
"sagemath-schemes",
104-
"sagemath-singular",
105-
"sagemath-symbolics",
106-
]
107-
108-
optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',')
109-
distributions += ['sagemath-{}'.format(pkg)
110-
for pkg in optional_packages_with_extensions
111-
if is_package_installed_and_updated(pkg)]
112-
log.warn('distributions = {0}'.format(distributions))
113-
from sage_setup.find import find_python_sources
114-
python_packages, python_modules, cython_modules = find_python_sources(
115-
SAGE_SRC, ['sage'], distributions=distributions)
116-
117-
log.debug('python_packages = {0}'.format(python_packages))
118-
log.debug('python_modules = {0}'.format(python_modules))
119-
log.debug('cython_modules = {0}'.format(cython_modules))
120-
121-
print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t))
122-
else:
123-
# sdist, egg_info, dist_info
124-
python_packages = []
125-
cython_modules = []
72+
# TODO: This should be quiet by default
73+
print("Discovering Python/Cython source code....")
74+
t = time.time()
75+
from sage.misc.package import is_package_installed_and_updated
76+
distributions = ['']
77+
optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',')
78+
distributions += ['sagemath-{}'.format(pkg)
79+
for pkg in optional_packages_with_extensions
80+
if is_package_installed_and_updated(pkg)]
81+
log.warn('distributions = {0}'.format(distributions))
82+
from sage_setup.find import find_python_sources
83+
python_packages, python_modules, cython_modules = find_python_sources(
84+
SAGE_SRC, ['sage'], distributions=distributions)
85+
86+
log.debug('python_packages = {0}'.format(python_packages))
87+
log.debug('python_modules = {0}'.format(python_modules))
88+
log.debug('cython_modules = {0}'.format(cython_modules))
89+
90+
print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t))
12691

12792
#########################################################
12893
### Distutils

pkgs/sagemath-standard/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
[tox]
1818
envlist =
1919
# Build and test without using the concrete dependencies specified by requirements.txt,
20-
# using the dependencies declared in pyproject.toml (build-system requires, dependencies) only:
20+
# using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only:
2121
# Still use ONLY the wheels built and stored by the Sage distribution (no PyPI).
2222
#
2323
# ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi-norequirements)'
@@ -45,7 +45,7 @@ envlist =
4545
#
4646
# ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-pipenv-dist)'
4747
#
48-
# Build using the dependencies declared in pyproject.toml (build-system requires, dependencies) only:
48+
# Build using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only.
4949
# Use the wheels built and stored by the Sage distribution,
5050
# and additionally allow packages from PyPI.
5151
#

src/Pipfile.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ url = "https://pypi.org/simple"
66
verify_ssl = true
77

88
[dev-packages]
9-
## We do not list packages that are already declared as dependencies (install_requires)
10-
## in pyproject.toml
9+
## We do not list packages that are already declared as install_requires
10+
## in setup.cfg
1111
pycodestyle = "*"
1212
tox = "*"
1313
pytest = "*"
1414
rope = "*"
1515
six = "*"
1616

1717
[packages]
18-
## We do not list packages that are already declared as dependencies (install_requires)
19-
## in pyproject.toml
18+
## We do not list packages that are already declared as install_requires
19+
## in setup.cfg
2020

2121
[packages.e1839a8]
2222
path = "."

src/doc/en/developer/coding_basics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ included in one of the following places:
193193
This practice is deprecated, see :issue:`33037`.
194194

195195
In all cases, the files must be listed (explicitly or via wildcards) in
196-
the section ``[tool.setuptools.package-data]`` of the file
197-
:sage_root:`SAGE_ROOT/pkgs/sagemath-standard/pyproject.toml.m4` (or the corresponding
196+
the section ``options.package_data`` of the file
197+
:sage_root:`pkgs/sagemath-standard/setup.cfg.m4` (or the corresponding
198198
file of another distribution).
199199

200200
Large data files should not be added to the Sage source tree. Instead, it

0 commit comments

Comments
 (0)