Skip to content

Convert to generic platform wheel #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,14 @@ references:
jobs:

# x64
manylinux-x64_cp27-cp27m:
<<: *x64_build_job
manylinux-x64_cp27-cp27mu:
<<: *x64_build_job
manylinux-x64_cp34-cp34m:
<<: *x64_build_job
manylinux-x64_cp35-cp35m:
<<: *x64_build_job
manylinux-x64_cp36-cp36m:
<<: *x64_build_job
manylinux-x64_cp37-cp37m_upload-sdist:
<<: *x64_build_job

# x86
manylinux-x86_cp27-cp27m:
<<: *x86_build_job
manylinux-x86_cp27-cp27mu:
<<: *x86_build_job
manylinux-x86_cp34-cp34m:
<<: *x86_build_job
manylinux-x86_cp35-cp35m:
<<: *x86_build_job
manylinux-x86_cp36-cp36m:
<<: *x86_build_job
manylinux-x86_cp37-cp37m:
<<: *x86_build_job

Expand Down Expand Up @@ -103,66 +87,34 @@ workflows:
build-test-deploy:
jobs:
# x64
- manylinux-x64_cp27-cp27m:
<<: *no_filters
- manylinux-x64_cp27-cp27mu:
<<: *no_filters
- manylinux-x64_cp34-cp34m:
<<: *no_filters
- manylinux-x64_cp35-cp35m:
<<: *no_filters
- manylinux-x64_cp36-cp36m:
<<: *no_filters
- manylinux-x64_cp37-cp37m_upload-sdist:
<<: *no_filters
# x86
- manylinux-x86_cp27-cp27m:
<<: *no_filters
- manylinux-x86_cp27-cp27mu:
<<: *no_filters
- manylinux-x86_cp34-cp34m:
<<: *no_filters
- manylinux-x86_cp35-cp35m:
<<: *no_filters
- manylinux-x86_cp36-cp36m:
<<: *no_filters
- manylinux-x86_cp37-cp37m:
<<: *no_filters

- deploy-master:
requires:
# x64
- manylinux-x64_cp27-cp27m
- manylinux-x64_cp27-cp27mu
- manylinux-x64_cp34-cp34m
- manylinux-x64_cp35-cp35m
- manylinux-x64_cp36-cp36m
- manylinux-x64_cp37-cp37m_upload-sdist
# x86
- manylinux-x86_cp27-cp27m
- manylinux-x86_cp27-cp27mu
- manylinux-x86_cp34-cp34m
- manylinux-x86_cp35-cp35m
- manylinux-x86_cp36-cp36m
- manylinux-x86_cp37-cp37m
filters:
branches:
only: master
- deploy-release:
requires:
# x64
- manylinux-x64_cp27-cp27m
- manylinux-x64_cp27-cp27mu
- manylinux-x64_cp34-cp34m
- manylinux-x64_cp35-cp35m
- manylinux-x64_cp36-cp36m
- manylinux-x64_cp37-cp37m_upload-sdist
# x86
- manylinux-x86_cp27-cp27m
- manylinux-x86_cp27-cp27mu
- manylinux-x86_cp34-cp34m
- manylinux-x86_cp35-cp35m
- manylinux-x86_cp36-cp36m
- manylinux-x86_cp37-cp37m
filters:
tags:
Expand Down
22 changes: 2 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,7 @@ matrix:
- os: osx
language: generic
env:
- PYTHON_VERSION=3.7.0

- os: osx
language: generic
env:
- PYTHON_VERSION=3.6.5

- os: osx
language: generic
env:
- PYTHON_VERSION=3.5.5

- os: osx
language: generic
env:
- PYTHON_VERSION=3.4.8
- PYTHON_VERSION=3.7.2

- os: osx
language: generic
Expand All @@ -35,10 +20,7 @@ matrix:

cache:
directories:
- $HOME/.pyenv/versions/3.7.0
- $HOME/.pyenv/versions/3.6.5
- $HOME/.pyenv/versions/3.5.5
- $HOME/.pyenv/versions/3.4.8
- $HOME/.pyenv/versions/3.7.2
- $HOME/.pyenv/versions/2.7.15
- $HOME/downloads

Expand Down
42 changes: 8 additions & 34 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,26 @@ version: "0.0.1.{build}"
environment:
matrix:

- PYTHON_DIR: "C:\\Python27"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PYTHON_DIR: "C:\\Python27"
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "32"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python27-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PYTHON_DIR: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "64"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python34"
PYTHON_VERSION: "3.4.x"
PYTHON_ARCH: "32"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.x"
PYTHON_ARCH: "64"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python35"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "32"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "64"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "32"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python37"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON_DIR: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
BLOCK: "0"

- PYTHON_DIR: "C:\\Python37-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON_DIR: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
BLOCK: "0"
Expand Down
14 changes: 13 additions & 1 deletion ninja/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import subprocess
import sys

Expand All @@ -22,8 +23,19 @@
# Support running tests from the source tree
if not os.path.exists(DATA):
from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR
from skbuild.constants import set_skbuild_plat_name

if platform.system().lower() == "darwin":
# Since building the project specifying --plat-name or CMAKE_OSX_* variables
# leads to different SKBUILD_DIR, the code below attempt to guess the most
# likely plat-name.
_skbuild_dirs = os.listdir(os.path.join(os.path.dirname(__file__), '..', '_skbuild'))
if _skbuild_dirs:
_likely_plat_name = '-'.join(_skbuild_dirs[0].split('-')[:3])
set_skbuild_plat_name(_likely_plat_name)

_data = os.path.abspath(os.path.join(
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR, 'ninja/data'))
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR(), 'ninja/data'))
if os.path.exists(_data):
DATA = _data

Expand Down
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
cmake>=0.5.0
cmake>=0.5.0,<=3.13.3
codecov>=2.0.5
coverage>=4.2
flake8>=3.0.4
pytest>=3.0.3
pytest-cov>=2.4.0
pytest-runner>=2.9
pytest-virtualenv>=1.2.5
scikit-build>=0.7.1
scikit-build>=0.10.0
setuptools>=28.0.0
twine
virtualenv>=15.0.3
wheel==0.31.1
wheeltools
10 changes: 10 additions & 0 deletions scikit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ install:
commands:
- python -c "import sys; print(sys.version)"
- python -m pip install --disable-pip-version-check --upgrade pip
- pip install pytest-virtualenv -f https://github.com/jcfr/pytest-plugins/releases/tag/v1.7.0.dev15 --pre
- pip install git+https://github.com/jcfr/wheeltools.git@wheeltools-2018-10-28-a2f174d0e
- pip install -U -r requirements-dev.txt

before_build:
Expand Down Expand Up @@ -56,6 +58,14 @@ build:

test:
commands:
# Convert to generic platform wheel
- python: |
import glob, sys
sys.path.insert(0, "./scripts")
from convert_to_generic_platform_wheel import convert_to_generic_platform_wheel
wheels = glob.glob("dist/*.whl")
for wheel in wheels:
convert_to_generic_platform_wheel(wheel, remove_original=True)
- python setup.py test

after_test:
Expand Down
Loading