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
31bfd423
Commit
31bfd423
authored
Feb 09, 2001
by
Eric S. Raymond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
String method conversion.
parent
877b037a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
cygwinccompiler.py
cygwinccompiler.py
+3
-3
extension.py
extension.py
+2
-2
version.py
version.py
+5
-5
No files found.
cygwinccompiler.py
View file @
31bfd423
...
...
@@ -365,10 +365,10 @@ def check_config_h():
# "config.h" check -- should probably be renamed...
from
distutils
import
sysconfig
import
s
tring
,
s
ys
import
sys
# if sys.version contains GCC then python was compiled with
# GCC, and the config.h file should be OK
if
s
tring
.
find
(
sys
.
version
,
"GCC"
)
>=
0
:
if
s
ys
.
version
.
find
(
"GCC"
)
>=
0
:
return
(
CONFIG_H_OK
,
"sys.version mentions 'GCC'"
)
fn
=
sysconfig
.
get_config_h_filename
()
...
...
@@ -387,7 +387,7 @@ def check_config_h():
else
:
# "config.h" contains an "#ifdef __GNUC__" or something similar
if
s
tring
.
find
(
s
,
"__GNUC__"
)
>=
0
:
if
s
.
find
(
"__GNUC__"
)
>=
0
:
return
(
CONFIG_H_OK
,
"'%s' mentions '__GNUC__'"
%
fn
)
else
:
return
(
CONFIG_H_NOTOK
,
"'%s' does not mention '__GNUC__'"
%
fn
)
...
...
extension.py
View file @
31bfd423
...
...
@@ -7,7 +7,7 @@ modules in setup scripts."""
__revision__
=
"$Id$"
import
os
,
string
import
os
from
types
import
*
...
...
@@ -168,7 +168,7 @@ def read_setup_file (filename):
elif
switch
==
"-I"
:
ext
.
include_dirs
.
append
(
value
)
elif
switch
==
"-D"
:
equals
=
string
.
find
(
value
,
"="
)
equals
=
value
.
find
(
"="
)
if
equals
==
-
1
:
# bare "-DFOO" -- no value
ext
.
define_macros
.
append
((
value
,
None
))
else
:
# "-DFOO=blah"
...
...
version.py
View file @
31bfd423
...
...
@@ -112,12 +112,12 @@ class StrictVersion (Version):
match.group(1, 2, 4, 5, 6)
if patch:
self.version = tuple(map(
string.atoi
, [major, minor, patch]))
self.version = tuple(map(
int
, [major, minor, patch]))
else:
self.version = tuple(map(
string.atoi
, [major, minor]) + [0])
self.version = tuple(map(
int
, [major, minor]) + [0])
if prerelease:
self.prerelease = (prerelease[0],
string.atoi
(prerelease_num))
self.prerelease = (prerelease[0],
int
(prerelease_num))
else:
self.prerelease = None
...
...
@@ -125,9 +125,9 @@ class StrictVersion (Version):
def __str__ (self):
if self.version[2] == 0:
vstring =
string.join(map(str, self.version[0:2]), '
.
'
)
vstring =
'
.
'.join(map(str, self.version[0:2])
)
else:
vstring =
string.join(map(str, self.version), '
.
'
)
vstring =
'
.
'.join(map(str, self.version)
)
if self.prerelease:
vstring = vstring + self.prerelease[0] + str(self.prerelease[1])
...
...
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