Skip to content

Commit

Permalink
add windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
GBeauregard committed Sep 14, 2021
1 parent 85d99b7 commit d51b047
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install tox and any other packages
run: pip install tox
- name: Package with tox
run: tox -e package
- name: Package and Build
run: tox -e package,pex
- name: Publish Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand All @@ -30,3 +30,24 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} dist/*.tar.gz dist/*.whl build/*.pex

windows-build:
runs-on: windows-latest
strategy:
matrix:
python: [3.9]

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox and any other packages
run: pip install tox
- name: Package and Build
run: tox -e nuitka-win
- name: Upload Release to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} build/*.exe
4 changes: 4 additions & 0 deletions src/cli_entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from pyffstream import cli

if __name__ == "__main__":
cli.main()
31 changes: 30 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,38 @@ commands =
[testenv:package]
deps =
flit
pex
commands =
flit build

[testenv:pex]
deps =
pex
commands =
pex . "pex>=2.1.35" --console-script pyffstream --compile --output-file build/pyffstream.pex

[testenv:nuitka-win]
deps =
nuitka
zstandard
commands =
nuitka3 \
--assume-yes-for-downloads \
--onefile \
--mingw64 \
--include-module=platformdirs.windows \
--python-flag=-OO \
-o build/pyffstream.exe \
--windows-icon-from-ico=icon\icon.ico \
--windows-product-version=0.0.0.1 \
--windows-company-name=aphysically \
--windows-file-description="A simple app to facilitate streaming via ffmpeg." \
--output-dir=build \
#--nofollow-import-to=setuptools \
#--nofollow-import-to=pkg_resources \
#--enable-plugin=anti-bloat \
src\cli_entry.py
)
WINEPREFIX="$w_prefix" wine "${nuitka_flags[@]}"
pex . "pex>=2.1.35" --console-script pyffstream --compile --output-file build/pyffstream.pex

[flake8]
Expand Down

0 comments on commit d51b047

Please sign in to comment.