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
f3829d8b
Commit
f3829d8b
authored
Jul 05, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use numbers.Number to detect numeric type
parent
b8865685
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
setuptools/compat.py
setuptools/compat.py
+0
-2
setuptools/dist.py
setuptools/dist.py
+3
-2
No files found.
setuptools/compat.py
View file @
f3829d8b
...
...
@@ -23,7 +23,6 @@ if PY2:
long_type
=
long
maxsize
=
sys
.
maxint
next
=
lambda
o
:
o
.
next
()
numeric_types
=
(
int
,
long
,
float
)
unichr
=
unichr
unicode
=
unicode
bytes
=
str
...
...
@@ -52,7 +51,6 @@ if PY3:
long_type
=
int
maxsize
=
sys
.
maxsize
next
=
next
numeric_types
=
(
int
,
float
)
unichr
=
chr
unicode
=
str
bytes
=
bytes
...
...
setuptools/dist.py
View file @
f3829d8b
...
...
@@ -4,6 +4,7 @@ import re
import
os
import
sys
import
warnings
import
numbers
import
distutils.log
import
distutils.core
import
distutils.cmd
...
...
@@ -13,7 +14,7 @@ from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
DistutilsSetupError
)
from
setuptools.depends
import
Require
from
setuptools.compat
import
numeric_types
,
basestring
,
PY2
from
setuptools.compat
import
basestring
,
PY2
import
pkg_resources
def
_get_unpatched
(
cls
):
...
...
@@ -263,7 +264,7 @@ class Distribution(_Distribution):
if not hasattr(self,ep.name):
setattr(self,ep.name,None)
_Distribution.__init__(self,attrs)
if isinstance(self.metadata.version, num
eric_types
):
if isinstance(self.metadata.version, num
bers.Number
):
# Some people apparently take "version number" too literally :)
self.metadata.version = str(self.metadata.version)
...
...
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