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
207c4b68
Commit
207c4b68
authored
May 18, 2012
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.2 build_ssl changes.
parents
d7be3047
e9dfb0f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
33 deletions
+9
-33
PCbuild/build_ssl.py
PCbuild/build_ssl.py
+9
-33
No files found.
PCbuild/build_ssl.py
View file @
207c4b68
...
@@ -46,7 +46,7 @@ def find_all_on_path(filename, extras = None):
...
@@ -46,7 +46,7 @@ def find_all_on_path(filename, extras = None):
# is available.
# is available.
def
find_working_perl
(
perls
):
def
find_working_perl
(
perls
):
for
perl
in
perls
:
for
perl
in
perls
:
fh
=
os
.
popen
(
'"
%s" -e "use Win32;
"'
%
perl
)
fh
=
os
.
popen
(
'"
"%s" -e "use Win32;"
"'
%
perl
)
fh
.
read
()
fh
.
read
()
rc
=
fh
.
close
()
rc
=
fh
.
close
()
if
rc
:
if
rc
:
...
@@ -63,37 +63,13 @@ def find_working_perl(perls):
...
@@ -63,37 +63,13 @@ def find_working_perl(perls):
print
(
" Please install ActivePerl and ensure it appears on your path"
)
print
(
" Please install ActivePerl and ensure it appears on your path"
)
return
None
return
None
# Locate the best SSL directory given a few roots to look into.
# Fetch SSL directory from VC properties
def
find_best_ssl_dir
(
sources
):
def
get_ssl_dir
():
candidates
=
[]
propfile
=
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'pyproject.vsprops'
))
for
s
in
sources
:
with
open
(
propfile
)
as
f
:
try
:
m
=
re
.
search
(
'openssl-([^"]+)"'
,
f
.
read
())
# note: do not abspath s; the build will fail if any
return
"..
\
..
\
openssl-"
+
m
.
group
(
1
)
# higher up directory name has spaces in it.
fnames
=
os
.
listdir
(
s
)
except
os
.
error
:
fnames
=
[]
for
fname
in
fnames
:
fqn
=
os
.
path
.
join
(
s
,
fname
)
if
os
.
path
.
isdir
(
fqn
)
and
fname
.
startswith
(
"openssl-"
):
candidates
.
append
(
fqn
)
# Now we have all the candidates, locate the best.
best_parts
=
[]
best_name
=
None
for
c
in
candidates
:
parts
=
re
.
split
(
"[.-]"
,
os
.
path
.
basename
(
c
))[
1
:]
# eg - openssl-0.9.7-beta1 - ignore all "beta" or any other qualifiers
if
len
(
parts
)
>=
4
:
continue
if
parts
>
best_parts
:
best_parts
=
parts
best_name
=
c
if
best_name
is
not
None
:
print
(
"Found an SSL directory at '%s'"
%
(
best_name
,))
else
:
print
(
"Could not find an SSL directory in '%s'"
%
(
sources
,))
sys
.
stdout
.
flush
()
return
best_name
def
create_makefile64
(
makefile
,
m32
):
def
create_makefile64
(
makefile
,
m32
):
"""Create and fix makefile for 64bit
"""Create and fix makefile for 64bit
...
@@ -202,7 +178,7 @@ def main():
...
@@ -202,7 +178,7 @@ def main():
print
(
"No Perl installation was found. Existing Makefiles are used."
)
print
(
"No Perl installation was found. Existing Makefiles are used."
)
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
# Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
# Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
ssl_dir
=
find_best_ssl_dir
((
"..
\
\
.."
,)
)
ssl_dir
=
get_ssl_dir
(
)
if
ssl_dir
is
None
:
if
ssl_dir
is
None
:
sys
.
exit
(
1
)
sys
.
exit
(
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