Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0bec63f
Add linux aarch64 wheel support
odidev Mar 1, 2021
a7d4c66
Support Python 3.10
93578237 Nov 17, 2021
6a45feb
Use pytest
93578237 Nov 17, 2021
53d0301
Fix Makefile
93578237 Nov 17, 2021
27772dd
Reformat
93578237 Nov 17, 2021
ec71778
Update .github/workflows/build-linux.yml
93578237 Jul 19, 2022
0d8454d
Update .github/workflows/build-windows.yml
93578237 Jul 19, 2022
b530335
Update .github/workflows/build-darwin.yml
93578237 Jul 19, 2022
e9ca864
Undo reformat
93578237 Jul 19, 2022
79c0339
Update requirements-dev.txt
93578237 Jul 19, 2022
6aae31b
Upgrade all actions
93578237 Jul 19, 2022
e8426f8
Update Pipfile
93578237 Jul 19, 2022
1bd2667
Add py311
93578237 Oct 29, 2022
3389883
Bump cython
93578237 Nov 6, 2022
59c1c17
Merge pull request #1 from q0w/master
wbarnha Nov 28, 2022
0932ece
Merge pull request #2 from odidev/odidev_cChardet
wbarnha Nov 28, 2022
cd24fe3
Rename cchardet to faust-cchardet
wbarnha Nov 28, 2022
7d924ad
Update README.rst
wbarnha Nov 28, 2022
0b01ee3
automate CI to push to PyPi
wbarnha Nov 28, 2022
233ff65
Merge pull request #3 from faust-streaming/upgrade-ci
wbarnha Nov 28, 2022
e35738b
Bump version to v2.1.8
wbarnha Nov 28, 2022
77bbd92
fix linux builds for aarch (#4)
wbarnha Nov 28, 2022
887d3e4
Fix PyPi uploads (#5)
wbarnha Nov 28, 2022
727409b
Update cibuildwheel in build chains to actually build 3.10 and 3.11 w…
wbarnha Nov 28, 2022
26f81e6
Fix wheel builds for Windows (#8)
wbarnha Dec 9, 2022
e2250c6
bump to 2.1.11
wbarnha Dec 9, 2022
a622250
Use QEMU to build for aarch64 (#9)
wbarnha Dec 12, 2022
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
72 changes: 72 additions & 0 deletions .github/workflows/build-and-upload-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and upload to PyPI

on:
release:
types:
- published

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@v3

- name: Checkout submodules
shell: bash
run: |
git submodule sync --recursive
git submodule update --init --force --recursive --depth=1

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
env:
CIBW_MANYLINUX_X86_64_IMAGE: 'manylinux2014'
CIBW_ARCHS: auto64
CIBW_ARCHS_LINUX: auto64 aarch64
CIBW_BUILD: 'cp3*'
CIBW_SKIP: '*-musllinux_*'
CIBW_BEFORE_BUILD_WINDOWS: make pip

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build for macOS
name: Test for macOS

on:
- push
Expand All @@ -10,31 +10,36 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python 3.11
with:
python-version: "3.11"

- uses: actions/setup-python@v4
name: Install Python 3.10
with:
python-version: "3.10"

- uses: actions/setup-python@v4
name: Install Python 3.9
with:
python-version: "3.9"

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.8
with:
python-version: "3.8"

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.7
with:
python-version: "3.7"

- uses: actions/setup-python@v1
name: Install Python 3.6
with:
python-version: "3.6"

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
python -m pip install cibuildwheel==2.11.2

- name: Checkout submodules
shell: bash
Expand All @@ -46,6 +51,14 @@ jobs:
run: |
pip install -r requirements-dev.txt

- name: Test for Python 3.11
run: |
tox -e py311

- name: Test for Python 3.10
run: |
tox -e py310

- name: Test for Python 3.9
run: |
tox -e py39
Expand All @@ -58,19 +71,8 @@ jobs:
run: |
tox -e py37

- name: Test for Python 3.6
run: |
tox -e py36

- name: Build wheel
if: contains(github.ref, 'tags/')
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*

- uses: actions/upload-artifact@v1
if: contains(github.ref, 'tags/')
with:
name: wheels
path: ./wheelhouse
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-*
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build for Linux
name: Test for Linux

on:
- push
Expand All @@ -7,34 +7,39 @@ on:
jobs:
build_wheels:
name: Build wheel on Linux
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python 3.11
with:
python-version: "3.11"

- uses: actions/setup-python@v4
name: Install Python 3.10
with:
python-version: "3.10"

- uses: actions/setup-python@v4
name: Install Python 3.9
with:
python-version: "3.9"

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.8
with:
python-version: "3.8"

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.7
with:
python-version: "3.7"

- uses: actions/setup-python@v1
name: Install Python 3.6
with:
python-version: "3.6"


- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
python -m pip install cibuildwheel==2.11.2

- name: Checkout submodules
shell: bash
Expand All @@ -46,6 +51,14 @@ jobs:
run: |
pip install -r requirements-dev.txt

- name: Test for Python 3.11
run: |
tox -e py311

- name: Test for Python 3.10
run: |
tox -e py310

- name: Test for Python 3.9
run: |
tox -e py39
Expand All @@ -58,19 +71,8 @@ jobs:
run: |
tox -e py37

- name: Test for Python 3.6
run: |
tox -e py36

- name: Build wheel
if: contains(github.ref, 'tags/')
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*

- uses: actions/upload-artifact@v1
if: contains(github.ref, 'tags/')
with:
name: wheels
path: ./wheelhouse
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-*
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build for windows
name: Test for Windows

on:
- push
Expand All @@ -7,7 +7,7 @@ on:
jobs:
build_wheels:
name: Build wheel on Windows ${{ matrix.config.arch }}
runs-on: windows-latest
runs-on: windows-2019
strategy:
matrix:
config:
Expand All @@ -16,35 +16,41 @@ jobs:
py-architecture: x64

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python 3.11
with:
python-version: "3.11"
architecture: ${{ matrix.config.py-architecture }}

- uses: actions/setup-python@v4
name: Install Python 3.10
with:
python-version: "3.10"
architecture: ${{ matrix.config.py-architecture }}

- uses: actions/setup-python@v4
name: Install Python 3.9
with:
python-version: "3.9"
architecture: ${{ matrix.config.py-architecture }}

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.8
with:
python-version: "3.8"
architecture: ${{ matrix.config.py-architecture }}

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
name: Install Python 3.7
with:
python-version: "3.7"
architecture: ${{ matrix.config.py-architecture }}

- uses: actions/setup-python@v1
name: Install Python 3.6
with:
python-version: "3.6"
architecture: ${{ matrix.config.py-architecture }}

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
python -m pip install cibuildwheel==2.11.2

- name: Checkout submodules
shell: bash
Expand All @@ -56,6 +62,18 @@ jobs:
run: |
pip install -r requirements-dev.txt

- name: Test for Python 3.11
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.config.vs-arch }}
tox -e py311

- name: Test for Python 3.10
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.config.vs-arch }}
tox -e py310

