ferogram 0.0.0__tar.gz → 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ferogram-0.1.0/.github/workflows/publish.yml +149 -0
- ferogram-0.1.0/.gitignore +9 -0
- ferogram-0.1.0/Cargo.lock +2518 -0
- ferogram-0.1.0/Cargo.toml +24 -0
- ferogram-0.1.0/LICENSE-APACHE +201 -0
- ferogram-0.0.0/LICENSE → ferogram-0.1.0/LICENSE-MIT +1 -4
- ferogram-0.1.0/PKG-INFO +273 -0
- ferogram-0.1.0/README.md +251 -0
- ferogram-0.1.0/examples/command_bot.py +36 -0
- ferogram-0.1.0/examples/echo_bot.py +26 -0
- ferogram-0.1.0/examples/raw_invoke.py +43 -0
- ferogram-0.1.0/examples/send_hi.py +26 -0
- ferogram-0.1.0/examples/send_media.py +40 -0
- ferogram-0.1.0/examples/send_message.py +48 -0
- ferogram-0.1.0/examples/update_handlers.py +97 -0
- ferogram-0.1.0/examples/userbot.py +27 -0
- ferogram-0.1.0/ferogram/__init__.py +30 -0
- ferogram-0.1.0/ferogram/client.py +350 -0
- ferogram-0.1.0/ferogram/filters.py +174 -0
- ferogram-0.1.0/ferogram/logging.py +49 -0
- ferogram-0.1.0/ferogram/py.typed +0 -0
- ferogram-0.1.0/ferogram/raw/__init__.py +23 -0
- ferogram-0.1.0/ferogram/raw/api/__init__.py +15 -0
- ferogram-0.1.0/ferogram/raw/api/functions.py +16 -0
- ferogram-0.1.0/ferogram/raw/api/types.py +16 -0
- ferogram-0.1.0/ferogram/raw/codegen.py +228 -0
- ferogram-0.1.0/ferogram/raw/generated/__init__.py +15 -0
- ferogram-0.1.0/ferogram/raw/generated/_tl_schema.py +3895 -0
- ferogram-0.1.0/ferogram/raw/generated/functions.py +19549 -0
- ferogram-0.1.0/ferogram/raw/generated/types.py +41944 -0
- ferogram-0.1.0/ferogram/raw/tl.py +252 -0
- ferogram-0.1.0/ferogram/raw_api.tl +2944 -0
- ferogram-0.1.0/pyproject.toml +30 -0
- ferogram-0.1.0/src/auth.rs +66 -0
- ferogram-0.1.0/src/client.rs +420 -0
- ferogram-0.1.0/src/lib.rs +51 -0
- ferogram-0.1.0/src/message.rs +289 -0
- ferogram-0.1.0/src/raw.rs +51 -0
- ferogram-0.1.0/src/types.rs +62 -0
- ferogram-0.1.0/src/updates.rs +517 -0
- ferogram-0.0.0/.github/workflows/publish.yml +0 -34
- ferogram-0.0.0/.gitignore +0 -6
- ferogram-0.0.0/PKG-INFO +0 -42
- ferogram-0.0.0/README.md +0 -22
- ferogram-0.0.0/ferogram/__init__.py +0 -8
- ferogram-0.0.0/pyproject.toml +0 -28
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
job:
|
|
9
|
+
description: "Which job to run"
|
|
10
|
+
required: true
|
|
11
|
+
default: all
|
|
12
|
+
type: choice
|
|
13
|
+
options:
|
|
14
|
+
- all
|
|
15
|
+
- linux
|
|
16
|
+
- macos
|
|
17
|
+
- windows
|
|
18
|
+
- sdist
|
|
19
|
+
publish:
|
|
20
|
+
description: "Upload to PyPI after build"
|
|
21
|
+
required: false
|
|
22
|
+
default: false
|
|
23
|
+
type: boolean
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
|
|
27
|
+
linux:
|
|
28
|
+
if: github.event_name == 'push' || inputs.job == 'all' || inputs.job == 'linux'
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
# Prevent one target failing from cancelling its sibling.
|
|
32
|
+
# Without this, aarch64 failing was silently cancelling x86_64.
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
target:
|
|
36
|
+
- x86_64-unknown-linux-gnu
|
|
37
|
+
- aarch64-unknown-linux-gnu
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.12"
|
|
43
|
+
- name: Cache Rust build artifacts
|
|
44
|
+
uses: Swatinem/rust-cache@v2
|
|
45
|
+
with:
|
|
46
|
+
key: ${{ matrix.target }}
|
|
47
|
+
- uses: PyO3/maturin-action@v1
|
|
48
|
+
# The ring crate's build.rs compiles ARM assembly (chacha-armv8-linux64.S)
|
|
49
|
+
# via cc-rs using the manylinux cross-compiler. That compiler doesn't
|
|
50
|
+
# define __ARM_ARCH, which ring requires:
|
|
51
|
+
# include/ring-core/asm_base.h:73: #error "ARM assembler must define __ARM_ARCH"
|
|
52
|
+
# Setting CFLAGS for the aarch64 target via cc-rs's env convention fixes
|
|
53
|
+
# this without touching any upstream crate.
|
|
54
|
+
env:
|
|
55
|
+
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8 -march=armv8-a"
|
|
56
|
+
with:
|
|
57
|
+
target: ${{ matrix.target }}
|
|
58
|
+
args: --release --out dist
|
|
59
|
+
manylinux: auto
|
|
60
|
+
- uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: wheels-linux-${{ matrix.target }}
|
|
63
|
+
path: dist
|
|
64
|
+
|
|
65
|
+
macos:
|
|
66
|
+
if: github.event_name == 'push' || inputs.job == 'all' || inputs.job == 'macos'
|
|
67
|
+
runs-on: macos-latest
|
|
68
|
+
strategy:
|
|
69
|
+
fail-fast: false
|
|
70
|
+
matrix:
|
|
71
|
+
target:
|
|
72
|
+
- x86_64-apple-darwin
|
|
73
|
+
- aarch64-apple-darwin
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- uses: actions/setup-python@v5
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.12"
|
|
79
|
+
- name: Cache Rust build artifacts
|
|
80
|
+
uses: Swatinem/rust-cache@v2
|
|
81
|
+
with:
|
|
82
|
+
key: ${{ matrix.target }}
|
|
83
|
+
- uses: PyO3/maturin-action@v1
|
|
84
|
+
with:
|
|
85
|
+
target: ${{ matrix.target }}
|
|
86
|
+
args: --release --out dist
|
|
87
|
+
- uses: actions/upload-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: wheels-macos-${{ matrix.target }}
|
|
90
|
+
path: dist
|
|
91
|
+
|
|
92
|
+
windows:
|
|
93
|
+
if: github.event_name == 'push' || inputs.job == 'all' || inputs.job == 'windows'
|
|
94
|
+
runs-on: windows-latest
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@v4
|
|
97
|
+
- uses: actions/setup-python@v5
|
|
98
|
+
with:
|
|
99
|
+
python-version: "3.12"
|
|
100
|
+
- name: Cache Rust build artifacts
|
|
101
|
+
uses: Swatinem/rust-cache@v2
|
|
102
|
+
- uses: PyO3/maturin-action@v1
|
|
103
|
+
with:
|
|
104
|
+
args: --release --out dist
|
|
105
|
+
- uses: actions/upload-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: wheels-windows
|
|
108
|
+
path: dist
|
|
109
|
+
|
|
110
|
+
sdist:
|
|
111
|
+
if: github.event_name == 'push' || inputs.job == 'all' || inputs.job == 'sdist'
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: PyO3/maturin-action@v1
|
|
116
|
+
with:
|
|
117
|
+
command: sdist
|
|
118
|
+
args: --out dist
|
|
119
|
+
- uses: actions/upload-artifact@v4
|
|
120
|
+
with:
|
|
121
|
+
name: wheels-sdist
|
|
122
|
+
path: dist
|
|
123
|
+
|
|
124
|
+
publish:
|
|
125
|
+
# Android was removed from this workflow entirely. PyO3 abi3 wheels require
|
|
126
|
+
# libpython3.9.so at link time — a library that does not exist in the Android
|
|
127
|
+
# NDK sysroot. There is no lightweight fix; a full Python-for-Android sysroot
|
|
128
|
+
# would be required. More importantly, PyPI does not serve Android wheel tags,
|
|
129
|
+
# so those wheels would never be pip-installable anyway.
|
|
130
|
+
needs: [linux, macos, windows, sdist]
|
|
131
|
+
if: |
|
|
132
|
+
always() &&
|
|
133
|
+
(github.event_name == 'push' || inputs.publish == true) &&
|
|
134
|
+
!contains(needs.*.result, 'failure') &&
|
|
135
|
+
!contains(needs.*.result, 'cancelled')
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
environment: pypi
|
|
138
|
+
permissions:
|
|
139
|
+
id-token: write
|
|
140
|
+
steps:
|
|
141
|
+
- uses: actions/download-artifact@v4
|
|
142
|
+
with:
|
|
143
|
+
pattern: "wheels-*"
|
|
144
|
+
merge-multiple: true
|
|
145
|
+
path: dist
|
|
146
|
+
- uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
command: upload
|
|
149
|
+
args: --non-interactive --skip-existing dist/*
|