Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3c8e54bf
Commit
3c8e54bf
authored
Dec 22, 1998
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied Fred's patch to fix the bugs that John Skaller noticed.
parent
9c30c24b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
Lib/distutils/sysconfig.py
Lib/distutils/sysconfig.py
+14
-6
No files found.
Lib/distutils/sysconfig.py
View file @
3c8e54bf
...
...
@@ -15,6 +15,7 @@ __version__ = "$Revision$"
def
_init_posix
():
import
os
import
re
import
string
import
sys
g
=
globals
()
...
...
@@ -35,10 +36,9 @@ def _init_posix():
m
=
define_rx
.
match
(
line
)
if
m
:
n
,
v
=
m
.
group
(
1
,
2
)
if
v
==
"1"
:
g
[
n
]
=
1
else
:
g
[
n
]
=
v
try
:
v
=
string
.
atoi
(
v
)
except
ValueError
:
pass
g
[
n
]
=
v
else
:
m
=
undef_rx
.
match
(
line
)
if
m
:
...
...
@@ -57,9 +57,12 @@ def _init_posix():
m
=
variable_rx
.
match
(
line
)
if
m
:
n
,
v
=
m
.
group
(
1
,
2
)
v
=
string
.
strip
(
v
)
if
"$"
in
v
:
notdone
[
n
]
=
v
else
:
try
:
v
=
string
.
atoi
(
v
)
except
ValueError
:
pass
done
[
n
]
=
v
# do variable interpolation here
...
...
@@ -79,7 +82,9 @@ def _init_posix():
if "
$
" in after:
notdone[name] = value
else:
done[name] = value
try: value = string.atoi(value)
except ValueError: pass
done[name] = string.strip(value)
del notdone[name]
elif notdone.has_key(n):
# get it on a subsequent round
...
...
@@ -91,9 +96,12 @@ def _init_posix():
if "
$
" in after:
notdone[name] = value
else:
done[name] = value
try: value = string.atoi(value)
except ValueError: pass
done[name] = string.strip(value)
del notdone[name]
else:
# bogus variable reference; just drop it since we can't deal
del notdone[name]
# save the results in the global dictionary
...
...
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