This commit is contained in:
Maxim Khomutov 2025-03-12 16:36:18 +03:00
parent cc2d807d81
commit 59f661dd98
2 changed files with 16 additions and 11 deletions

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

View File

@ -6,29 +6,31 @@ from pathlib import Path
from setuptools import setup from setuptools import setup
here = Path(__file__).parent.resolve()
_name = 'winConnect' _name = 'winConnect'
packages = [_name] packages = [_name, ]
package_dir = {_name: _name} package_dir = {_name: _name}
lib_path = Path(_name).resolve() lib_path = here / _name
requires = [
"pywin32==309",
"ormsgpack==1.8.0"
]
# 'setup.py publish' shortcut. # 'setup.py publish' shortcut.
if sys.argv[-1] == 'publish': if sys.argv[-1] == 'publish':
os.system('py -m build') os.system('py -m build')
os.system('py -m twine upload --repository pypi dist/*') os.system('py -m twine upload -r pypi dist/*')
sys.exit() sys.exit()
with open(lib_path.parent / 'requirements.txt', 'r', encoding='utf-8') as f: with open(here / 'README.md', 'r', encoding='utf-8') as f:
requires = f.read().splitlines() readme = f.read()
about = {} about = {}
with open(lib_path / '__init__.py', 'r', encoding='utf-8') as f: with open(lib_path / '__meta__.py', 'r', encoding='utf-8') as f:
exec(f.read(), about) exec(f.read(), about)
with open(lib_path.parent / 'README.md', 'r', encoding='utf-8') as f:
readme = f.read()
setup( setup(
name=about['__title__'], name=about['__title__'],
version=about['__version__'], version=about['__version__'],
@ -54,8 +56,8 @@ setup(
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.13",
"License :: MIT License", "License :: OSI Approved :: MIT License",
"Operating System :: Windows", "Operating System :: Microsoft :: Windows",
], ],
project_urls={ project_urls={
'Source': 'https://github.com/SantaSpeen/winConnect', 'Source': 'https://github.com/SantaSpeen/winConnect',