Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
62a8ee1a
Kaydet (Commit)
62a8ee1a
authored
Kas 23, 2007
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added code to pre-generate makefiles and assembly files to build_ssl.py
Fixed bug #1488 in my way.
üst
5914323c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
19 deletions
+83
-19
_ssl.vcproj
PCbuild9/_ssl.vcproj
+8
-8
build_ssl.py
PCbuild9/build_ssl.py
+56
-11
pginstrument.vsprops
PCbuild9/pginstrument.vsprops
+11
-0
pyd.vsprops
PCbuild9/pyd.vsprops
+4
-0
pyd_d.vsprops
PCbuild9/pyd_d.vsprops
+4
-0
No files found.
PCbuild9/_ssl.vcproj
Dosyayı görüntüle @
62a8ee1a
...
...
@@ -27,7 +27,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"
python.exe build_ssl.py $(ConfigurationName)
$(PlatformName) -a"
CommandLine=
"
cd "$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release
$(PlatformName) -a"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -89,7 +89,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"
python.exe build_ssl.py $(ConfigurationName)
$(PlatformName) -a"
CommandLine=
"
cd "$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release
$(PlatformName) -a"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -153,7 +153,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -216,7 +216,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -280,7 +280,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -343,7 +343,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -408,7 +408,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
@@ -471,7 +471,7 @@
>
<Tool
Name=
"VCPreBuildEventTool"
CommandLine=
"cd
$(SolutionDir)
$(OutDir)python.exe build_ssl.py Release $(PlatformName) -a

