Skip to content

Commit f957ce5

Browse files
committed
Update TgCrypto to v1.2.11
1 parent fddda9d commit f957ce5

File tree

4 files changed

+99
-24
lines changed

4 files changed

+99
-24
lines changed

.github/workflows/wheels.yml

Lines changed: 84 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,103 @@
1-
name: Build wheels
1+
name: Build wheels AND Upload Python Package
22

3-
on: [push]
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
tags:
8+
- '*'
9+
workflow_dispatch: {}
10+
11+
permissions:
12+
contents: write
413

514
jobs:
615
build_wheels:
7-
name: Build wheels on ${{ matrix.os }}
8-
runs-on: ${{ matrix.os }}
16+
name: Build wheels on ${{ matrix.os.name }}
17+
runs-on: ${{ matrix.os.name }}
918
strategy:
1019
matrix:
11-
os: [ubuntu-latest, windows-latest, macos-latest]
20+
os:
21+
- name: "ubuntu-22.04"
22+
platform: "linux"
23+
platform_id: "manylinux_x86_64"
24+
25+
- name: "ubuntu-22.04-arm"
26+
platform: "linux"
27+
platform_id: "manylinux_aarch64"
28+
29+
- name: "macos-13"
30+
platform: "macos"
31+
min_macos_version: "13"
32+
platform_id: "macosx_x86_64"
33+
34+
- name: "macos-14"
35+
platform: "macos"
36+
min_macos_version: "14"
37+
platform_id: "macosx_arm64"
38+
39+
- name: "windows-2022"
40+
platform: "windows"
41+
platform_id: "win_amd64"
1242

1343
steps:
14-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 1
47+
48+
- name: Set up QEMU
49+
if: runner.os == 'Linux' && runner.arch == 'X64'
50+
uses: docker/setup-qemu-action@v3
51+
with:
52+
platforms: all
1553

1654
- name: Build wheels
17-
uses: pypa/cibuildwheel@v2.11.2
55+
uses: pypa/cibuildwheel@v2.23.0
1856
env:
57+
CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le s390x' || 'auto armv7l' }}
1958
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
2059
CIBW_TEST_REQUIRES: tox
2160
CIBW_TEST_COMMAND: cd {project} && tox
22-
CIBW_TEST_SKIP: "*-win*"
61+
CIBW_TEST_SKIP: "*"
2362
CIBW_BUILD_VERBOSITY: 1
2463

2564
- name: Store wheels
26-
uses: actions/upload-artifact@v2
65+
uses: actions/upload-artifact@v4
2766
with:
67+
name: dist-${{ matrix.os.name }}-${{ strategy.job-index }}
2868
path: ./wheelhouse/*.whl
69+
70+
publish:
71+
name: Publish wheels to PyPI
72+
needs: build_wheels
73+
runs-on: ubuntu-latest
74+
75+
steps:
76+
- name: Download artifacts
77+
uses: actions/download-artifact@v4
78+
with:
79+
pattern: dist-*
80+
path: dist
81+
82+
- name: Setup python
83+
uses: actions/setup-python@v5
84+
with:
85+
python-version: '3.12'
86+
87+
- name: Install Twine
88+
run: |
89+
pip install twine
90+
cd dist && for i in $(ls); do mv ${i}/*.whl .; rmdir ${i}; done && cd ..
91+
92+
- name: Create Release
93+
uses: ncipollo/[email protected]
94+
with:
95+
artifacts: "dist/*.whl"
96+
tag: "TgCrypto-${{ github.ref_name }}"
97+
commit: ${{ github.sha }}
98+
99+
- name: Publish wheels to PyPI
100+
run: twine upload dist/*
101+
env:
102+
TWINE_USERNAME: __token__
103+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# TgCrypto
22

3-
> [!NOTE]
4-
> The project is no longer maintained or supported. Thanks for appreciating it.
5-
63
> [!NOTE]
74
> The implementations of the algorithms presented in this repository are to be considered for educational purposes only.
85

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["setuptools<=69.5.1", "wheel<=0.43.0"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
readme = f.read()
2323

2424
setup(
25-
name="TgCrypto",
26-
version="1.2.5",
25+
name="PyTgCrypto",
26+
version="1.2.11",
2727
description="Fast and Portable Cryptography Extension Library for Pyrogram",
2828
long_description=readme,
2929
long_description_content_type="text/markdown",
30-
url="https://github.com/pyrogram",
31-
download_url="https://github.com/pyrogram/tgcrypto/releases/latest",
32-
author="Dan",
33-
author_email="dan@pyrogram.org",
30+
url="https://github.com/TelegramPlayGround/pyrogram",
31+
download_url="https://github.com/TelegramPlayGround/pyrogram-tgcrypto/releases/latest",
32+
author="SpEcHIDe",
33+
author_email="pyrogram@iamidiotareyoutoo.com",
3434
license="LGPLv3+",
3535
classifiers=[
3636
"Development Status :: 5 - Production/Stable",
@@ -45,6 +45,8 @@
4545
"Programming Language :: Python :: 3.9",
4646
"Programming Language :: Python :: 3.10",
4747
"Programming Language :: Python :: 3.11",
48+
"Programming Language :: Python :: 3.12",
49+
"Programming Language :: Python :: 3.13",
4850
"Programming Language :: Python :: Implementation",
4951
"Programming Language :: Python :: Implementation :: CPython",
5052
"Programming Language :: Python :: Implementation :: PyPy",
@@ -58,10 +60,11 @@
5860
],
5961
keywords="pyrogram telegram crypto cryptography encryption mtproto extension library aes",
6062
project_urls={
61-
"Tracker": "https://github.com/pyrogram/tgcrypto/issues",
62-
"Community": "https://t.me/pyrogram",
63-
"Source": "https://github.com/pyrogram/tgcrypto",
64-
"Documentation": "https://docs.pyrogram.org",
63+
"Homepage": "https://telegramplayground.github.io/pyrogram/",
64+
"Tracker": "https://github.com/TelegramPlayGround/pyrogram-tgcrypto/issues",
65+
"Community": "https://PyroTGFork.t.me/2",
66+
"Source": "https://github.com/TelegramPlayGround/pyrogram-tgcrypto",
67+
"Documentation": "https://telegramplayground.github.io/pyrogram/releases/changes-in-this-fork.html",
6568
},
6669
python_requires="~=3.7",
6770
packages=find_packages(exclude=["tests*"]),

0 commit comments

Comments
 (0)