1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
variables:
qpdf_version: "8.4.2"
qpdf_release: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}.tar.gz', variables.qpdf_version) }}
jpeg_release: "https://www.ijg.org/files/jpegsrc.v9c.tar.gz"
zlib_release: "https://www.zlib.net/zlib-1.2.11.tar.gz"
cibw_skip: "cp27-* cp34-*"
cibw_test_command: "pytest -nauto {project}/tests"
cibw_test_requires: "-r requirements/test.txt"
cibuildwheel_version: "0.11.1"
cibw_before_build: "pip install pybind11"
jobs:
- job: linux_sdist
pool: {vmImage: 'Ubuntu-16.04'}
steps:
- task: UsePythonVersion@0
- bash: |
mkdir qpdf && wget -q $QPDF_RELEASE -O - | tar xz -C qpdf --strip-components=1
cd qpdf/
./configure
make -j 2
sudo make install
cd ..
displayName: "Build QPDF"
- bash: |
python -m pip install --upgrade pip
python setup.py sdist
python -m pip install pybind11
python -m pip install --verbose dist/*.tar.gz
python -m pip install -r requirements/test.txt
displayName: "Build sdist"
- bash: |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
python -m pytest -nauto
displayName: "Test"
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'dist'}
- job: linux
pool: {vmImage: 'Ubuntu-16.04'}
variables:
cibw_environment: >-
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
CXXFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib"
cibw_before_build: >- # yaml: folded newlines to spaces, no newline at end
[ ! -f /usr/local/lib/libz.a ] &&
cd zlib &&
./configure &&
make -j install &&
cd .. ;
[ ! -f /usr/local/lib/libjpeg.a ] &&
cd jpeg &&
./configure &&
make -j install &&
cd .. ;
[ ! -f /usr/local/lib/libqpdf.a ] &&
cd qpdf &&
./autogen.sh &&
./configure &&
make -j install &&
cd .. ;
pip install pybind11
steps:
- task: UsePythonVersion@0
- bash: |
mkdir zlib && wget -q $ZLIB_RELEASE -O - | tar xz -C zlib --strip-components=1
mkdir jpeg && wget -q $JPEG_RELEASE -O - | tar xz -C jpeg --strip-components=1
mkdir qpdf && wget -q $QPDF_RELEASE -O - | tar xz -C qpdf --strip-components=1
- bash: source azure-pipelines/build.bash
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- job: macos
pool: {vmImage: 'macOS-10.13'}
variables:
cibw_before_build: >-
pip install pybind11 &&
brew install qpdf
steps:
- task: UsePythonVersion@0
- bash: source azure-pipelines/build.bash
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- job: windows64
pool: {vmImage: 'vs2017-win2016'}
variables:
qpdf_windows: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}-bin-msvc64.zip', variables.qpdf_version) }}
qpdf_dll: "qpdf21.dll"
cibw_skip: "cp27-* cp34-* cp35-win32* cp36-win32* cp37-win32*"
cibw_environment: >-
INCLUDE="$INCLUDE;c:\\qpdf\\include"
LIB="$LIB;c:\\qpdf\\lib"
LIBPATH="$LIBPATH;c:\\qpdf\\lib"
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.5', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- powershell: azure-pipelines/win-download-qpdf.ps1
displayName: "Download QPDF"
- bash: source azure-pipelines/build.bash
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
- job: windows32
pool: {vmImage: 'vs2017-win2016'}
variables:
qpdf_windows: ${{ format('https://github.com/qpdf/qpdf/releases/download/release-qpdf-{0}/qpdf-{0}-bin-msvc32.zip', variables.qpdf_version) }}
qpdf_dll: "qpdf21.dll"
cibw_skip: "cp27-* cp34-* cp35-win_amd64* cp36-win_amd64* cp37-win_amd64*"
cibw_environment: >-
INCLUDE="$INCLUDE;c:\\qpdf\\include"
LIB="$LIB;c:\\qpdf\\lib"
LIBPATH="$LIBPATH;c:\\qpdf\\lib"
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.5', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x86}}
- powershell: azure-pipelines/win-download-qpdf.ps1
displayName: "Download QPDF"
- bash: source azure-pipelines/build.bash
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
|