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
02a2d475
Commit
02a2d475
authored
Dec 08, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove compatibility functions for platform information.
parent
5dfdad23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
pkg_resources.py
pkg_resources.py
+4
-20
No files found.
pkg_resources.py
View file @
02a2d475
...
...
@@ -27,6 +27,7 @@ import pkgutil
import
token
import
symbol
import
operator
import
platform
from
pkgutil
import
get_importer
try
:
...
...
@@ -1106,23 +1107,6 @@ def to_filename(name):
"""
return name.replace('-','_')
def _platinfo(attr):
try:
import platform
except ImportError:
return ''
return getattr(platform, attr, lambda:'')()
def _pyimp():
if sys.platform=='cli':
return 'IronPython'
elif sys.platform.startswith('java'):
return 'Jython'
elif '__pypy__' in sys.builtin_module_names:
return 'PyPy'
else:
return 'CPython'
class MarkerEvaluation(object):
values = {
...
...
@@ -1130,9 +1114,9 @@ class MarkerEvaluation(object):
'sys_platform': lambda: sys.platform,
'python_full_version': lambda: sys.version.split()[0],
'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]),
'platform_version':
lambda: _platinfo('version')
,
'platform_machine':
lambda: _platinfo('machine')
,
'python_implementation':
lambda: _platinfo('python_implementation') or _pyimp()
,
'platform_version':
platform.version
,
'platform_machine':
platform.machine
,
'python_implementation':
platform.python_implementation
,
}
@classmethod
...
...
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