diff options
author | winbuild <winbuild@example.com> | 2020-01-29 20:54:26 -0500 |
---|---|---|
committer | winbuild <winbuild@example.com> | 2020-01-29 20:54:26 -0500 |
commit | 3de5d73b6eefdd13a0b081dd6d803f0975f83609 (patch) | |
tree | 281a3020f6b53163674cfd7f0650c9bdfaa7a67c /winbuild | |
parent | 92568408ae363731c24228bcd16a8112e8c8cc09 (diff) | |
download | pycurl-3de5d73b6eefdd13a0b081dd6d803f0975f83609.tar.gz |
pycurl build
Diffstat (limited to 'winbuild')
-rw-r--r-- | winbuild/pycurl.py | 17 | ||||
-rw-r--r-- | winbuild/pythons.py | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/winbuild/pycurl.py b/winbuild/pycurl.py index b87aeb1..f2a9405 100644 --- a/winbuild/pycurl.py +++ b/winbuild/pycurl.py @@ -1,6 +1,7 @@ import os.path, shutil, zipfile from .builder import * from .utils import * +from .curl import * class PycurlBuilder(Builder): def __init__(self, **kwargs): @@ -11,8 +12,8 @@ class PycurlBuilder(Builder): @property def python_path(self): - if config.build_wheels: - python_path = os.path.join(config.archives_path, 'venv-%s-%s' % (self.python_release, self.bconf.bitness), 'scripts', 'python') + if self.bconf.build_wheels: + python_path = os.path.join(self.bconf.archives_path, 'venv-%s-%s' % (self.python_release, self.bconf.bitness), 'scripts', 'python') else: python_path = PythonBinary(self.python_release, self.bconf.bitness).executable_path return python_path @@ -46,16 +47,16 @@ class PycurlBuilder(Builder): libcurl_arg = '--libcurl-lib-name=libcurl_a.lib' if self.bconf.use_openssl: libcurl_arg += ' --with-openssl' - if config.openssl_version_tuple >= (1, 1): + if self.bconf.openssl_version_tuple >= (1, 1): libcurl_arg += ' --openssl-lib-name=""' openssl_builder = OpensslBuilder(bconf=self.bconf) b.add("set include=%%include%%;%s" % openssl_builder.include_path) b.add("set lib=%%lib%%;%s" % openssl_builder.lib_path) #if build_wheels: #b.add("call %s" % os.path.join('..', 'venv-%s-%s' % (self.python_release, self.bconf.bitness), 'Scripts', 'activate')) - if config.build_wheels: + if self.bconf.build_wheels: targets = targets + ['bdist_wheel'] - if config.libcurl_version_tuple >= (7, 60, 0): + if self.bconf.libcurl_version_tuple >= (7, 60, 0): # As of 7.60.0 libcurl does not include its dependencies into # its static libraries. # libcurl_a.lib in 7.59.0 is 30 mb. @@ -87,7 +88,7 @@ class PycurlBuilder(Builder): if self.bconf.use_nghttp2: nghttp2_builder = Nghttp2Builder(bconf=self.bconf) libcurl_arg += ' --link-arg=/LIBPATH:%s' % nghttp2_builder.lib_path - libcurl_arg += ' --link-arg=nghttp2.lib' + libcurl_arg += ' --link-arg=nghttp2_static.lib' if self.bconf.vc_version == 'vc9': # this is for normaliz.lib libcurl_builder = LibcurlBuilder(bconf=self.bconf) @@ -98,7 +99,9 @@ class PycurlBuilder(Builder): libcurl_arg += ' --link-arg=user32.lib' b.add("%s setup.py %s --curl-dir=%s %s" % ( self.python_path, ' '.join(targets), libcurl_dir, libcurl_arg)) - if 'bdist' in targets: + # Fixing of bizarre paths in created zip archives, + # no longer relevant because we only keep wheels + if False and 'bdist' in targets: zip_basename_orig = 'pycurl-%s.%s.zip' % ( self.bconf.pycurl_version, self.platform_indicator) zip_basename_new = 'pycurl-%s.%s-py%s.zip' % ( diff --git a/winbuild/pythons.py b/winbuild/pythons.py index 3d959fd..1533f27 100644 --- a/winbuild/pythons.py +++ b/winbuild/pythons.py @@ -14,8 +14,7 @@ class PythonBinary(object): self.python_release = python_release self.bitness = bitness - @property - def executable_path(self): + def executable_path(self, config): return config.python_path_template % dict( python_release=self.python_release.dotless, bitness=self.bitness) |