- name: Test for Python 3.9
shell: cmd
run: |
Expand All @@ -74,21 +92,10 @@ jobs:
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.config.vs-arch }}
tox -e py37

- name: Test for Python 3.6
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.config.vs-arch }}
tox -e py36

- name: Build wheel
if: contains(github.ref, 'tags/')
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*

- uses: actions/upload-artifact@v1
if: contains(github.ref, 'tags/')
with:
name: wheels
path: ./wheelhouse
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-*
CIBW_ARCHS: auto64
CIBW_BEFORE_BUILD_WINDOWS: make pip
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
python setup.py nosetests
python -m pytest

clean:
$(RM) -r build dist src/cchardet/__pycache__ src/cchardet/*.cpp src/cchardet/*.pyc src/cchardet/*.so src/cchardet.egg-info src/tests/__pycache__ src/tests/*.pyc
Expand All @@ -17,9 +17,7 @@ install: clean
python setup.py install

build-wheels-on-manylinux2014:
docker pull quay.io/pypa/manylinux2014_i686
docker pull quay.io/pypa/manylinux2014_x86_64
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_i686 bash dockerfiles/buildwheel.sh
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash dockerfiles/buildwheel.sh

build: clean pip test sdist build-wheels-on-manylinux2014
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ verify_ssl = true
chardet = "==3.0.4"
nose = "==1.3.7"
tox = "==3.20.1"
Cython = "==0.29.21"
Cython = "==0.29.32"
pylint = "==2.6.0"
wheel = "==0.35.1"
twine = "==3.2.0"
Expand Down
Loading