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
027ca182
Commit
027ca182
authored
Jan 07, 2016
by
Steve Kowalik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly merge from default.
parent
337ea160
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
39 deletions
+19
-39
Makefile
Makefile
+5
-6
pkg_resources/__init__.py
pkg_resources/__init__.py
+14
-33
No files found.
Makefile
View file @
027ca182
...
...
@@ -2,11 +2,10 @@ empty:
exit
1
update-vendored
:
rm
-rf
pkg_resources/_vendor/packaging
rm
-rf
pkg_resources/_vendor/pyparsing
pip
install
-r
pkg_resources/_vendor/vendored.txt
-t
pkg_resources/_vendor/
sed
-i
-e
's/ \(pyparsing\)/ pkg_resources._vendor.\1/'
\
pkg_resources/_vendor/packaging/
*
.py
sed
-i
-e
's/ \(six\)/ pkg_resources._vendor.\1/'
\
rm
-rf
pkg_resources/_vendor/packaging
*
rm
-rf
pkg_resources/_vendor/six
*
rm
-rf
pkg_resources/_vendor/pyparsing
*
python3
-m
pip
install
-r
pkg_resources/_vendor/vendored.txt
-t
pkg_resources/_vendor/
sed
-i
-e
's/ \(pyparsing|six\)/ pkg_resources.extern.\1/'
\
pkg_resources/_vendor/packaging/
*
.py
rm
-rf
pkg_resources/_vendor/
*
.
{
egg,dist
}
-info
pkg_resources/__init__.py
View file @
027ca182
...
...
@@ -37,7 +37,6 @@ import plistlib
import
email.parser
import
tempfile
import
textwrap
import
itertools
from
pkgutil
import
get_importer
try
:
...
...
@@ -46,23 +45,8 @@ except ImportError:
# Python 3.2 compatibility
import
imp
as
_imp
PY3
=
sys
.
version_info
>
(
3
,)
PY2
=
not
PY3
if
PY3
:
from
urllib.parse
import
urlparse
,
urlunparse
if
PY2
:
from
urlparse
import
urlparse
,
urlunparse
filter
=
itertools
.
ifilter
map
=
itertools
.
imap
if
PY3
:
string_types
=
str
,
else
:
string_types
=
str
,
eval
(
'unicode'
)
iteritems
=
(
lambda
i
:
i
.
items
())
if
PY3
else
lambda
i
:
i
.
iteritems
()
from
pkg_resources.extern
import
six
from
pkg_resources.extern.six.moves
import
urllib
# capture these to bypass sandboxing
from
os
import
utime
...
...
@@ -87,18 +71,15 @@ try:
except
ImportError
:
pass
try
:
import
pkg_resources._vendor.packaging.version
import
pkg_resources._vendor.packaging.specifiers
import
pkg_resources._vendor.packaging.requirements
import
pkg_resources._vendor.packaging.markers
packaging
=
pkg_resources
.
_vendor
.
packaging
except
ImportError
:
# fallback to naturally-installed version; allows system packagers to
# omit vendored packages.
import
packaging.version
import
packaging.specifiers
from
pkg_resources.extern
import
packaging
__import__
(
'pkg_resources.extern.packaging.version'
)
__import__
(
'pkg_resources.extern.packaging.specifiers'
)
__import__
(
'pkg_resources._vendor.packaging.requirements'
)
__import__
(
'pkg_resources._vendor.packaging.markers'
)
filter
=
six
.
moves
.
filter
map
=
six
.
moves
.
map
if
(
3
,
0
)
<
sys
.
version_info
<
(
3
,
3
):
msg
=
(
...
...
@@ -557,7 +538,7 @@ run_main = run_script
def get_distribution(dist):
"""
Return
a
current
distribution
object
for
a
Requirement
or
string
"""
if isinstance(dist, string_types):
if isinstance(dist, s
ix.s
tring_types):
dist = Requirement.parse(dist)
if isinstance(dist, Requirement):
dist = get_provider(dist)
...
...
@@ -2134,7 +2115,7 @@ def _set_parent_ns(packageName):
def
yield_lines
(
strs
):
"""Yield non-empty/non-comment lines of a string or sequence"""
if
isinstance
(
strs
,
string_types
):
if
isinstance
(
strs
,
s
ix
.
s
tring_types
):
for
s
in
strs
.
splitlines
():
s
=
s
.
strip
()
# skip blank lines/comments
...
...
@@ -2289,9 +2270,9 @@ class EntryPoint(object):
def _remove_md5_fragment(location):
if not location:
return ''
parsed = urlparse(location)
parsed = url
lib.parse.url
parse(location)
if parsed[-1].startswith('
md5
=
'):
return urlunparse(parsed[:-1] + ('',))
return url
lib.parse.url
unparse(parsed[:-1] + ('',))
return location
...
...
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