sage_setup: Replace imports from distutils by setuptools
mkoeppe opened this issue · 28 comments
... in anticipation of the distutils deprecation (https://www.python.org/dev/peps/pep-0632/)
From https://setuptools.readthedocs.io/en/latest/deprecated/distutils-legacy.html
distutils.core.setup→setuptools.setupdistutils.cmd.Command→setuptools.Commanddistutils.log→(no replacement yet)distutils.version.*→packaging.version.*
"If a project relies on uses of distutils that do not have a suitable replacement above, please search the Setuptools issue tracker and file a request, describing the use-case so that Setuptools’ maintainers can investigate."
Part of #31295 (Meta-ticket: Replace imports from deprecated distutils)
CC: @jhpalmieri @kiwifb @kliem
Component: build
Author: Frédéric Chapoton, Matthias Koeppe
Branch/Commit: 25b877c
Reviewer: Matthias Koeppe, John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/30984
Description changed:
---
+++
@@ -1 +1 @@
-... in anticipation of the `distutils` deprecation
+... in anticipation of the `distutils` deprecation (https://www.python.org/dev/peps/pep-0632/)Description changed:
---
+++
@@ -1 +1,15 @@
... in anticipation of the `distutils` deprecation (https://www.python.org/dev/peps/pep-0632/)
+
+From https://setuptools.readthedocs.io/en/latest/deprecated/distutils-legacy.html
+
+- `distutils.core.setup` → `setuptools.setup`
+
+- `distutils.cmd.Command` → `setuptools.Command`
+
+- `distutils.log` → `(no replacement yet)`
+
+- `distutils.version.*` → `packaging.version.*`
+
+"If a project relies on uses of distutils that do not have a suitable replacement above, please search the Setuptools issue tracker and file a request, describing the use-case so that Setuptools’ maintainers can investigate."
+
+Branch: public/distutils_to_setuptools
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
a29d068 | start replacing distutils by setuptools |
Author: Frédéric Chapoton
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
673f99c | start replacing distutils by setuptools |
Changed author from Frédéric Chapoton to Frédéric Chapoton, Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
2c40179 | build/pkgs/sagelib/src: Update metadata |
2a91862 | build/pkgs/sagelib/src/README.rst: Add some text |
6432727 | Merge tag '9.3.beta2' into t/30912/sagelib__update_metadata_for_pypi_deployment |
4a693f2 | Move build/pkgs/sagelib/src/setup.cfg to SAGE_ROOT/src, replace by symlink |
ea182d7 | Copy changes from build/pkgs/sagelib/src to src |
a1a10b9 | src/VERSION.txt: New |
5697335 | src/setup.cfg: Add license_file=LICENSE.txt |
deb9eb3 | Merge tag '9.3.beta3' into t/30912/sagelib__update_metadata_for_pypi_deployment |
7ad4c0e | Merge tag '9.3.beta4' into t/30912/sagelib__update_metadata_for_pypi_deployment |
3ab5982 | Merge branch 't/30912/sagelib__update_metadata_for_pypi_deployment' into t/30984/public/distutils_to_setuptools |
Description changed:
---
+++
@@ -3,11 +3,8 @@
From https://setuptools.readthedocs.io/en/latest/deprecated/distutils-legacy.html
- `distutils.core.setup` → `setuptools.setup`
-
- `distutils.cmd.Command` → `setuptools.Command`
-
- `distutils.log` → `(no replacement yet)`
-
- `distutils.version.*` → `packaging.version.*`
"If a project relies on uses of distutils that do not have a suitable replacement above, please search the Setuptools issue tracker and file a request, describing the use-case so that Setuptools’ maintainers can investigate."Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Branch pushed to git repo; I updated commit sha1. New commits:
25b877c | sage_setup.command.build_ext: Use class from setuptools.command instead of distutils.command |
Reviewer: Matthias Koeppe, ...
This works for me when building Sage and when upgrading sagelib from 9.3.beta6 to 9.3.beta7, or from building the develop branch to building this one. What else should I test?
I've used it for a while now, I wouldn't know what else to test either.
The title shows that the ticket is very specific, are there other tickets I have missed for:
- setup.py
- sage/misc/cython.py
- sage/env.py
- documentation mentioning distutils specifically
Description changed:
---
+++
@@ -9,4 +9,5 @@
"If a project relies on uses of distutils that do not have a suitable replacement above, please search the Setuptools issue tracker and file a request, describing the use-case so that Setuptools’ maintainers can investigate."
+Part of #31295 (Meta-ticket: Replace imports from deprecated distutils)
Changed reviewer from Matthias Koeppe, ... to Matthias Koeppe, John Palmieri
Thank you!
Changed branch from public/distutils_to_setuptools to 25b877c