diff options
-rw-r--r-- | winbuild.py | 5 | ||||
-rw-r--r-- | winbuild/nghttp_cmake.py (renamed from winbuild/nghttp.py) | 0 | ||||
-rw-r--r-- | winbuild/nghttp_gmake.py | 22 | ||||
-rw-r--r-- | winbuild/utils.py | 2 |
4 files changed, 26 insertions, 3 deletions
diff --git a/winbuild.py b/winbuild.py index d679ab5..57d66af 100644 --- a/winbuild.py +++ b/winbuild.py @@ -30,7 +30,8 @@ # although it now requires registration to download thus using a third party download site may be preferable. # 8. Download and install nasm: https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D # (homepage: http://www.nasm.us/) -# 9. Download and install cmake: https://cmake.org/download/ +# 9a. Download and install cmake: https://cmake.org/download/ +# 9b. Download and install gmake: http://gnuwin32.sourceforge.net/packages/make.htm # 10. Run `python winbuild.py builddeps` to compile all dependencies for all environments (32/64 bit and python versions). # 11. Run `python winbuild.py` to compile pycurl in all defined configurations. @@ -127,7 +128,7 @@ import os, os.path, sys, subprocess, shutil, contextlib, zipfile, re from winbuild.utils import * from winbuild.config import * from winbuild.builder import * -from winbuild.nghttp import * +from winbuild.nghttp_gmake import * from winbuild.tools import * from winbuild.zlib import * from winbuild.openssl import * diff --git a/winbuild/nghttp.py b/winbuild/nghttp_cmake.py index fe57934..fe57934 100644 --- a/winbuild/nghttp.py +++ b/winbuild/nghttp_cmake.py diff --git a/winbuild/nghttp_gmake.py b/winbuild/nghttp_gmake.py new file mode 100644 index 0000000..5dba20c --- /dev/null +++ b/winbuild/nghttp_gmake.py @@ -0,0 +1,22 @@ +import shutil +from .builder import * + +class Nghttp2Builder(StandardBuilder): + def build(self): + nghttp2_dir = self.standard_fetch_extract( + 'https://github.com/nghttp2/nghttp2/releases/download/v%(my_version)s/nghttp2-%(my_version)s.tar.gz') + + with in_dir(os.path.join(nghttp2_dir, 'lib')): + with self.execute_batch() as b: + + b.add('"%s" -f Makefile.msvc' % self.bconf.gmake_path) + + # assemble dist + b.add('mkdir ..\\dist ..\\dist\\include ..\\dist\\include\\nghttp2 ..\\dist\\lib') + b.add('cp msvc_obj/*.lib ../dist/lib') + b.add('cp includes/nghttp2/*.h ../dist/include/nghttp2') + + # libcurl expects nghttp2_static.lib apparently, the makefile + # gives a different name to the static library + if not os.path.exists('../dist/lib/nghttp2_static.lib'): + shutil.copy('../dist/lib/nghttp2-static.lib', '../dist/lib/nghttp2_static.lib') diff --git a/winbuild/utils.py b/winbuild/utils.py index 5620c78..0e043d8 100644 --- a/winbuild/utils.py +++ b/winbuild/utils.py @@ -1,4 +1,4 @@ -import os.path, subprocess, sys, os, glob, re, contextlib +import os.path, subprocess, sys, os, glob, re, contextlib, shutil try: from urllib.request import urlopen except ImportError: |