Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
97a8f11a
Commit
97a8f11a
authored
Sep 01, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore pythonlib support on older Pythons. Fixes pypa/distutils#9.
parent
5ab258b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
distutils/command/build_ext.py
distutils/command/build_ext.py
+2
-1
distutils/command/py37compat.py
distutils/command/py37compat.py
+30
-0
No files found.
distutils/command/build_ext.py
View file @
97a8f11a
...
...
@@ -16,6 +16,7 @@ from distutils.dep_util import newer_group
from
distutils.extension
import
Extension
from
distutils.util
import
get_platform
from
distutils
import
log
from
.
import
py37compat
from
site
import
USER_BASE
...
...
@@ -751,4 +752,4 @@ class build_ext(Command):
ldversion
=
get_config_var
(
'LDVERSION'
)
return
ext
.
libraries
+
[
'python'
+
ldversion
]
return
ext
.
libraries
return
ext
.
libraries
+
py37compat
.
pythonlib
()
distutils/command/py37compat.py
0 → 100644
View file @
97a8f11a
import
sys
def
_pythonlib_compat
():
"""
On Python 3.7 and earlier, distutils would include the Python
library. See pypa/distutils#9.
"""
from
distutils
import
sysconfig
if
not
sysconfig
.
get_config_var
(
'Py_ENABLED_SHARED'
):
return
yield
'python{}.{}{}'
.
format
(
sys
.
hexversion
>>
24
,
(
sys
.
hexversion
>>
16
)
&
0xff
,
sysconfig
.
get_config_var
(
'ABIFLAGS'
),
)
def
compose
(
f1
,
f2
):
return
lambda
*
args
,
**
kwargs
:
f1
(
f2
(
*
args
,
**
kwargs
))
pythonlib
=
(
compose
(
list
,
_pythonlib_compat
)
if
sys
.
version_info
<
(
3
,
8
)
and
sys
.
platform
!=
'darwin'
and
sys
.
platform
[:
3
]
!=
'aix'
else
list
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment