Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 31 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v1
- uses: actions/setup-python@v6
with:
python-version: 3.8
python-version: 3.x
- name: Run lint
run: |
python -m pip install tox
Expand All @@ -22,17 +22,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Set git to use LF on Windows
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand All @@ -44,16 +44,18 @@ jobs:
package-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v1
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build source package
run: python setup.py sdist
run: |
pip install build
python -m build --sdist
- name: Upload source package
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v5
with:
name: sdist
path: dist/
Expand All @@ -62,20 +64,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: manylinux
os: ubuntu-latest
- name: macos
os: macos-latest
- name: win
os: windows-latest
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-python@v2

- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
# - name: Install Visual C++ for Python 2.7
Expand All @@ -87,44 +84,39 @@ jobs:
with:
platforms: all

- name: Build wheels for Windows # see issue #174
if: runner.os == 'Windows'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}*

- name: Build wheels for Linux and macOS
if: runner.os != 'Windows'
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}*
CIBW_BUILD: cp38-* pp*-*
CIBW_SKIP: "*musllinux*"
CIBW_ENABLE: pypy
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.name }}
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

publish:
runs-on: ubuntu-latest
needs: [lint, test, package-sdist, package-wheel]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
- uses: actions/checkout@v5
- uses: actions/download-artifact@v6
with:
name: sdist
path: dist/
- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v6
with:
name: wheels-win
name: wheels-windows-latest
path: dist/
- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v6
with:
name: wheels-macos
name: wheels-macos-latest
path: dist/
- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v6
with:
name: wheels-manylinux
name: wheels-ubuntu-latest
path: dist/
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def finalize_options(self):
install_requires=[
"cffi>=1.0.0",
],
python_requires=">=3.7",
python_requires=">=3.8",
cffi_modules=["src/brotlicffi/_build.py:ffi"],
packages=find_packages('src'),
package_dir={'': 'src'},
Expand All @@ -113,7 +113,6 @@ def finalize_options(self):
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down