Skip to content

Commit 8d671eb

Browse files
authored
Merge 36c19c9 into 306b42d
2 parents 306b42d + 36c19c9 commit 8d671eb

9 files changed

Lines changed: 243 additions & 6 deletions

File tree

.circleci-matrix.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
env:
2+
- MANYLINUX_IMAGE=manylinux-x64 MANYLINUX_PYTHON=cp27-cp27mu
3+
- MANYLINUX_IMAGE=manylinux-x86 MANYLINUX_PYTHON=cp27-cp27mu
4+
- MANYLINUX_IMAGE=manylinux-x64 MANYLINUX_PYTHON=cp33-cp33m
5+
- MANYLINUX_IMAGE=manylinux-x86 MANYLINUX_PYTHON=cp33-cp33m
6+
- MANYLINUX_IMAGE=manylinux-x64 MANYLINUX_PYTHON=cp34-cp34m
7+
- MANYLINUX_IMAGE=manylinux-x86 MANYLINUX_PYTHON=cp34-cp34m
8+
- MANYLINUX_IMAGE=manylinux-x64 MANYLINUX_PYTHON=cp35-cp35m
9+
- MANYLINUX_IMAGE=manylinux-x86 MANYLINUX_PYTHON=cp35-cp35m
10+
command:
11+
- docker run dockcross/$MANYLINUX_IMAGE > dockcross && chmod +x ./dockcross
12+
- sed -ie "s/cat \/dev/head -c 500 \/dev/" dockcross
13+
- MANYLINUX_RUN_ENV=./dockcross MANYLINUX_PYTHON=$MANYLINUX_PYTHON ci --clear-cached-env
14+
- mv dist/* $CIRCLE_ARTIFACTS/
15+
- echo "CIRCLE_ARTIFACTS:$CIRCLE_ARTIFACTS"
16+
- ls $CIRCLE_ARTIFACTS/

.travis.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
branches:
3+
only:
4+
- master
5+
6+
language: python
7+
8+
matrix:
9+
include:
10+
11+
- os: osx
12+
language: generic
13+
env:
14+
- PYTHONVERSION=3.4.5
15+
16+
- os: osx
17+
language: generic
18+
env:
19+
- PYTHONVERSION=3.3.6
20+
21+
- os: osx
22+
language: generic
23+
env:
24+
- PYTHONVERSION=2.7.12
25+
26+
cache:
27+
directories:
28+
- $HOME/.pyenv/versions/3.4.5
29+
- $HOME/.pyenv/versions/3.3.6
30+
- $HOME/.pyenv/versions/2.7.12
31+
- $HOME/downloads
32+
33+
before_install:
34+
- pip install scikit-ci==0.9.0 scikit-ci-addons==0.7.0
35+
- ci_addons --install ../addons
36+
37+
install:
38+
- ci install
39+
40+
script:
41+
- ci test
42+
43+
after_success:
44+
- ci after_test

CMakeLists.txt

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ if(CMakePythonDistributions_SUPERBUILD)
9696
endif()
9797
option(BUILD_CMAKE_FROM_SOURCE "Build CMake from source" ${default})
9898

99+
option(BUILD_VERBOSE "Build reporting additional information (e.g download progress, ...)" OFF)
100+
99101
set(CMakePythonDistributions_ARCHIVE_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}"
100102
CACHE PATH "Directory where to download archives"
101103
)
@@ -191,6 +193,18 @@ if(CMakePythonDistributions_SUPERBUILD)
191193

192194
set(${PROJECT_NAME}_CMAKE_CACHE_ARG)
193195

196+
set(ep_download_no_progress_args)
197+
set(ep_log_configure_build_args)
198+
if(NOT BUILD_VERBOSE)
199+
set(ep_download_no_progress_args
200+
DOWNLOAD_NO_PROGRESS 1
201+
)
202+
set(ep_log_configure_build_args
203+
LOG_CONFIGURE 1
204+
LOG_BUILD 1
205+
)
206+
endif()
207+
194208
#
195209
# CMakeProject_SOURCE_DIR: Always expect the sources (needed for `sdist`)
196210
#
@@ -208,6 +222,7 @@ if(CMakePythonDistributions_SUPERBUILD)
208222
BUILD_COMMAND ""
209223
BUILD_IN_SOURCE 1
210224
INSTALL_COMMAND ""
225+
${ep_download_no_progress_args}
211226
)
212227
message(STATUS "SuperBuild - CMakeProject-src-download")
213228
message(STATUS "SuperBuild - CMakeProject-src-download - URL: ${${src_archive}_url}")
@@ -243,6 +258,7 @@ if(CMakePythonDistributions_SUPERBUILD)
243258
-DCMake_INSTALL_DEPENDENCIES:BOOL=ON
244259
USES_TERMINAL_CONFIGURE 1
245260
USES_TERMINAL_BUILD 1
261+
${ep_log_configure_build_args}
246262
INSTALL_COMMAND ""
247263
DEPENDS
248264
CMakeProject-src-download
@@ -281,6 +297,7 @@ if(CMakePythonDistributions_SUPERBUILD)
281297
BUILD_COMMAND ""
282298
BUILD_IN_SOURCE 1
283299
INSTALL_COMMAND ""
300+
${ep_download_no_progress_args}
284301
)
285302
message(STATUS "SuperBuild - CMakeProject-binary-download")
286303
message(STATUS "SuperBuild - CMakeProject-binary-download - URL: ${${binary_archive}_url}")
@@ -336,7 +353,20 @@ include\(\"${CMakeProject_BINARY_DIR}/cmake_install.cmake\")
336353
if(relative_directory STREQUAL "bin")
337354
set(type PROGRAMS)
338355
endif()
339-
install(${type} ${file} DESTINATION "${relative_directory}")
356+
# Skip symlinks like "CMake.app/Contents/Frameworks/QtWidgets.framework/Versions/Current"
357+
if(IS_SYMLINK ${file})
358+
continue()
359+
endif()
360+
set(_permissions)
361+
get_filename_component(filename ${file} NAME)
362+
if(filename MATCHES "ccmake|cmake|cmake-gui|cpack|ctest")
363+
set(_permissions PERMISSIONS
364+
OWNER_READ OWNER_WRITE OWNER_EXECUTE
365+
GROUP_READ GROUP_EXECUTE
366+
WORLD_READ WORLD_EXECUTE
367+
)
368+
endif()
369+
install(${type} ${file} DESTINATION "${relative_directory}" ${_permissions})
340370
endforeach()
341371
endif()
342372

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include CMakeLists.txt
2-
include requirements.txt
2+
include requirements-dev.txt
33

44
recursive-include src *

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Build the CMake Python wheel with the following command:
2323

2424
```
2525
mkvirtualenv build-cmake
26-
pip install -r requirements.txt
26+
pip install -r requirements-dev.txt
2727
python setup.py bdist_wheel
2828
```
2929

appveyor.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
branches:
3+
only:
4+
- master
5+
6+
version: "0.0.1.{build}"
7+
8+
environment:
9+
matrix:
10+
11+
# Visual Studio (Python 2 & 3, 32 & 64 bit)
12+
- PYTHON_DIR: "C:\\Python27"
13+
PYTHON_VERSION: "2.7.x"
14+
PYTHON_ARCH: "32"
15+
SKIP: "0"
16+
BLOCK: "0"
17+
18+
- PYTHON_DIR: "C:\\Python27-x64"
19+
PYTHON_VERSION: "2.7.x"
20+
PYTHON_ARCH: "64"
21+
SKIP: "0"
22+
BLOCK: "0"
23+
24+
- PYTHON_DIR: "C:\\Python35"
25+
PYTHON_VERSION: "3.5.x"
26+
PYTHON_ARCH: "32"
27+
SKIP: "0"
28+
BLOCK: "0"
29+
30+
- PYTHON_DIR: "C:\\Python35-x64"
31+
PYTHON_VERSION: "3.5.x"
32+
PYTHON_ARCH: "64"
33+
SKIP: "0"
34+
BLOCK: "0"
35+
36+
cache:
37+
- C:\\cmake-3.6.2
38+
39+
init:
40+
- python -m pip install scikit-ci==0.9.0 scikit-ci-addons==0.7.0
41+
- python -m ci_addons --install ../addons
42+
43+
- ps: ../addons/appveyor/rolling-build.ps1
44+
45+
install:
46+
- python -m ci install
47+
48+
build_script:
49+
- python -m ci build
50+
51+
test_script:
52+
- python -m ci test
53+
54+
after_test:
55+
- python -m ci after_test
56+
57+
on_finish:
58+
- ps: ../addons/appveyor/enable-worker-remote-access.ps1 -check_for_block
59+
60+
on_failure:
61+
- ps: "Get-EventLog AppVeyor -newest 10 | Format-List"
62+
63+
artifacts:
64+
# Archive the generated packages in the ci.appveyor.com build report.
65+
- path: dist\*
66+
67+
matrix:
68+
fast_finish: false
69+
70+
notifications:
71+
- provider: GitHubPullRequest
72+
auth_token:
73+
secure: iXYaAwXJcHdnRGTeb1Gk1PembhlZleCGDK2oJgsiFvA=
74+
template: >-
75+
{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}}
76+
[Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}})
77+
(commit {{commitUrl}} by @{{&commitAuthorUsername}})
78+
79+
shallow_clone: false

circle.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
machine:
3+
services:
4+
- docker
5+
6+
dependencies:
7+
cache_directories:
8+
- ~/docker
9+
override:
10+
- curl -fsSL https://git.io/v2Ifs -o ~/bin/circleci-matrix
11+
- chmod +x ~/bin/circleci-matrix
12+
- pip install scikit-ci==0.9.0 scikit-ci-addons==0.7.0
13+
- ci_addons anyci/docker load-pull-save dockcross/manylinux-x64
14+
- ci_addons anyci/docker load-pull-save dockcross/manylinux-x86
15+
16+
test:
17+
override:
18+
- circleci-matrix:
19+
parallel: true

cmake/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import os
2+
import platform
23
import subprocess
34
import sys
45

5-
CMAKE_BIN_DIR = os.path.join(os.path.dirname(__file__), 'data', 'bin')
6-
CMAKE_DOC_DIR = os.path.join(os.path.dirname(__file__), 'data', 'doc')
7-
CMAKE_SHARE_DIR = os.path.join(os.path.dirname(__file__), 'data', 'share')
6+
CMAKE_DATA = os.path.join(os.path.dirname(__file__), 'data')
7+
8+
if platform.system().lower() == "darwin":
9+
CMAKE_DATA = os.path.join(CMAKE_DATA, 'CMake.app', 'Contents')
10+
11+
CMAKE_BIN_DIR = os.path.join(CMAKE_DATA, 'bin')
12+
CMAKE_DOC_DIR = os.path.join(CMAKE_DATA, 'doc')
13+
CMAKE_SHARE_DIR = os.path.join(CMAKE_DATA, 'share')
814

915

1016
def _program(name, args):

scikit-ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
schema_version: "0.5.0"
2+
3+
before_install:
4+
5+
environment:
6+
PYTHON: python
7+
RUN_ENV: ""
8+
9+
appveyor:
10+
environment:
11+
PYTHON: $<PYTHON_DIR>\\python.exe
12+
RUN_ENV: .\\..\\addons\\appveyor\\run-with-visual-studio.cmd
13+
commands:
14+
- python ../addons/appveyor/patch_vs2008.py
15+
- python ../addons/appveyor/install_cmake.py 3.6.2
16+
17+
circle:
18+
environment:
19+
PYTHON: /opt/python/$<MANYLINUX_PYTHON>/bin/python
20+
RUN_ENV: $<MANYLINUX_RUN_ENV>
21+
22+
travis:
23+
osx:
24+
environment:
25+
RUN_ENV: ../addons/travis/run-with-pyenv.sh
26+
commands:
27+
- python ../addons/travis/install_pyenv.py
28+
- python ../addons/travis/install_cmake.py 3.6.2
29+
30+
install:
31+
commands:
32+
- $<RUN_ENV> $<PYTHON> -m pip install --disable-pip-version-check --upgrade pip
33+
- $<RUN_ENV> $<PYTHON> -m pip install -r requirements-dev.txt
34+
35+
build:
36+
commands:
37+
- $<RUN_ENV> $<PYTHON> setup.py build
38+
39+
after_test:
40+
commands:
41+
- $<RUN_ENV> $<PYTHON> setup.py --quiet sdist
42+
- $<RUN_ENV> $<PYTHON> setup.py --quiet bdist_wheel
43+
- $<RUN_ENV> $<PYTHON> setup.py clean

0 commit comments

Comments
 (0)