forked from pyrogram/pyrogram
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
443 changed files
with
1,798 additions
and
5,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
github: delivrance | ||
liberapay: delivrance | ||
open_collective: pyrogram | ||
github: [illvart] | ||
custom: ["https://linktr.ee/illvart"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
- name: Build package | ||
run: hatch build | ||
- name: Publish package | ||
env: | ||
HATCH_INDEX_USER: __token__ | ||
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
hatch publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
name: Pyrogram | ||
name: PyrogramV1 | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] | ||
|
||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Generate API | ||
run: | | ||
python setup.py generate --api | ||
make venv | ||
make api | ||
- name: Run tests | ||
run: | | ||
tox | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
## Include | ||
include README.md COPYING COPYING.lesser NOTICE requirements.txt | ||
include README.md COPYING COPYING.lesser NOTICE | ||
recursive-include compiler *.py *.tl *.tsv *.txt | ||
recursive-include tests *.py | ||
|
||
## Exclude | ||
prune pyrogram/errors/exceptions | ||
prune pyrogram/raw/functions | ||
prune pyrogram/raw/types | ||
prune pyrogram/raw/base | ||
exclude pyrogram/raw/all.py | ||
prune pyrogramv1/errors/exceptions | ||
prune pyrogramv1/raw/functions | ||
prune pyrogramv1/raw/types | ||
prune pyrogramv1/raw/base | ||
exclude pyrogramv1/raw/all.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
VENV := venv | ||
PYTHON := $(VENV)/bin/python | ||
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2) | ||
TAG = v$(shell grep -E '__version__ = ".*"' pyrogramv1/__init__.py | cut -d\" -f2) | ||
|
||
RM := rm -rf | ||
|
||
.PHONY: venv clean-build clean-api clean api build | ||
|
||
venv: | ||
$(RM) $(VENV) | ||
python3 -m venv $(VENV) | ||
$(PYTHON) -m pip install -U pip wheel setuptools | ||
$(PYTHON) -m pip install -U -e . | ||
@echo "Created venv with $$($(PYTHON) --version)" | ||
|
||
clean-build: | ||
$(RM) *.egg-info build dist | ||
|
||
clean-api: | ||
$(RM) pyrogramv1/errors/exceptions pyrogramv1/raw/all.py pyrogramv1/raw/base pyrogramv1/raw/functions pyrogramv1/raw/types | ||
|
||
clean: | ||
make clean-build | ||
make clean-api | ||
|
||
api: | ||
cd compiler/api && ../../$(PYTHON) compiler.py | ||
cd compiler/errors && ../../$(PYTHON) compiler.py | ||
|
||
build: | ||
make clean | ||
$(PYTHON) setup.py sdist | ||
$(PYTHON) setup.py bdist_wheel | ||
|
||
tag: | ||
git tag $(TAG) | ||
git push origin $(TAG) | ||
|
||
dtag: | ||
git tag -d $(TAG) | ||
git push origin -d $(TAG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.