"
CommandLine=
"cd
"$(SolutionDir)"
"$(PythonExe)" build_ssl.py Release $(PlatformName) -a
"
/>
<Tool
Name=
"VCCustomBuildTool"
...
...
PCbuild9/build_ssl.py
Dosyayı görüntüle @
62a8ee1a
...
...
@@ -13,6 +13,16 @@
# it should configure and build SSL, then build the _ssl and _hashlib
# Python extensions without intervention.
# Modified by Christian Heimes
# Now this script supports pre-generated makefiles and assembly files.
# Developers don't need an installation of Perl anymore to build Python. A svn
# checkout from our svn repository is enough.
#
# In Order to create the files in the case of an update you still need Perl.
# Run build_ssl in this order:
# python.exe build_ssl.py Release x64
# python.exe build_ssl.py Release Win32
import
os
,
sys
,
re
,
shutil
# Find all "foo.exe" files on the PATH.
...
...
@@ -51,7 +61,6 @@ def find_working_perl(perls):
else
:
print
(
" NO perl interpreters were found on this machine at all!"
)
print
(
" Please install ActivePerl and ensure it appears on your path"
)
print
(
"The Python SSL module was not built"
)
return
None
# Locate the best SSL directory given a few roots to look into.
...
...
@@ -86,8 +95,8 @@ def find_best_ssl_dir(sources):
sys
.
stdout
.
flush
()
return
best_name
def
fix_makefile
(
makefile
,
m32
):
"""
F
ix makefile for 64bit
def
create_makefile64
(
makefile
,
m32
):
"""
Create and f
ix makefile for 64bit
Replace 32 with 64bit directories
"""
...
...
@@ -107,6 +116,23 @@ def fix_makefile(makefile, m32):
fout
.
write
(
line
)
os
.
unlink
(
m32
)
def
fix_makefile
(
makefile
):
"""Fix some stuff in all makefiles
"""
if
not
os
.
path
.
isfile
(
makefile
):
return
with
open
(
makefile
)
as
fin
:
lines
=
fin
.
readlines
()
with
open
(
makefile
,
'w'
)
as
fout
:
for
line
in
lines
:
if
line
.
startswith
(
"PERL="
):
continue
if
line
.
startswith
(
"CP="
):
line
=
"CP=copy
\n
"
if
line
.
startswith
(
"MKDIR="
):
line
=
"MKDIR=mkdir
\n
"
fout
.
write
(
line
)
def
run_configure
(
configure
,
do_script
):
print
(
"perl Configure "
+
configure
)
os
.
system
(
"perl Configure "
+
configure
)
...
...
@@ -146,7 +172,7 @@ def main():
perls
=
find_all_on_path
(
"perl.exe"
,
[
"
\\
perl
\\
bin"
,
"C:
\\
perl
\\
bin"
])
perl
=
find_working_perl
(
perls
)
if
perl
is
None
:
sys
.
exit
(
1
)
print
(
"No Perl installation was found. Existing Makefiles are used."
)
print
(
"Found a working perl at '
%
s'"
%
(
perl
,))
sys
.
stdout
.
flush
()
...
...
@@ -166,6 +192,10 @@ def main():
# Due to a bug in this script, the makefile sometimes ended up empty
# Force a regeneration if it is.
if
not
os
.
path
.
isfile
(
makefile
)
or
os
.
path
.
getsize
(
makefile
)
==
0
:
if
perl
is
None
:
print
(
"Perl is required to build the makefiles!"
)
sys
.
exit
(
1
)
print
(
"Creating the makefiles..."
)
sys
.
stdout
.
flush
()
# Put our working Perl at the front of our path
...
...
@@ -173,16 +203,31 @@ def main():
os
.
pathsep
+
\
os
.
environ
[
"PATH"
]
run_configure
(
configure
,
do_script
)
if
arch
==
"x86"
and
debug
:
# the do_masm script in openssl doesn't generate a debug
# build makefile so we generate it here:
os
.
system
(
"perl util
\
mk1mf.pl debug "
+
configure
+
" >"
+
makefile
)
if
debug
:
print
(
"OpenSSL debug builds aren't supported."
)
#if arch=="x86" and debug:
# # the do_masm script in openssl doesn't generate a debug
# # build makefile so we generate it here:
# os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile)
if
arch
==
"amd64"
:
create_makefile64
(
makefile
,
m32
)
fix_makefile
(
makefile
)
shutil
.
copy
(
r"crypto\buildinf.h"
,
r"crypto\buildinf_
%
s.h"
%
arch
)
shutil
.
copy
(
r"crypto\opensslconf.h"
,
r"crypto\opensslconf_
%
s.h"
%
arch
)
# Now run make.
if
arch
==
"amd64"
:
fix_makefile
(
makefile
,
m32
)
rc
=
os
.
system
(
r"ml64 -c -Foms\uptable.obj ms\uptable.asm"
)
if
rc
:
print
(
"ml64 assembler has failed."
)
sys
.
exit
(
rc
)
# Now run make.
makeCommand
=
"nmake /nologo PERL=
\"
%
s
\"
-f
\"
%
s
\"
"
%
(
perl
,
makefile
)
shutil
.
copy
(
r"crypto\buildinf_
%
s.h"
%
arch
,
r"crypto\buildinf.h"
)
shutil
.
copy
(
r"crypto\opensslconf_
%
s.h"
%
arch
,
r"crypto\opensslconf.h"
)
#makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
makeCommand
=
"nmake /nologo -f
\"
%
s
\"
"
%
makefile
print
(
"Executing ssl makefiles:"
,
makeCommand
)
sys
.
stdout
.
flush
()
rc
=
os
.
system
(
makeCommand
)
...
...
PCbuild9/pginstrument.vsprops
Dosyayı görüntüle @
62a8ee1a
...
...
@@ -8,10 +8,21 @@
>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"3"
InlineFunctionExpansion=
"2"
EnableIntrinsicFunctions=
"true"
FavorSizeOrSpeed=
"1"
OmitFramePointers=
"true"
EnableFiberSafeOptimizations=
"false"
WholeProgramOptimization=
"true"
StringPooling=
"true"
ExceptionHandling=
"0"
BufferSecurityCheck=
"false"
/>
<Tool
Name=
"VCLinkerTool"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
LinkTimeCodeGeneration=
"2"
ProfileGuidedDatabase=
"$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"
ImportLibrary=
"$(OutDirPGI)\$(TargetName).lib"
...
...
PCbuild9/pyd.vsprops
Dosyayı görüntüle @
62a8ee1a
...
...
@@ -20,4 +20,8 @@
Name=
"VCPostBuildEventTool"
CommandLine=
""
/>
<UserMacro
Name=
"PythonExe"
Value=
"$(OutDir)python.exe"
/>
</VisualStudioPropertySheet>
PCbuild9/pyd_d.vsprops
Dosyayı görüntüle @
62a8ee1a
...
...
@@ -24,4 +24,8 @@
Name=
"VCPostBuildEventTool"
CommandLine=
""
/>
<UserMacro
Name=
"PythonExe"
Value=
"$(OutDir)python_d.exe"
/>
</VisualStudioPropertySheet>
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