diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ed253d1..cd2849033 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build +name: Tests on: pull_request: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 000000000..f30157514 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,37 @@ +name: Build + +on: + pull_request: + branches: + - '**' + push: + branches: + - master + + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, windows-2019, macOS-11] + + steps: + - uses: actions/checkout@v4 + + # Used to host cibuildwheel + - uses: actions/setup-python@v3 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.16.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + # to supply options, put them in 'env', like: + # env: + # CIBW_SOME_OPTION: value + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2b61b5025..b16e2717c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -16,6 +16,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[ === Enhancements +* Pre-built binaries available on PyPI for Linux, Windows and macOS! ({uri-issue}451[#451]) * Support for RDP version 10.11 ({uri-issue}433[#433]) * Support for Python 3.11 by updating PyAV to get pre-built binary wheels ({uri-issue}437[#437], {uri-issue}438[#438]) * MITM start and termination log messages are now part of the JSON logs ({uri-issue}447[#447]) @@ -33,6 +34,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[ * Added Python 3.10 tests on Windows to CI test configuration ({uri-issue}439[#439]) * Replaced Python 3.10 with Python 3.11 for CI test configuration ({uri-issue}438[#438]) * Added Ubuntu 20.04 in CI test configuration +* Using cibuildwheel for cross-platform and cross-python builds Windows, Linux, macOS ({uri-issue}451[#451]) * Deprecation cleanup in CI ({uri-issue}452[#452]) diff --git a/docs/devel.adoc b/docs/devel.adoc index b012deb52..7b263b589 100644 --- a/docs/devel.adoc +++ b/docs/devel.adoc @@ -45,6 +45,20 @@ docker images (latest, slim), on linux, on Windows * sections, vim's: `%s/^=== \(.*\)$/## \1/gc` * asciidoc links to markdown with vim: `%s/link:\([^\[]\+\)\(\[[^\[]\+\]\)/\2(\1)/gc` +.Upload binaries to PyPI + +Instructions are partially from: https://cibuildwheel.readthedocs.io/en/stable/deliver-to-pypi/#manual-method + + rm -rf dist/ + # Make a source distribution + pipx run build --sdist + +* Download packages built (called artifacts) by the https://github.com/GoSecure/pyrdp/actions/workflows/wheels.yml[Build workflow on GitHub] that are from the release commit +* Extract the zip in the dist/ directory + + # Upload using 'twine' + pipx run twine upload dist/* + .Post-release * Update version in `pyproject.toml` (+1 bugfix, append '.dev0') and commit * commit msg: Begin development on next release diff --git a/pyproject.toml b/pyproject.toml index 6f146c964..d5874b680 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,9 +7,7 @@ build-backend = "setuptools.build_meta" name = "pyrdp" description = "Remote Desktop Protocol (RDP) Monster-in-the-Middle tool and Python library" readme = "README.md" -#license = "GPL-3.0-or-later" -# TODO automatically pull from this in the code -version = "1.2.1.dev0" +version = "2.0.0.rc1" requires-python = ">=3.7" authors = [ { name = "Olivier Bilodeau", email = "obilodeau@gosecure.net" },