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
91b2c138
Commit
91b2c138
authored
6 years ago
by
Jason R. Coombs
Committed by
GitHub
6 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1301 from pganssle/unpatch_write_pkg_info
Stop patching write_pkg_info
parents
76f1da96
a0723a66
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
setuptools/dist.py
setuptools/dist.py
+0
-9
setuptools/monkey.py
setuptools/monkey.py
+0
-16
No files found.
setuptools/dist.py
View file @
91b2c138
...
...
@@ -123,15 +123,6 @@ def write_pkg_file(self, file):
file
.
write
(
'Provides-Extra: %s
\
n
'
%
extra
)
# from Python 3.4
def
write_pkg_info
(
self
,
base_dir
):
"""Write the PKG-INFO file into the release tree.
"""
with
open
(
os
.
path
.
join
(
base_dir
,
'PKG-INFO'
),
'w'
,
encoding
=
'UTF-8'
)
as
pkg_info
:
self
.
write_pkg_file
(
pkg_info
)
sequence
=
tuple
,
list
...
...
This diff is collapsed.
Click to expand it.
setuptools/monkey.py
View file @
91b2c138
...
...
@@ -87,7 +87,6 @@ def patch_all():
distutils
.
config
.
PyPIRCCommand
.
DEFAULT_REPOSITORY
=
warehouse
_patch_distribution_metadata_write_pkg_file
()
_patch_distribution_metadata_write_pkg_info
()
# Install Distribution throughout the distutils
for
module
in
distutils
.
dist
,
distutils
.
core
,
distutils
.
cmd
:
...
...
@@ -111,21 +110,6 @@ def _patch_distribution_metadata_write_pkg_file():
)
def
_patch_distribution_metadata_write_pkg_info
():
"""
Workaround issue #197 - Python 3 prior to 3.2.2 uses an environment-local
encoding to save the pkg_info. Monkey-patch its write_pkg_info method to
correct this undesirable behavior.
"""
environment_local
=
(
3
,)
<=
sys
.
version_info
[:
3
]
<
(
3
,
2
,
2
)
if
not
environment_local
:
return
distutils
.
dist
.
DistributionMetadata
.
write_pkg_info
=
(
setuptools
.
dist
.
write_pkg_info
)
def
patch_func
(
replacement
,
target_mod
,
func_name
):
"""
Patch func_name in target_mod with replacement
...
...
This diff is collapsed.
Click to expand it.
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