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

Drop Python 3.6 support and add 3.11 support #25

Merged
merged 3 commits into from Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 20 additions & 9 deletions .github/workflows/wheels.yml
Expand Up @@ -19,43 +19,54 @@ jobs:
arch: aarch64

steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- name: Enable zram
# prevent OOM killer from killing cargo (especially aarch64)
# PERCENTAGE=100 is safe: https://fedoraproject.org/wiki/Changes/Scale_ZRAM_to_full_memory_size
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must've been a tough one to figure out.

if: ${{ matrix.arch == 'aarch64' }}
run: |
sudo apt-get update -yq
sudo apt-get install -yq linux-modules-extra-azure zram-tools
echo -e 'CORES=1\nPERCENTAGE=100' | sudo tee -a /etc/default/zramswap
sudo systemctl restart zramswap
swapon
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
if: ${{ matrix.arch == 'aarch64' }}
name: Set up QEMU
- uses: pypa/cibuildwheel@v2.1.2
- uses: pypa/cibuildwheel@v2.11.2
env:
CIBW_BUILD_VERBOSITY: "1"
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && yum install -y openssl-devel"
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_SKIP: cp36-* *musllinux*

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

build_sdist:
name: Build source distribution
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Build sdist
run: python -m pip install -r requirements.txt && python setup.py sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
- uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
password: ${{ secrets.pypi_token }}
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
grammers-crypto = "0.3.0"
pyo3 = { version = "0.14.4", features = ["extension-module"] }
pyo3 = { version = "0.17.2", features = ["extension-module"] }

[lib]
name = "cryptg"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -42,11 +42,11 @@ def main(args):
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
keywords="telegram crypto cryptography mtproto aes",

Expand Down