Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb1f1ac

Browse files
committed
Use distutils provided by setuptools
The distutils module provided by the stdlib has been deprecated inPython 3.10. This PR sets an env var that is read by setuptools whichwill shim its vendored copy of distutils if present avoiding a failureonce distutils is removed from the stdlib.Signed-off-by: Jordan Borean <jborean93@gmail.com>
1 parent2bde020 commitfb1f1ac

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎setup.py‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/usr/bin/env python
22
from __future__importprint_function
33

4-
fromsetuptoolsimportsetup
5-
fromsetuptoolsimportDistribution
6-
fromsetuptools.command.sdistimportsdist
7-
fromsetuptools.extensionimportExtension
84
importsubprocess
95
importplatform
106
importre
@@ -13,6 +9,17 @@
139
importshutil
1410
importshlex
1511

12+
# Enables the vendored distutils in setuptools over the stdlib one to avoid
13+
# the deprecation warning. Must be done before importing setuptools,
14+
# setuptools also must be imported before distutils.
15+
# https://github.com/pypa/setuptools/blob/main/docs/deprecated/distutils-legacy.rst
16+
os.environ['SETUPTOOLS_USE_DISTUTILS']='local'
17+
18+
fromsetuptoolsimportsetup# noqa: E402
19+
fromsetuptoolsimportDistribution# noqa: E402
20+
fromsetuptools.command.sdistimportsdist# noqa: E402
21+
fromsetuptools.extensionimportExtension# noqa: E402
22+
1623

1724
SKIP_CYTHON_FILE='__dont_use_cython__.txt'
1825

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp