Codebase list python-msgpack / d6254ab
Use AppVeyor to build windows wheel (#188) * Add AppVeyor support to build windows wheel * Fix test_limits on 32bit environments * Ignore Python35-x64 test fail for now Should be fixed in next version. INADA Naoki authored 8 years ago INADA Naoki committed 7 years ago
3 changed file(s) with 80 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 environment:
1
2 matrix:
3
4 # For Python versions available on Appveyor, see
5 # http://www.appveyor.com/docs/installed-software#python
6 # The list here is complete (excluding Python 2.6, which
7 # isn't covered by this document) at the time of writing.
8
9 - PYTHON: "C:\\Python27"
10 - PYTHON: "C:\\Python34"
11 - PYTHON: "C:\\Python35"
12 - PYTHON: "C:\\Python27-x64"
13 - PYTHON: "C:\\Python34-x64"
14 DISTUTILS_USE_SDK: "1"
15
16 # Python35-x64 test fails with MemoryError
17 # TODO: investigate it
18 #- PYTHON: "C:\\Python35-x64"
19
20 install:
21 # We need wheel installed to build wheels
22 - "%PYTHON%\\python.exe -m pip install -U pip wheel pytest cython"
23
24 build: off
25
26 test_script:
27 # Put your test command here.
28 # If you don't need to build C extensions on 64-bit Python 3.3 or 3.4,
29 # you can remove "build.cmd" from the front of the command, as it's
30 # only needed to support those cases.
31 # Note that you must use the environment variable %PYTHON% to refer to
32 # the interpreter you're using - Appveyor does not do anything special
33 # to put the Python evrsion you want to use on PATH.
34 - "build.cmd %PYTHON%\\python.exe setup.py build_ext -i"
35 - "build.cmd %PYTHON%\\python.exe setup.py install"
36 - "%PYTHON%\\python.exe -c \"import sys; print(hex(sys.maxsize))\""
37 - "%PYTHON%\\python.exe -c \"from msgpack import _packer, _unpacker\""
38 - "%PYTHON%\\Scripts\\py.test test"
39 - "build.cmd %PYTHON%\\python.exe setup.py bdist_wheel"
40
41 after_test:
42 # This step builds your wheels.
43 # Again, you only need build.cmd if you're building C extensions for
44 # 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct
45 # interpreter
46
47 artifacts:
48 # bdist_wheel puts your built wheel in the dist directory
49 - path: dist\*
50
51 #on_success:
52 # You can use this step to upload your artifacts to a public website.
53 # See Appveyor's documentation for more details. Or you can simply
54 # access your wheels from the Appveyor "artifacts" tab for your build.
55
56 # vim: set shiftwidth=2
0 @echo off
1 :: To build extensions for 64 bit Python 3, we need to configure environment
2 :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
3 :: MS Windows SDK for Windows 7 and .NET Framework 4
4 ::
5 :: More details at:
6 :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
7
8 IF "%DISTUTILS_USE_SDK%"=="1" (
9 ECHO Configuring environment to build with MSVC on a 64bit architecture
10 ECHO Using Windows SDK 7.1
11 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
12 CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
13 SET MSSdk=1
14 REM Need the following to allow tox to see the SDK compiler
15 SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
16 ) ELSE (
17 ECHO Using default MSVC build environment
18 )
19
20 CALL %*
243243 msgpack_pack_ext(&self.pk, typecode, len(data))
244244 msgpack_pack_raw_body(&self.pk, data, len(data))
245245
246 def pack_array_header(self, size_t size):
246 def pack_array_header(self, long long size):
247247 if size > (2**32-1):
248248 raise ValueError
249249 cdef int ret = msgpack_pack_array(&self.pk, size)
256256 self.pk.length = 0
257257 return buf
258258
259 def pack_map_header(self, size_t size):
259 def pack_map_header(self, long long size):
260260 if size > (2**32-1):
261261 raise ValueError
262262 cdef int ret = msgpack_pack_map(&self.pk, size)