1: # tutorial:
2: # https://packaging.python.org/tutorials/packaging-projects/
3: # https://packaging.python.org/guides/supporting-windows-using-appveyor/
4: # https://stackoverflow.com/questions/45630032/valueerror-no-pkg-info-in-archive
5:
6: environment:
7: APP_VERSION: '2.2'
8: # for pypi/twine
9: USER: '__token__'
10: PASS:
11: secure: W0Gy5WrAKN5vEEgBvcbrQREbSq5zi5l3vIUFXB6ueKq9yj6vTLuKGfyR1crLjv9G0r4qABt6ZkObVQ+tSJ/YRcokdTnV1+GEpTxbB/qe0riXO0LeoHKIxwV+oyCtVpNk9c5YmJ3eu7XHjrCLvS1LLuJuSfwylgCQ5kC60fQu8XuqDNdZbMRo0m4v+oAlMuumC1YeGcYEMQbaioz1N7ebwFmOzHoVskVo15LTHwA7s5ERRIWIP0D2z64+02hAKkKzN5d80/oBZd3uDu9d2FFS9mUeyx82KC20GqO9kO9DGWw=
12: matrix:
13: - PYTHON_VER: C:\Python27
14: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
15: SETUP_COMPILER_FLAG: --compiler=mingw32
16: ARCH_BITS: 32
17: - PYTHON_VER: C:\Python35
18: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
19: SETUP_COMPILER_FLAG:
20: ARCH_BITS: 32
21: - PYTHON_VER: C:\Python36
22: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
23: SETUP_COMPILER_FLAG:
24: ARCH_BITS: 32
25: - PYTHON_VER: C:\Python36-x64
26: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
27: SETUP_COMPILER_FLAG:
28: ARCH_BITS: 64
29: - PYTHON_VER: C:\Python37
30: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
31: SETUP_COMPILER_FLAG:
32: ARCH_BITS: 32
33: - PYTHON_VER: C:\Python37-x64
34: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
35: SETUP_COMPILER_FLAG:
36: ARCH_BITS: 64
37: - PYTHON_VER: C:\Python38
38: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
39: SETUP_COMPILER_FLAG:
40: ARCH_BITS: 32
41: - PYTHON_VER: C:\Python38-x64
42: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
43: SETUP_COMPILER_FLAG:
44: ARCH_BITS: 64
45: - PYTHON_VER: C:\Python39
46: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
47: SETUP_COMPILER_FLAG:
48: ARCH_BITS: 32
49: - PYTHON_VER: C:\Python39-x64
50: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
51: SETUP_COMPILER_FLAG:
52: ARCH_BITS: 64
53: - PYTHON_VER: C:\Python310
54: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
55: SETUP_COMPILER_FLAG:
56: ARCH_BITS: 32
57: - PYTHON_VER: C:\Python310-x64
58: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
59: SETUP_COMPILER_FLAG:
60: ARCH_BITS: 64
61:
62:
63: version: '$(APP_VERSION).{build}'
64:
65: install:
66: - set PATH=%PYTHON_VER%;%PYTHON_VER%\Scripts;%PATH%;C:\msys64\mingw%ARCH_BITS%\bin
67: # We need wheel installed to build wheels
68: - "%PYTHON_VER%\\python.exe -m pip install wheel"
69: - echo "using twine login %USER% %PASS%"
70: - echo %PATH%
71: - cc -v
72:
73: build_script:
74: - cd miniupnpc
75: - appveyor AddCompilationMessage "Building miniupnpc"
76: - mingw32-make -f Makefile.mingw
77: - appveyor AddCompilationMessage "Building python module"
78: - mingw32-make -f Makefile.mingw pythonmodule PYTHON=%PYTHON_VER%\python
79:
80: after_build:
81: - 7z a -x!wingenminiupnpcstrings.exe ..\miniupnpc_%ARCH_BITS%b-%APPVEYOR_BUILD_VERSION%.zip *.exe *.dll *.a *.lib
82:
83: artifacts:
84: - path: miniupnpc*-$(appveyor_build_version).zip
85: name: miniupnpc binaries
86: - path: miniupnpc/dist/miniupnpc-*.whl
87: name: miniupnpc python wheel (self-contained)
88: - path: miniupnpc/dist/miniupnpc-*.egg
89: name: miniupnpc python egg (self-contained)
90:
91: deploy_script:
92: - appveyor AddCompilationMessage "Deploying to PyPI"
93: - '%PYTHON_VER%\\python.exe -m pip install twine'
94: - '%PYTHON_VER%\\python.exe -m twine upload -u %USER% -p %PASS% --skip-existing dist/*.whl dist/*.egg'
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>