Skip to content

Commit 3bfb9b4

Browse files
authored
Merge 6195d19 into 306b42d
2 parents 306b42d + 6195d19 commit 3bfb9b4

9 files changed

Lines changed: 272 additions & 6 deletions

File tree

.travis.yml

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

CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,20 @@ include\(\"${CMakeProject_BINARY_DIR}/cmake_install.cmake\")
336336
if(relative_directory STREQUAL "bin")
337337
set(type PROGRAMS)
338338
endif()
339-
install(${type} ${file} DESTINATION "${relative_directory}")
339+
# Skip symlinks like "CMake.app/Contents/Frameworks/QtWidgets.framework/Versions/Current"
340+
if(IS_SYMLINK ${file})
341+
continue()
342+
endif()
343+
set(_permissions)
344+
get_filename_component(filename ${file} NAME)
345+
if(filename MATCHES "ccmake|cmake|cmake-gui|cpack|ctest")
346+
set(_permissions PERMISSIONS
347+
OWNER_READ OWNER_WRITE OWNER_EXECUTE
348+
GROUP_READ GROUP_EXECUTE
349+
WORLD_READ WORLD_EXECUTE
350+
)
351+
endif()
352+
install(${type} ${file} DESTINATION "${relative_directory}" ${_permissions})
340353
endforeach()
341354
endif()
342355

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: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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+
- ps: "\
41+
iex (\
42+
(New-Object Net.Webclient).DownloadString(\
43+
'https://raw.githubusercontent.com/\
44+
appveyor/ci/master/scripts/enable-rdp.ps1'\
45+
)\
46+
)"
47+
48+
# If there is a newer build queued for the same PR, cancel this one.
49+
# The AppVeyor 'rollout builds' option is supposed to serve the same
50+
# purpose but it is problematic because it tends to cancel builds pushed
51+
# directly to master instead of just PR builds (or the converse).
52+
# credits: JuliaLang developers.
53+
- ps: "\
54+
if (\
55+
$env:APPVEYOR_PULL_REQUEST_NUMBER -and \
56+
$env:APPVEYOR_BUILD_NUMBER -ne (\
57+
(\
58+
Invoke-RestMethod \
59+
` https://ci.appveyor.com/api/projects/\
60+
$env:APPVEYOR_ACCOUNT_NAME/\
61+
$env:APPVEYOR_PROJECT_SLUG/\
62+
history?recordsNumber=50\
63+
).builds | ` Where-Object pullRequestId -eq \
64+
$env:APPVEYOR_PULL_REQUEST_NUMBER\
65+
)[0].buildNumber\
66+
) { ` \
67+
throw \"There are newer queued builds \
68+
for this pull request, failing early.\" \
69+
}"
70+
71+
- python -m pip install -U scikit-ci==0.5.0
72+
73+
install:
74+
- python -m ci before_install
75+
- python -m ci install
76+
77+
build_script:
78+
- python -m ci before_build
79+
- python -m ci build"
80+
81+
test_script:
82+
- python -m ci test"
83+
84+
after_test:
85+
- python -m ci after_test"
86+
87+
on_finish:
88+
- ps: "\
89+
if ($Env:BLOCK -ceq \"1\") {
90+
$blockRdp = $true ; \
91+
iex (\
92+
(New-Object Net.Webclient).DownloadString(\
93+
'https://raw.githubusercontent.com/\
94+
appveyor/ci/master/scripts/enable-rdp.ps1'\
95+
)\
96+
)
97+
}"
98+
99+
on_failure:
100+
- ps: "Get-EventLog AppVeyor -newest 10 | Format-List"
101+
102+
artifacts:
103+
# Archive the generated packages in the ci.appveyor.com build report.
104+
- path: dist\*
105+
106+
matrix:
107+
fast_finish: false
108+
109+
notifications:
110+
- provider: GitHubPullRequest
111+
auth_token:
112+
secure: iXYaAwXJcHdnRGTeb1Gk1PembhlZleCGDK2oJgsiFvA=
113+
template: >-
114+
{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}}
115+
[Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}})
116+
(commit {{commitUrl}} by @{{&commitAuthorUsername}})
117+
118+
shallow_clone: false

circle-matrix.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
env:
2+
- IMAGE=manylinux-x64 MANYLINUX_PYTHON=/opt/python/cp27-cp27mu/bin/python
3+
- IMAGE=manylinux-x86 MANYLINUX_PYTHON=/opt/python/cp27-cp27mu/bin/python
4+
5+
before_script:
6+
- env | sort
7+
- docker pull dockcross/$IMAGE
8+
- docker run --rm dockcross/$IMAGE > dockcross-$IMAGE
9+
- chmod +x ./dockcross-$IMAGE
10+
- export MANYLINUX_RUN_ENV=./dockcross-$IMAGE
11+
12+
script:
13+
- ci before_install
14+
- ci install
15+
- ci before_build
16+
- ci build
17+
- ci test
18+
- ci after_test

circle.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
machine:
3+
services:
4+
- docker
5+
6+
dependencies:
7+
pre:
8+
- pip install -U scikit-ci==0.5.0 circleci-helpers=0.1.1
9+
10+
test:
11+
override:
12+
- circle-matrix:
13+
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: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
schema_version: "0.5.0"
2+
3+
before_install:
4+
5+
environment:
6+
PYTHON: python
7+
RUN_ENV: ""
8+
9+
commands:
10+
- git clone -b 0.1.0 git://github.com/scikit-build/scikit-ci-addons ../ci
11+
12+
appveyor:
13+
environment:
14+
PYTHON: $<PYTHON_DIR>\\python.exe
15+
RUN_ENV: .\\..\\ci\\appveyor\\run-with-visual-studio.cmd
16+
commands:
17+
- python ../ci/appveyor/patch_vs2008.py
18+
19+
circle:
20+
environment:
21+
PYTHON: $<MANYLINUX_PYTHON>
22+
RUN_ENV: $<MANYLINUX_RUN_ENV>
23+
24+
travis:
25+
osx:
26+
environment:
27+
RUN_ENV: ../ci/travis/run-with-pyenv.sh
28+
commands:
29+
- python ../ci/travis/install_pyenv.py
30+
31+
install:
32+
commands:
33+
- python ../ci/$<CI_NAME>/install_cmake.py 3.6.2
34+
- $<RUN_ENV> $<PYTHON> -m pip install --disable-pip-version-check --upgrade pip
35+
- $<RUN_ENV> $<PYTHON> -m pip install -r requirements-dev.txt
36+
37+
build:
38+
commands:
39+
- $<RUN_ENV> $<PYTHON> setup.py build
40+
41+
after_test:
42+
commands:
43+
- $<RUN_ENV> $<PYTHON> setup.py sdist
44+
- $<RUN_ENV> $<PYTHON> setup.py bdist_wheel

0 commit comments

Comments
 (0)