blob: 596dce72934c3dfebfb34733e535452457c03045 (
plain)
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
|
version: '{build}'
image: Visual Studio 2015
platform:
- x64
- x86
environment:
global:
DISTUTILS_USE_SDK: 1
MSSdk: 1
matrix:
- PYTHON: 35
- PYTHON: 36
- PYTHON: 37
TWINE_PASSWORD:
secure: RZZXYbbTOzKMSE/GdzIG/x+eqehSEeu98j0Ggs+/fG8=
install:
- cmd: '"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM%'
- ps: |
$userpath = "$env:APPDATA\Python\Python$env:PYTHON\Scripts"
if ($env:PLATFORM -eq "x64") {
$env:PYTHON = "$env:PYTHON-x64"
$qpdfdll = "https://github.com/qpdf/qpdf/releases/download/release-qpdf-8.4.2/qpdf-8.4.2-bin-msvc64.zip"
} else {
$qpdfdll = "https://github.com/qpdf/qpdf/releases/download/release-qpdf-8.4.2/qpdf-8.4.2-bin-msvc32.zip"
}
$env:PATH = "C:\Python$env:PYTHON;C:\Python$env:PYTHON\Scripts;$userpath;$env:PATH"
echo $env:PATH
python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel
pip install pybind11
Invoke-WebRequest -Uri $qpdfdll -OutFile "qpdf-release.zip"
7z x "qpdf-release.zip" -oc:\
$qpdfdir = Get-ChildItem c:\qpdf-*
Move-Item -Path $qpdfdir -Destination c:\qpdf
build_script:
- ps: |
cp c:\qpdf\bin\qpdf21.dll src\pikepdf
$env:INCLUDE += ";c:\qpdf\include"
$env:LIB += ";c:\qpdf\lib"
$env:LIBPATH +=";c:\qpdf\lib"
python setup.py bdist_wheel
$wheel = Get-ChildItem -Path dist\pikepdf*.whl
pip install --verbose $wheel
test_script:
- pip install -r requirements/test.txt
- pytest -n auto
artifacts:
- path: dist\*.whl
name: pypi
deploy_script:
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
pip install twine
$env:TWINE_USERNAME = "ocrmypdf-travis"
twine upload dist\*.whl
}
|