This commit is contained in:
parent
584a75594c
commit
02a98b6bfc
51
README.md
51
README.md
@ -1,6 +1,6 @@
|
|||||||
# wine python windows builder
|
# wine python windows builder
|
||||||
|
|
||||||
Python for windows container.
|
Archlinux based image with wine-staging and pyinstaller
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
|
||||||
@ -11,15 +11,54 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
path: /drone/src
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.asperti.com/paspo/python-windows-builder
|
image: git.argideli.com/quertex/docker-win-pyinstaller:latest
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
# add dependancy
|
|
||||||
- wine c:/python/python.exe -m pip install cryptography
|
|
||||||
# prepare output directory
|
# prepare output directory
|
||||||
- mkdir -p /drone/src/out/
|
- mkdir -p /drone/src/out/
|
||||||
# build
|
- mkdir -p /drone/src/dist/
|
||||||
- wine c:/python/Scripts/pyinstaller.exe --onefile --distpath z:/drone/src/out z:/drone/src/prepara_xml.py
|
# add dependancies
|
||||||
|
- pacman -Sy --noconfirm --needed wget ...
|
||||||
|
# linux build
|
||||||
|
- cd /drone/src/
|
||||||
|
- python -m venv --system-site-packages venv
|
||||||
|
- source venv/bin/activate
|
||||||
|
- pip3 list
|
||||||
|
- pip3 config --user set global.progress_bar off
|
||||||
|
- pip3 install --ignore-installed -r requirements.txt
|
||||||
|
- pyinstaller --onefile --name matomo-csv-util.bin --hidden-import=tkinter -y --distpath /drone/src/out/ /drone/src/main.py
|
||||||
|
- deactivate
|
||||||
|
- cp -v out/matomo-csv-util.bin dist/
|
||||||
|
# clean up
|
||||||
|
- rm -rf venv
|
||||||
|
- rm -rf /drone/src/out
|
||||||
|
- mkdir -p /drone/src/out/
|
||||||
|
# windows build
|
||||||
|
- wine c:/python/python.exe -m pip config --user set global.progress_bar off
|
||||||
|
- wine c:/python/python.exe -m pip install --prefer-binary -r z:/drone/src/requirements.txt
|
||||||
|
- wine c:/python/Scripts/pyinstaller.exe --onefile --name matomo-csv-util --hidden-import=tkinter -y --distpath z:/drone/src/out z:/drone/src/main.py
|
||||||
|
- cp -v out/matomo-csv-util.exe dist/
|
||||||
|
|
||||||
|
- name: gitea_release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://git.argideli.com
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
files: /drone/src/dist/*
|
||||||
|
checksum:
|
||||||
|
- md5
|
||||||
|
- sha256
|
||||||
|
- crc32
|
||||||
|
when:
|
||||||
|
allConditions:
|
||||||
|
- event: tag
|
||||||
|
|
||||||
|
image_pull_secrets:
|
||||||
|
- docker_token
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user