Skip to content

Commit

Permalink
Enable build for 32-bit version of Python
Browse files Browse the repository at this point in the history
The '-A' platform name is required on Windows.
This option was added in CMake v3.1.
  • Loading branch information
dean0x7d committed Feb 8, 2016
1 parent fd03537 commit 7929359
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
version: '{build}'
os: Visual Studio 2015
environment:
PATH: C:\Miniconda35-x64\Scripts\;%PATH%
PB_WERROR: 1
PYPI_USER:
secure: VNmO0xqOUrgWa0uT/HO/mg==
PYPI_PASS:
secure: gqNQRQIXkXmSul5JkOKj4owHUprr3Q4gJ6U6Mtlgm4M=
matrix:
- PATH: C:\Miniconda35-x64\Scripts\;%PATH%
- PATH: C:\Miniconda35\Scripts\;%PATH%
install:
- cmd: git submodule update -q --init --recursive
- cmd: conda update -y -q conda
- cmd: conda create -y -q -n pb35 python=3.5 numpy scipy matplotlib wheel
- cmd: conda create -y -q -n pb35 python=3.5 numpy scipy matplotlib
- cmd: activate pb35
- cmd: pip install -U -q wheel
- cmd: pip install -q twine
build_script:
- cmd: python setup.py build_ext
Expand Down
13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@


if sys.version_info[:2] < (3, 4):
print("Python >= 3.4 is required. It must also be 64-bit.")
sys.exit(-1)

if sys.maxsize <= 2**32:
print("A 64-bit version of Python >= 3.4 is required")
print("Python >= 3.4 is required.")
sys.exit(-1)


Expand All @@ -27,7 +23,7 @@ def __init__(self, name, sourcedir=''):
class CMakeBuild(build_ext):
def run(self):
if shutil.which('cmake') is None:
print("CMake 3.0 or newer is required to build pybinding")
print("CMake 3.1 or newer is required to build pybinding")
sys.exit(-1)

for ext in self.extensions:
Expand All @@ -42,8 +38,9 @@ def run(self):
build_args = ['--config', 'Release']

if platform.system() == "Windows":
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=' + extfulldir,
'-G', 'Visual Studio 14 2015 Win64']
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=' + extfulldir]
if sys.maxsize > 2**32:
cmake_args += ['-A', 'x64']
build_args += ['--', '/m']
else:
build_args += ['--', '-j2']
Expand Down

0 comments on commit 7929359

Please sign in to comment.