Skip to content

Commit 261e930

Browse files
authored
Merge pull request #23 from jcfr/convert-to-generic-platform-wheel
Convert to generic platform wheel
2 parents 0fe8e65 + 781570c commit 261e930

File tree

7 files changed

+218
-105
lines changed

7 files changed

+218
-105
lines changed

.circleci/config.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,14 @@ references:
4444
jobs:
4545

4646
# x64
47-
manylinux-x64_cp27-cp27m:
48-
<<: *x64_build_job
4947
manylinux-x64_cp27-cp27mu:
5048
<<: *x64_build_job
51-
manylinux-x64_cp34-cp34m:
52-
<<: *x64_build_job
53-
manylinux-x64_cp35-cp35m:
54-
<<: *x64_build_job
55-
manylinux-x64_cp36-cp36m:
56-
<<: *x64_build_job
5749
manylinux-x64_cp37-cp37m_upload-sdist:
5850
<<: *x64_build_job
5951

6052
# x86
61-
manylinux-x86_cp27-cp27m:
62-
<<: *x86_build_job
6353
manylinux-x86_cp27-cp27mu:
6454
<<: *x86_build_job
65-
manylinux-x86_cp34-cp34m:
66-
<<: *x86_build_job
67-
manylinux-x86_cp35-cp35m:
68-
<<: *x86_build_job
69-
manylinux-x86_cp36-cp36m:
70-
<<: *x86_build_job
7155
manylinux-x86_cp37-cp37m:
7256
<<: *x86_build_job
7357

@@ -103,66 +87,34 @@ workflows:
10387
build-test-deploy:
10488
jobs:
10589
# x64
106-
- manylinux-x64_cp27-cp27m:
107-
<<: *no_filters
10890
- manylinux-x64_cp27-cp27mu:
10991
<<: *no_filters
110-
- manylinux-x64_cp34-cp34m:
111-
<<: *no_filters
112-
- manylinux-x64_cp35-cp35m:
113-
<<: *no_filters
114-
- manylinux-x64_cp36-cp36m:
115-
<<: *no_filters
11692
- manylinux-x64_cp37-cp37m_upload-sdist:
11793
<<: *no_filters
11894
# x86
119-
- manylinux-x86_cp27-cp27m:
120-
<<: *no_filters
12195
- manylinux-x86_cp27-cp27mu:
12296
<<: *no_filters
123-
- manylinux-x86_cp34-cp34m:
124-
<<: *no_filters
125-
- manylinux-x86_cp35-cp35m:
126-
<<: *no_filters
127-
- manylinux-x86_cp36-cp36m:
128-
<<: *no_filters
12997
- manylinux-x86_cp37-cp37m:
13098
<<: *no_filters
13199

132100
- deploy-master:
133101
requires:
134102
# x64
135-
- manylinux-x64_cp27-cp27m
136103
- manylinux-x64_cp27-cp27mu
137-
- manylinux-x64_cp34-cp34m
138-
- manylinux-x64_cp35-cp35m
139-
- manylinux-x64_cp36-cp36m
140104
- manylinux-x64_cp37-cp37m_upload-sdist
141105
# x86
142-
- manylinux-x86_cp27-cp27m
143106
- manylinux-x86_cp27-cp27mu
144-
- manylinux-x86_cp34-cp34m
145-
- manylinux-x86_cp35-cp35m
146-
- manylinux-x86_cp36-cp36m
147107
- manylinux-x86_cp37-cp37m
148108
filters:
149109
branches:
150110
only: master
151111
- deploy-release:
152112
requires:
153113
# x64
154-
- manylinux-x64_cp27-cp27m
155114
- manylinux-x64_cp27-cp27mu
156-
- manylinux-x64_cp34-cp34m
157-
- manylinux-x64_cp35-cp35m
158-
- manylinux-x64_cp36-cp36m
159115
- manylinux-x64_cp37-cp37m_upload-sdist
160116
# x86
161-
- manylinux-x86_cp27-cp27m
162117
- manylinux-x86_cp27-cp27mu
163-
- manylinux-x86_cp34-cp34m
164-
- manylinux-x86_cp35-cp35m
165-
- manylinux-x86_cp36-cp36m
166118
- manylinux-x86_cp37-cp37m
167119
filters:
168120
tags:

.travis.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,7 @@ matrix:
1111
- os: osx
1212
language: generic
1313
env:
14-
- PYTHON_VERSION=3.7.0
15-
16-
- os: osx
17-
language: generic
18-
env:
19-
- PYTHON_VERSION=3.6.5
20-
21-
- os: osx
22-
language: generic
23-
env:
24-
- PYTHON_VERSION=3.5.5
25-
26-
- os: osx
27-
language: generic
28-
env:
29-
- PYTHON_VERSION=3.4.8
14+
- PYTHON_VERSION=3.7.2
3015

3116
- os: osx
3217
language: generic
@@ -35,10 +20,7 @@ matrix:
3520

3621
cache:
3722
directories:
38-
- $HOME/.pyenv/versions/3.7.0
39-
- $HOME/.pyenv/versions/3.6.5
40-
- $HOME/.pyenv/versions/3.5.5
41-
- $HOME/.pyenv/versions/3.4.8
23+
- $HOME/.pyenv/versions/3.7.2
4224
- $HOME/.pyenv/versions/2.7.15
4325
- $HOME/downloads
4426

