forked from ShivangKakkar/pystark
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create pyproject.toml, remove setup.py
- Loading branch information
1 parent
332621a
commit ee1f7ee
Showing
2 changed files
with
119 additions
and
78 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "PyStark" | ||
authors = [ | ||
{name = "Justin Chase (patcher)", email = "[email protected]"}, | ||
{name = "ShivangKakkar (original author)", email = "[email protected]"}, | ||
] | ||
description = "A video sticker bot to turn MP4s and GIfs into Telegram stickers." | ||
requires-python = ">=3.9" | ||
keywords = ["telegram", "bot", "pyrogram", "python", "telegram-bot"] | ||
license = {text = "GPLv3+"} | ||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Information Technology', | ||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.9', | ||
'Natural Language :: English', | ||
'Topic :: Communications :: Chat', | ||
'Topic :: Education :: Testing', | ||
'Topic :: Software Development :: Libraries', | ||
'Topic :: Software Development :: Libraries :: Python Modules' | ||
] | ||
dependencies = [ | ||
"pyrogram" | ||
"TgCrypto" | ||
"python-dotenv" | ||
"pytz" | ||
'sqlalchemy" | ||
"psycopg2" | ||
"pyyaml" | ||
] | ||
dynamic = ["version"] |
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,86 +1,87 @@ | ||
# PyStark - Python add-on extension to Pyrogram | ||
# Copyright (C) 2021-2022 Stark Bots <https://github.com/StarkBotsIndustries> | ||
# | ||
# This file is part of PyStark. | ||
# | ||
# PyStark is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# PyStark is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with PyStark. If not, see <https://www.gnu.org/licenses/>. | ||
# # PyStark - Python add-on extension to Pyrogram | ||
# # Copyright (C) 2021-2022 Stark Bots <https://github.com/StarkBotsIndustries> | ||
# # | ||
# # This file is part of PyStark. | ||
# # | ||
# # PyStark is free software: you can redistribute it and/or modify | ||
# # it under the terms of the GNU General Public License as published by | ||
# # the Free Software Foundation, either version 3 of the License, or | ||
# # (at your option) any later version. | ||
# # | ||
# # PyStark is distributed in the hope that it will be useful, | ||
# # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# # GNU General Public License for more details. | ||
# # | ||
# # You should have received a copy of the GNU General Public License | ||
# # along with PyStark. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import re | ||
from setuptools import setup | ||
# import os | ||
# import re | ||
# from setuptools import setup | ||
|
||
with open("README.md", encoding="utf-8") as f: | ||
long_description = "\n".join([x for x in f.read().split("\n") if not x.startswith('>')]) | ||
# with open("README.md", encoding="utf-8") as f: | ||
# long_description = "\n".join([x for x in f.read().split("\n") if not x.startswith('>')]) | ||
|
||
with open("requirements.txt", encoding="utf-8") as r: | ||
install_requires = [i.strip() for i in r if not i.startswith('#')] | ||
# with open("requirements.txt", encoding="utf-8") as r: | ||
# install_requires = [i.strip() for i in r if not i.startswith('#')] | ||
|
||
with open("pystark/constants.py", "r", encoding="utf-8") as f: | ||
text = f.read() | ||
pat = r"['\"]([^'\"]+)['\"]" | ||
version = re.search("__version__ = "+pat, text).group(1) | ||
# beta_version = re.search("__beta_version__ = "+pat, text).group(1) | ||
description = re.search("__description__ = "+pat, text).group(1) | ||
# with open("pystark/constants.py", "r", encoding="utf-8") as f: | ||
# text = f.read() | ||
# pat = r"['\"]([^'\"]+)['\"]" | ||
# version = re.search("__version__ = "+pat, text).group(1) | ||
# # beta_version = re.search("__beta_version__ = "+pat, text).group(1) | ||
# description = re.search("__description__ = "+pat, text).group(1) | ||
|
||
|
||
def get_packages(): | ||
return [path.replace("\\", ".").replace("/", ".") for path, _, _ in os.walk("pystark") if "__" not in path] | ||
# def get_packages(): | ||
# return [path.replace("\\", ".").replace("/", ".") for path, _, _ in os.walk("pystark") if "__" not in path] | ||
|
||
|
||
setup( | ||
name='PyStark', | ||
packages=get_packages(), | ||
version=version, | ||
license='GPLv3+', | ||
description=description, | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author='StarkProgrammer', | ||
author_email='[email protected]', | ||
url='https://github.com/StarkBotsIndustries/PyStark', | ||
keywords=['telegram', 'bot', 'pyrogram', 'python', 'telegram-bot'], | ||
install_requires=install_requires, | ||
zip_safe=False, | ||
python_requires=">=3.9", | ||
dependency_links=['https://github.com/pyrogram/pyrogram/tarball/master'], | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Information Technology', | ||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Natural Language :: English', | ||
'Topic :: Communications :: Chat', | ||
'Topic :: Education :: Testing', | ||
'Topic :: Software Development :: Libraries', | ||
'Topic :: Software Development :: Libraries :: Python Modules' | ||
], | ||
project_urls={ | ||
"Support": "https://t.me/StarkBotsChat", | ||
"Community": "https://t.me/StarkBots", | ||
"Updates": "https://t.me/pystark", | ||
"Documentation": "https://pystark.codes/", | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'pystark = pystark.cli:main', | ||
], | ||
}, | ||
) | ||
# setup( | ||
# name='PyStark', | ||
# packages=get_packages(), | ||
# version=version, | ||
# license='GPLv3+', | ||
# description=description, | ||
# long_description=long_description, | ||
# long_description_content_type="text/markdown", | ||
# author='StarkProgrammer', | ||
# author_email='[email protected]', | ||
# url='https://github.com/StarkBotsIndustries/PyStark', | ||
# keywords=['telegram', 'bot', 'pyrogram', 'python', 'telegram-bot'], | ||
# install_requires=install_requires, | ||
# zip_safe=False, | ||
# python_requires=">=3.9", | ||
# dependency_links=['https://github.com/pyrogram/pyrogram/tarball/master'], | ||
# classifiers=[ | ||
# 'Development Status :: 5 - Production/Stable', | ||
# 'Intended Audience :: Developers', | ||
# 'Intended Audience :: Education', | ||
# 'Intended Audience :: Information Technology', | ||
# 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', | ||
# 'Operating System :: OS Independent', | ||
# 'Programming Language :: Python', | ||
# 'Programming Language :: Python :: 3', | ||
# 'Programming Language :: Python :: 3.9', | ||
# 'Programming Language :: Python :: 3.10', | ||
# 'Programming Language :: Python :: 3.11', | ||
# 'Natural Language :: English', | ||
# 'Topic :: Communications :: Chat', | ||
# 'Topic :: Education :: Testing', | ||
# 'Topic :: Software Development :: Libraries', | ||
# 'Topic :: Software Development :: Libraries :: Python Modules' | ||
# ], | ||
# project_urls={ | ||
# "Support": "https://t.me/StarkBotsChat", | ||
# "Community": "https://t.me/StarkBots", | ||
# "Updates": "https://t.me/pystark", | ||
# "Documentation": "https://pystark.codes/", | ||
# }, | ||
# entry_points={ | ||
# 'console_scripts': [ | ||
# 'pystark = pystark.cli:main', | ||
# ], | ||
# }, | ||
# ) | ||
# # |