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
2efa19d2
Commit
2efa19d2
authored
Feb 10, 2018
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delint
parent
9a66194a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
7 deletions
+31
-7
pkg_resources/__init__.py
pkg_resources/__init__.py
+31
-7
No files found.
pkg_resources/__init__.py
View file @
2efa19d2
...
...
@@ -90,6 +90,21 @@ if six.PY2:
# satisfy the linters.
require
=
None
working_set
=
None
add_activation_listener
=
None
resources_stream
=
None
cleanup_resources
=
None
resource_dir
=
None
resource_stream
=
None
set_extraction_path
=
None
resource_isdir
=
None
resource_string
=
None
iter_entry_points
=
None
resource_listdir
=
None
resource_filename
=
None
resource_exists
=
None
_distribution_finders
=
None
_namespace_handlers
=
None
_namespace_packages
=
None
class
PEP440Warning
(
RuntimeWarning
):
...
...
@@ -1074,9 +1089,12 @@ class Environment(object):
requirements
specified
when
this
environment
was
created
,
or
False
is
returned
.
"""
return (self.python is None or dist.py_version is None
or dist.py_version == self.python)
\
and compatible_platforms(dist.platform, self.platform)
py_compat = (
self.python is None
or dist.py_version is None
or dist.py_version == self.python
)
return py_compat and compatible_platforms(dist.platform, self.platform)
def remove(self, dist):
"""
Remove
`dist`
from
the
environment
"""
...
...
@@ -1621,11 +1639,16 @@ DefaultProvider._register()
class EmptyProvider(NullProvider):
"""
Provider
that
returns
nothing
for
all
requests
"""
_isdir = _has = lambda self, path: False
_get = lambda self, path: ''
_listdir = lambda self, path: []
module_path = None
_isdir = _has = lambda self, path: False
def _get(self, path):
return ''
def _listdir(self, path):
return []
def __init__(self):
pass
...
...
@@ -2515,7 +2538,8 @@ def _version_from_file(lines):
Given
an
iterable
of
lines
from
a
Metadata
file
,
return
the
value
of
the
Version
field
,
if
present
,
or
None
otherwise
.
"""
is_version_line = lambda line: line.lower().startswith('version:')
def is_version_line(line):
return line.lower().startswith('version:')
version_lines = filter(is_version_line, lines)
line = next(iter(version_lines), '')
_, _, value = line.partition(':')
...
...
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