-
Notifications
You must be signed in to change notification settings - Fork 23
/
.appveyor.yml
67 lines (56 loc) · 3.06 KB
/
.appveyor.yml
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
# taken from https://github.com/joerick/cibuildwheel-autopypi-example/blob/master/appveyor.yml
# to replicate on you own repository you need to
# 1) create account on pypi.org, test.pypi.org and ci.appveryor.com
# 2) on pypi.org create an API token y(ou can call it "<ProjetName> Appveyor") and an copy the string or let the browser window open
# 3) on appveyor go on https://ci.appveyor.com/tools/encrypt and encryp the string test.pypi.org, copy the encrypted string in the secure subflied
# of "encrypted_pypi_api_token" in the branches/only/master part
# 4) do step 3 and 4 but this time on test.pypi.org , fill in of "encrypted_pypi_api_token" in the branches/only/pypi_test part
image:
- Visual Studio 2019
- ubuntu
platform:
- x64
skip_branch_with_pr: true
branches:
only:
- master
environment:
encrypted_pypi_api_token:
secure: fNsmdisSE4Xu6Z7tsGXuPlwqeGdI9AyuVEDC2+nD1H+rBBzXC6Adc1wjoFpOhdkGUXU3aWwgN6uvTZdv1SfIqKmNRcaIRtrmVyRMkg10D6pWzhI+y5NqL9Ki13HP+gCCtc3gaoHT6ZrVGNMViaZcvOnoDRdZx6kxIzyvsjyI6jtvZNHpQUOlUeSUf+ER6YnKhfgM+b4TCXWKWrhtjTd4JR7Vao6Pv6n8LuquYnT9LOc=
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
CIBW_SKIP: cp27-* cp33-* cp34-* cp35-* cp36-* cp37-* cp38-* cp311-* pp* *-win32 *_i686"
CIBW_BEFORE_BUILD: pip install -r requirements_build.txt
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements_build.txt
TWINE_USERNAME: __token__
TWINE_PASSWORD:
secure: fNsmdisSE4Xu6Z7tsGXuPlwqeGdI9AyuVEDC2+nD1H+rBBzXC6Adc1wjoFpOhdkGUXU3aWwgN6uvTZdv1SfIqKmNRcaIRtrmVyRMkg10D6pWzhI+y5NqL9Ki13HP+gCCtc3gaoHT6ZrVGNMViaZcvOnoDRdZx6kxIzyvsjyI6jtvZNHpQUOlUeSUf+ER6YnKhfgM+b4TCXWKWrhtjTd4JR7Vao6Pv6n8LuquYnT9LOc=
build_script:
# releasing pure source distribution (no binaries) as tar.gz file on pypi
- cmd: set PYTHON=C:\Miniconda38-x64
- cmd: set PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PYTHON%\Lib\site-packages;%PATH%;
- cmd: echo %PATH%
- cmd: pip install -r requirements_build.txt
- cmd: python setup.py sdist
# testing the installation from source distribution
- cmd: for /f "delims=" %%a in ('dir /b /s .\dist\*.tar.gz') do set targz_file=%%a
- cmd: pip install %targz_file%
# releasing precompiled wheels for linux
- sh: sudo pip install cibuildwheel
- sh: cibuildwheel --output-dir wheelhouse --platform linux
# releasing precompiled wheels for windows
- cmd: pip install cibuildwheel
- cmd: cibuildwheel --output-dir wheelhouse
# uploading to windows weels and source distribution pipy
- cmd: pip install twine
- cmd: echo %TWINE_REPOSITORY_URL%
- cmd: python -m twine upload dist/*.tar.gz --skip-existing -p %encrypted_pypi_api_token%
- cmd: python -m twine upload wheelhouse/*.whl --skip-existing -p %encrypted_pypi_api_token%
# uploading to linux weels and source distribution pipy
- sh: sudo pip install twine
- sh: echo $TWINE_REPOSITORY_URL
- sh: python -m twine upload wheelhouse/*.whl --skip-existing -p $encrypted_pypi_api_token
artifacts:
- path: "wheelhouse\\*.whl"
name: Wheels
- path: "dist/*.tar.gz"
name: Source_distribution