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
83c7d77a
Commit
83c7d77a
authored
Aug 20, 2018
by
Paul Moore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP 517 hook arguments are unicode, not str (and distutils objects to that)
parent
d63b6b5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
setuptools/build_meta.py
setuptools/build_meta.py
+14
-1
No files found.
setuptools/build_meta.py
View file @
83c7d77a
...
@@ -61,6 +61,19 @@ class Distribution(setuptools.dist.Distribution):
...
@@ -61,6 +61,19 @@ class Distribution(setuptools.dist.Distribution):
distutils
.
core
.
Distribution
=
orig
distutils
.
core
.
Distribution
=
orig
def
_to_str
(
s
):
"""
Convert a filename to a string (on Python 2, explicitly
a byte string, not Unicode) as distutils checks for the
exact type str.
"""
if
sys
.
version_info
[
0
]
==
2
and
not
isinstance
(
s
,
str
):
# Assume it's Unicode, as that's what the PEP says
# should be provided.
return
s
.
encode
(
sys
.
getfilesystemencoding
())
return
s
def
_run_setup
(
setup_script
=
'setup.py'
):
def
_run_setup
(
setup_script
=
'setup.py'
):
# Note that we can reuse our build directory between calls
# Note that we can reuse our build directory between calls
# Correctness comes first, then optimization later
# Correctness comes first, then optimization later
...
@@ -109,7 +122,7 @@ def get_requires_for_build_sdist(config_settings=None):
...
@@ -109,7 +122,7 @@ def get_requires_for_build_sdist(config_settings=None):
def
prepare_metadata_for_build_wheel
(
metadata_directory
,
config_settings
=
None
):
def
prepare_metadata_for_build_wheel
(
metadata_directory
,
config_settings
=
None
):
sys
.
argv
=
sys
.
argv
[:
1
]
+
[
'dist_info'
,
'--egg-base'
,
metadata_directory
]
sys
.
argv
=
sys
.
argv
[:
1
]
+
[
'dist_info'
,
'--egg-base'
,
_to_str
(
metadata_directory
)
]
_run_setup
()
_run_setup
()
dist_info_directory
=
metadata_directory
dist_info_directory
=
metadata_directory
...
...
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