appveyor.yml

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,26 @@ version: "0.0.1.{build}"
88
environment:
99
matrix:
1010

11-
- PYTHON_DIR: "C:\\Python27"
11+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
12+
PYTHON_DIR: "C:\\Python27"
1213
PYTHON_VERSION: "2.7.x"
1314
PYTHON_ARCH: "32"
1415
BLOCK: "0"
1516

16-
- PYTHON_DIR: "C:\\Python27-x64"
17+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
18+
PYTHON_DIR: "C:\\Python27-x64"
1719
PYTHON_VERSION: "2.7.x"
1820
PYTHON_ARCH: "64"
1921
BLOCK: "0"
2022

21-
- PYTHON_DIR: "C:\\Python34"
22-
PYTHON_VERSION: "3.4.x"
23-
PYTHON_ARCH: "32"
24-
BLOCK: "0"
25-
26-
- PYTHON_DIR: "C:\\Python34-x64"
27-
PYTHON_VERSION: "3.4.x"
28-
PYTHON_ARCH: "64"
29-
BLOCK: "0"
30-
31-
- PYTHON_DIR: "C:\\Python35"
32-
PYTHON_VERSION: "3.5.x"
33-
PYTHON_ARCH: "32"
34-
BLOCK: "0"
35-
36-
- PYTHON_DIR: "C:\\Python35-x64"
37-
PYTHON_VERSION: "3.5.x"
38-
PYTHON_ARCH: "64"
39-
BLOCK: "0"
40-
41-
- PYTHON_DIR: "C:\\Python36"
42-
PYTHON_VERSION: "3.6.x"
43-
PYTHON_ARCH: "32"
44-
BLOCK: "0"
45-
46-
- PYTHON_DIR: "C:\\Python36-x64"
47-
PYTHON_VERSION: "3.6.x"
48-
PYTHON_ARCH: "64"
49-
BLOCK: "0"
50-
51-
- PYTHON_DIR: "C:\\Python37"
23+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
24+
PYTHON_DIR: "C:\\Python37"
5225
PYTHON_VERSION: "3.7.x"
5326
PYTHON_ARCH: "64"
5427
BLOCK: "0"
5528

56-
- PYTHON_DIR: "C:\\Python37-x64"
29+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
30+
PYTHON_DIR: "C:\\Python37-x64"
5731
PYTHON_VERSION: "3.7.x"
5832
PYTHON_ARCH: "64"
5933
BLOCK: "0"

ninja/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import platform
23
import subprocess
34
import sys
45

@@ -22,8 +23,19 @@
2223
# Support running tests from the source tree
2324
if not os.path.exists(DATA):
2425
from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR
26+
from skbuild.constants import set_skbuild_plat_name
27+
28+
if platform.system().lower() == "darwin":
29+
# Since building the project specifying --plat-name or CMAKE_OSX_* variables
30+
# leads to different SKBUILD_DIR, the code below attempt to guess the most
31+
# likely plat-name.
32+
_skbuild_dirs = os.listdir(os.path.join(os.path.dirname(__file__), '..', '_skbuild'))
33+
if _skbuild_dirs:
34+
_likely_plat_name = '-'.join(_skbuild_dirs[0].split('-')[:3])
35+
set_skbuild_plat_name(_likely_plat_name)
36+
2537
_data = os.path.abspath(os.path.join(
26-
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR, 'ninja/data'))
38+
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR(), 'ninja/data'))
2739
if os.path.exists(_data):
2840
DATA = _data
2941

requirements-dev.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
cmake>=0.5.0
1+
cmake>=0.5.0,<=3.13.3
22
codecov>=2.0.5
33
coverage>=4.2
44
flake8>=3.0.4
55
pytest>=3.0.3
66
pytest-cov>=2.4.0
77
pytest-runner>=2.9
88
pytest-virtualenv>=1.2.5
9-
scikit-build>=0.7.1
9+
scikit-build>=0.10.0
1010
setuptools>=28.0.0
1111
twine
1212
virtualenv>=15.0.3
1313
wheel==0.31.1
14+
wheeltools

scikit-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ install:
2424
commands:
2525
- python -c "import sys; print(sys.version)"
2626
- python -m pip install --disable-pip-version-check --upgrade pip
27+
- pip install pytest-virtualenv -f https://github.com/jcfr/pytest-plugins/releases/tag/v1.7.0.dev15 --pre
28+
- pip install git+https://github.com/jcfr/wheeltools.git@wheeltools-2018-10-28-a2f174d0e
2729
- pip install -U -r requirements-dev.txt
2830

2931
before_build:
@@ -56,6 +58,14 @@ build:
5658
5759
test:
5860
commands:
61+
# Convert to generic platform wheel
62+
- python: |
63+
import glob, sys
64+
sys.path.insert(0, "./scripts")
65+
from convert_to_generic_platform_wheel import convert_to_generic_platform_wheel
66+
wheels = glob.glob("dist/*.whl")
67+
for wheel in wheels:
68+
convert_to_generic_platform_wheel(wheel, remove_original=True)
5969
- python setup.py test
6070

6171
after_test:

0 commit comments

Comments
 (0)