Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci, including: dropping support for 3.7 #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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'
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
with:
python-version: 3.x
- name: Build source package
run: python setup.py sdist
run: pipx run build --sdist
- name: Upload source package
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -91,13 +91,13 @@ jobs:
if: runner.os == 'Windows'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}*
CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}*

- name: Build wheels for Linux and macOS
if: runner.os != 'Windows'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp37-${{ matrix.name }}* pp*-${{ matrix.name }}*
CIBW_BUILD: cp38-${{ matrix.name }}* pp*-${{ matrix.name }}*
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BEFORE_BUILD_LINUX: yum install -y libffi-devel
- uses: actions/upload-artifact@v2
Expand Down
47 changes: 19 additions & 28 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,30 @@ Build the project sdist locally

```
$ cd example/
$ python setup.py sdist
$ pipx run build
$ ls dist/
example-brotli-project-0.1.0.tar.gz
example_brotli_project-0.1.0-py3-none-any.whl example_brotli_project-0.1.0.tar.gz
```

### Installing on CPython

Run `python:3.7-slim` Docker image to test against CPython
Run `python:3.12-slim` Docker image to test against CPython

```
$ docker run --rm -it -v $(pwd)/dist:/dist python:3.7-slim /bin/bash
$ docker run --rm -it -v $(pwd)/dist:/dist python:3.12-slim /bin/bash
```

Install the example project

```
$ python -m pip install /dist/example-brotli-project-0.1.0.tar.gz
Processing /dist/example-brotli-project-0.1.0.tar.gz
Collecting brotli
Downloading Brotli-1.0.9-cp37-cp37-manylinux1_x86_64.whl (357 kB)
|████████████████████████████████| 357 kB 1.9 MB/s
Building wheels for collected packages: example-brotli-project
Building wheel for example-brotli-project (setup.py) ... done
Created wheel for example-brotli-project: filename=example_brotli_project-0.1.0-py3-none-any.whl size=1976 sha256=b94975444c08cf82f395c8277e29b5b6f3b3270dd4f7d224482e4493be89c6bd
Stored in directory: /root/.cache/pip/wheels/be/67/36/911a88789436560de345984e6c4c3785098e98b92dcbab5980
Successfully built example-brotli-project
$ python -m pip install /dist/example_brotli_project-0.1.0-py3-none-any.whl
Processing /dist/example_brotli_project-0.1.0-py3-none-any.whl
Collecting brotli (from example-brotli-project==0.1.0)
Downloading Brotli-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
Downloading Brotli-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 10.5 MB/s eta 0:00:00
Installing collected packages: brotli, example-brotli-project
Successfully installed brotli-1.0.9 example-brotli-project-0.1.0
Successfully installed brotli-1.1.0 example-brotli-project-0.1.0
```

Notice that `Brotli` is installed from PyPI instead of `brotlicffi` on CPython.
Expand All @@ -87,23 +83,18 @@ Decompressed data: b'Hello, world!'

### Installing on PyPy

Run `pypy:3.7-slim` Docker image to test against PyPy
Run `pypy:3.10-slim` Docker image to test against PyPy

```
$ docker run --rm -it -v $(pwd)/dist:/dist pypy:3.7-slim /bin/bash
$ pypy -m pip install /dist/example-brotli-project-0.1.0.tar.gz
Processing /dist/example-brotli-project-0.1.0.tar.gz
$ docker run --rm -it -v $(pwd)/dist:/dist pypy:3.10-slim /bin/bash
$ pypy -m pip install /dist/example_brotli_project-0.1.0-py3-none-any.whl
Processing /dist/example_brotli_project-0.1.0-py3-none-any.whl
Collecting brotlicffi
Downloading brotlicffi-0.8.0-pp37-pypy37_pp73-manylinux1_x86_64.whl (341 kB)
|████████████████████████████████| 341 kB 2.8 MB/s
Requirement already satisfied: cffi>=1.0.0 in /opt/pypy/lib_pypy (from brotlicffi->example-brotli-project==0.1.0) (1.14.2)
Building wheels for collected packages: example-brotli-project
Building wheel for example-brotli-project (setup.py) ... done
Created wheel for example-brotli-project: filename=example_brotli_project-0.1.0-py3-none-any.whl size=1976 sha256=566f5bfb3a0d74d11485b02b929a09d6e6cc8bab7c409cf30ff50f2067692356
Stored in directory: /root/.cache/pip/wheels/cb/e1/0f/337346ea74252e5b652824bb0f2fc82e81208f9f8e3de42465
Successfully built example-brotli-project
Downloading brotlicffi-1.1.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (378 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 378.6/378.6 kB 4.8 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.0.0 in /opt/pypy/lib/pypy3.10 (from brotlicffi->example-brotli-project==0.1.0) (1.17.0.dev0)
Installing collected packages: brotlicffi, example-brotli-project
Successfully installed brotlicffi-0.8.0 example-brotli-project-0.1.0
Successfully installed brotlicffi-1.1.0.0 example-brotli-project-0.1.0
```

Notice now that `brotlicffi` is installed from PyPI instead of `Brotli` on CPython.
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
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37, py38, py39, py310, py311, py312, pypy, lint
envlist = py38, py39, py310, py311, py312, pypy, lint

[testenv]
deps= -r{toxinidir}/test_requirements.txt
Expand Down