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

python distutils stdlib module deprecation #17

Open
emollier opened this issue Nov 18, 2024 · 0 comments
Open

python distutils stdlib module deprecation #17

emollier opened this issue Nov 18, 2024 · 0 comments

Comments

@emollier
Copy link

Hi,

When wrapping py2bit 0.3.2 for Debian sid, lintian flagged a use of distutils in setup.py. Looking at PEP 632, it is deprecated since Python 3.10, and the contemporary use for importing sysconfig is to use the bare module. I prepared a patch to implement the approach recommended by the PEP, but perhaps a longer term approach would be to move to pyproject.toml instead:

--- python-py2bit.orig/setup.py
+++ python-py2bit/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 from setuptools import setup, Extension, find_packages
-from distutils import sysconfig
+import sysconfig
 import subprocess
 import glob
 import sys

Feel free to use whichever approach seems best fit.

In hope this helps,
Étienne.

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

No branches or pull requests

1 participant