Skip to content

Commit

Permalink
Merge pull request #25 from Rongronggg9/master
Browse files Browse the repository at this point in the history
Drop Python 3.6 support and add 3.11 support.
  • Loading branch information
Lonami committed Oct 27, 2022
2 parents e5a8636 + 54280fb commit 9edc433
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
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
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

0 comments on commit 9edc433

Please sign in to comment.