Skip to content

Commit f701056

Browse files
authored
Merge pull request scikit-build#38 from scikit-build/update-to-circleci-v2
Switch to CircleCI 2.0
2 parents 4ce330c + afbc83e commit f701056

File tree

10 files changed

+134
-50
lines changed

10 files changed

+134
-50
lines changed

.circleci-matrix.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
ci-steps: &ci-steps
2+
working_directory: /work
3+
steps:
4+
- checkout
5+
- run:
6+
name:
7+
command: |
8+
export MANYLINUX_PYTHON=$(echo ${CIRCLE_JOB} | cut -d"_" -f2)
9+
echo "MANYLINUX_PYTHON [${MANYLINUX_PYTHON}]"
10+
/opt/python/${MANYLINUX_PYTHON}/bin/pip install scikit-ci
11+
/opt/python/${MANYLINUX_PYTHON}/bin/ci
12+
13+
version: 2
14+
jobs:
15+
#
16+
# x64
17+
#
18+
manylinux-x64_cp27-cp27m:
19+
docker:
20+
- image: dockcross/manylinux-x64
21+
<<: *ci-steps
22+
23+
manylinux-x64_cp27-cp27mu:
24+
docker:
25+
- image: dockcross/manylinux-x64
26+
<<: *ci-steps
27+
28+
manylinux-x64_cp34-cp34m:
29+
docker:
30+
- image: dockcross/manylinux-x64
31+
<<: *ci-steps
32+
33+
manylinux-x64_cp35-cp35m:
34+
docker:
35+
- image: dockcross/manylinux-x64
36+
<<: *ci-steps
37+
38+
manylinux-x64_cp36-cp36m:
39+
docker:
40+
- image: dockcross/manylinux-x64
41+
<<: *ci-steps
42+
#
43+
# x86
44+
#
45+
manylinux-x86_cp27-cp27m:
46+
docker:
47+
- image: dockcross/manylinux-x86
48+
<<: *ci-steps
49+
50+
manylinux-x86_cp27-cp27mu:
51+
docker:
52+
- image: dockcross/manylinux-x86
53+
<<: *ci-steps
54+
55+
manylinux-x86_cp34-cp34m:
56+
docker:
57+
- image: dockcross/manylinux-x86
58+
<<: *ci-steps
59+
60+
manylinux-x86_cp35-cp35m:
61+
docker:
62+
- image: dockcross/manylinux-x86
63+
<<: *ci-steps
64+
65+
manylinux-x86_cp36-cp36m:
66+
docker:
67+
- image: dockcross/manylinux-x86
68+
<<: *ci-steps
69+
70+
71+
workflows:
72+
version: 2
73+
build-test-deploy:
74+
jobs:
75+
- manylinux-x64_cp27-cp27m
76+
- manylinux-x64_cp27-cp27mu
77+
- manylinux-x64_cp34-cp34m
78+
- manylinux-x64_cp35-cp35m
79+
- manylinux-x64_cp36-cp36m
80+
81+
- manylinux-x86_cp27-cp27m
82+
- manylinux-x86_cp27-cp27mu
83+
- manylinux-x86_cp34-cp34m
84+
- manylinux-x86_cp35-cp35m
85+
- manylinux-x86_cp36-cp36m

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# This project
2-
cmake/resources/*
3-
src
42
archive-cache
3+
cmake/resources/*
4+
env.json
55
skbuild
6+
src
67
standalone-build
78
standalone-x86-build
89
standalone-x64-build

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ if(CMakePythonDistributions_SUPERBUILD)
148148
if(NOT DEFINED CMakeProject_BINARY_DIR)
149149
set(CMakeProject_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeProject-build)
150150

151+
set(_cmake_cache_args)
152+
if(DEFINED OPENSSL_ROOT_DIR)
153+
list(APPEND _cmake_cache_args
154+
-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}
155+
)
156+
message(STATUS "SuperBuild - CMakeProject-build - OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
157+
endif()
158+
151159
ExternalProject_add(CMakeProject-build
152160
SOURCE_DIR ${CMakeProject_SOURCE_DIR}
153161
BINARY_DIR ${CMakeProject_BINARY_DIR}
@@ -160,6 +168,7 @@ if(CMakePythonDistributions_SUPERBUILD)
160168
-DBUILD_TESTING:BOOL=OFF
161169
-DCMake_INSTALL_DEPENDENCIES:BOOL=ON
162170
-DCMAKE_INSTALL_MESSAGE:STRING=NEVER
171+
${_cmake_cache_args}
163172
USES_TERMINAL_CONFIGURE 1
164173
USES_TERMINAL_BUILD 1
165174
${ep_log_configure_build_args}
@@ -228,6 +237,7 @@ if(CMakePythonDistributions_SUPERBUILD)
228237
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
229238
${${PROJECT_NAME}_CMAKE_CACHE_ARG}
230239
USES_TERMINAL_CONFIGURE 1
240+
USES_TERMINAL_BUILD 1
231241
INSTALL_COMMAND ""
232242
DEPENDS
233243
${${PROJECT_NAME}_DEPENDS}

circle.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

cmake/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
# Support running tests from the source tree
1414
if not os.path.exists(CMAKE_DATA):
15+
from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR
1516
_cmake_data = os.path.abspath(os.path.join(
16-
os.path.dirname(__file__), '../_skbuild/cmake-install/cmake/data'))
17+
os.path.dirname(__file__), '..', SKBUILD_CMAKE_INSTALL_DIR, 'cmake/data'))
1718
if os.path.exists(_cmake_data):
1819
CMAKE_DATA = _cmake_data
1920

docs/building.rst

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ can successfully glob the source files.
4444
The source distribution is generated using the following
4545
command::
4646

47-
python setup.pt sdist
47+
python setup.py sdist
4848

4949

5050
Binary distribution (build, bdist, bdist_wheel)
@@ -58,13 +58,13 @@ The project has two mode of operations:
5858
The binary distribution is generated using the following
5959
command::
6060

61-
python setup.pt bdist_wheel
61+
python setup.py bdist_wheel
6262

6363

6464
Changing the default mode is achieved by explicitly passing the option
6565
to CMake::
6666

67-
python setup.pt bdist_wheel -- -DBUILD_CMAKE_FROM_SOURCE:BOOL=ON
67+
python setup.py bdist_wheel -- -DBUILD_CMAKE_FROM_SOURCE:BOOL=ON
6868

6969

7070
Default value for ``BUILD_CMAKE_FROM_SOURCE``
@@ -77,6 +77,27 @@ different default:
7777
- MacOSX: OFF
7878
- Windows: OFF
7979

80+
Controlling verbosity
81+
---------------------
82+
83+
configure and build output
84+
^^^^^^^^^^^^^^^^^^^^^^^^^^
85+
86+
By default, the output associated to the configure and build steps of the
87+
`CMakeProject-build` external project are logged into files. This can be
88+
changed by setting the ``BUILD_VERBOSE`` option::
89+
90+
python setup.py bdist_wheel -- -DBUILD_VERBOSE:BOOL=1
91+
92+
list of files copied into the distributions
93+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94+
95+
By default, the complete list of files copied into the distributions are
96+
reported. This can be changed passing the ``--hide-listing`` option::
97+
98+
python setup.py --hide-listing sdist
99+
python setup.py --hide-listing bdist_wheel
100+
80101
Optimizations
81102
-------------
82103

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ pytest>=3.0.3
55
pytest-cov>=2.4.0
66
pytest-runner>=2.9
77
pytest-virtualenv>=1.2.5
8-
scikit-build>=0.5.0
8+
scikit-build>=0.7.1
99
virtualenv>=15.0.3

scikit-ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ before_install:
1212
circle:
1313
environment:
1414
PATH: /opt/python/$<MANYLINUX_PYTHON>/bin:$<PATH>
15+
SETUP_CMAKE_ARGS: -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
1516
commands:
1617
- rm -rf dist/*
1718

1819
travis:
1920
osx:
2021
environment:
2122
PATH: $<HOME>/.pyenv/versions/$<PYTHON_VERSION>/bin:$<PATH>
22-
SETUP_ARGS: --plat-name macosx-10.6-x86_64 -- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
23+
SETUP_BDIST_WHEEL_ARGS: --plat-name macosx-10.6-x86_64
24+
SETUP_CMAKE_ARGS: -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
2325
commands:
2426
- python ../addons/travis/install_pyenv.py
2527
- python ../addons/travis/install_cmake.py 3.6.2
2628

2729
install:
2830
commands:
29-
- python --version
31+
- python -c "import sys; print(sys.version)"
3032
- python -m pip install --disable-pip-version-check --upgrade pip
3133
- pip install -U setuptools
3234
- $<RUN_ENV> pip install -U -r requirements-dev.txt
@@ -37,15 +39,15 @@ before_build:
3739

3840
build:
3941
commands:
40-
- python setup.py --hide-listing sdist
41-
- $<RUN_ENV> python setup.py --hide-listing bdist_wheel $<SETUP_ARGS>
42+
- python setup.py --hide-listing sdist -- $<SETUP_CMAKE_ARGS>
43+
- $<RUN_ENV> python setup.py --hide-listing bdist_wheel $<SETUP_BDIST_WHEEL_ARGS> -- $<SETUP_CMAKE_ARGS>
4244

4345
circle:
4446
commands:
4547
- |
4648
# Since there are no external shared libraries to bundle into the wheels
4749
# this step will fixup the wheel switching from 'linux' to 'manylinux1' tag
48-
for whl in dist/*$(uname -p).whl; do
50+
for whl in dist/*$(python -c "import wheel.pep425tags as w; print(w.get_platform())").whl; do
4951
auditwheel repair $whl -w ./dist/
5052
rm $whl
5153
done

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def parse_requirements(filename):
5252
url=r'http://cmake.org/',
5353
download_url=r'https://cmake.org/download',
5454

55-
description=r'CMake is an open-source, cross-platform family of \
56-
tools designed to build, test and package software',
55+
description=r'CMake is an open-source, cross-platform family of '
56+
r'tools designed to build, test and package software',
5757

5858
long_description=readme + '\n\n' + history,
5959

0 commit comments

Comments
 (0)