[pypy-commit] pypy default: update windows build to link openssl, expat, zlib statically (cpython compatability)
mattip
noreply at buildbot.pypy.org
Fri Aug 22 09:05:05 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r72956:74d521ec9314
Date: 2014-08-22 10:04 +0300
http://bitbucket.org/pypy/pypy/changeset/74d521ec9314/
Log: update windows build to link openssl, expat, zlib statically
(cpython compatability) update instructions and buildbot to openssl
1.0.1h
diff --git a/pypy/doc/windows.rst b/pypy/doc/windows.rst
--- a/pypy/doc/windows.rst
+++ b/pypy/doc/windows.rst
@@ -37,7 +37,7 @@
using a 32 bit Python and vice versa. By default pypy is built using the
Multi-threaded DLL (/MD) runtime environment.
-**Note:** PyPy is currently not supported for 64 bit Windows, and translation
+**Note:** PyPy is currently not supported for 64 bit Python, and translation
will fail in this case.
Python and a C compiler are all you need to build pypy, but it will miss some
@@ -136,7 +136,7 @@
cd zlib-1.2.3
nmake -f win32\Makefile.msc
- copy zlib1.lib <somewhere in LIB>
+ copy zlib.lib <somewhere in LIB>
copy zlib.h zconf.h <somewhere in INCLUDE>
The bz2 compression library
@@ -165,27 +165,29 @@
directory. Version 2.1.0 is known to pass tests. Then open the project
file ``expat.dsw`` with Visual
Studio; follow the instruction for converting the project files,
-switch to the "Release" configuration, reconfigure the runtime for
-Multi-threaded DLL (/MD) and build the solution (the ``expat`` project
-is actually enough for pypy).
+switch to the "Release" configuration, use the ``expat_static`` project,
+reconfigure the runtime for Multi-threaded DLL (/MD) and build.
-Then, copy the file ``win32\bin\release\libexpat.dll`` somewhere in
-your PATH, ``win32\bin\release\libexpat.lib`` somewhere in LIB, and
-both ``lib\expat.h`` and ``lib\expat_external.h`` somewhere in INCLUDE.
+Then, copy the file ``win32\bin\release\libexpat.lib`` somewhere in
+somewhere in LIB, and both ``lib\expat.h`` and ``lib\expat_external.h``
+somewhere in INCLUDE.
The OpenSSL library
~~~~~~~~~~~~~~~~~~~
-OpenSSL needs a Perl interpreter to configure its makefile. You may
-use the one distributed by ActiveState, or the one from cygwin. In
-both case the perl interpreter must be found on the PATH.
+OpenSSL is complicated to build. CPython uses a build script, since we
+strive for cpython compatability this script is the easiest way to get the
+correct version and build options. As of CPython 3.4, the script is available
+at http://hg.python.org/cpython/file/30e8a8f22a2a/PCbuild/build_ssl.py
- svn export http://svn.python.org/projects/external/openssl-0.9.8y
- cd openssl-0.9.8y
- perl Configure VC-WIN32
- ms\do_ms.bat
- nmake -f ms\nt.mak install
+ svn export http://svn.python.org/projects/external/openssl-1.0.1h
+ cd openssl-1.0.1h
+ python build_ssl.py Release Win32
+Then, copy the files ``out32\*.lib`` somewhere in
+somewhere in LIB, and the entire ``include\openssl`` directory as-is somewhere
+in INCLUDE.
+
TkInter module support
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/pypy/module/pyexpat/interp_pyexpat.py b/pypy/module/pyexpat/interp_pyexpat.py
--- a/pypy/module/pyexpat/interp_pyexpat.py
+++ b/pypy/module/pyexpat/interp_pyexpat.py
@@ -14,13 +14,16 @@
if sys.platform == "win32":
libname = 'libexpat'
+ pre_include_bits = ["#define XML_STATIC"]
else:
libname = 'expat'
+ pre_include_bits = []
eci = ExternalCompilationInfo(
libraries=[libname],
library_dirs=platform.preprocess_library_dirs([]),
includes=['expat.h'],
include_dirs=platform.preprocess_include_dirs([]),
+ pre_include_bits = pre_include_bits,
)
eci = rffi_platform.configure_external_library(
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -164,8 +164,7 @@
if sys.platform == 'win32':
# Can't rename a DLL: it is always called 'libpypy-c.dll'
- win_extras = ['libpypy-c.dll', 'libexpat.dll', 'sqlite3.dll',
- 'libeay32.dll', 'ssleay32.dll']
+ win_extras = ['libpypy-c.dll', 'sqlite3.dll']
if not options.no_tk:
win_extras += ['tcl85.dll', 'tk85.dll']
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -8,7 +8,7 @@
if sys.platform == 'win32' and platform.name != 'mingw32':
- libraries = ['libeay32', 'ssleay32', 'zlib1',
+ libraries = ['libeay32', 'ssleay32', 'zlib',
'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32']
includes = [
# ssl.h includes winsock.h, which will conflict with our own
diff --git a/rpython/rlib/rzlib.py b/rpython/rlib/rzlib.py
--- a/rpython/rlib/rzlib.py
+++ b/rpython/rlib/rzlib.py
@@ -12,12 +12,15 @@
if compiler.name == "msvc":
- libname = 'zlib1' # since version 1.1.4 and later, see http://www.zlib.net/DLL_FAQ.txt
+ libname = 'zlib' # use the static lib, not zlib1 which is dll import lib
+ testonly_libraries = ['zlib1']
else:
libname = 'z'
+ testonly_libraries = []
eci = ExternalCompilationInfo(
libraries=[libname],
- includes=['zlib.h']
+ includes=['zlib.h'],
+ testonly_libraries = testonly_libraries
)
try:
eci = rffi_platform.configure_external_library(
More information about the pypy-commit
mailing list