mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 04:25:25 +00:00
feat: migrate to poetry for dependency management and project configuration
- Added pyproject.toml for project metadata and dependencies. - Removed requirements.txt as dependencies are now managed by poetry. - Deleted setup.py as it is no longer needed with poetry.
This commit is contained in:
@@ -1,15 +1,13 @@
|
|||||||
version: 2
|
version: 2
|
||||||
formats: []
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
os: ubuntu-lts-latest
|
os: ubuntu-lts-latest
|
||||||
tools:
|
tools:
|
||||||
python: '3.8'
|
python: '3.12'
|
||||||
|
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
configuration: docs/conf.py
|
configuration: docs/conf.py
|
||||||
fail_on_warning: false
|
|
||||||
builder: html
|
builder: html
|
||||||
|
|
||||||
python:
|
python:
|
||||||
@@ -18,4 +16,3 @@ python:
|
|||||||
path: .
|
path: .
|
||||||
extra_requirements:
|
extra_requirements:
|
||||||
- docs
|
- docs
|
||||||
- requirements: docs/requirements.txt
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
include README.rst
|
|
||||||
include LICENSE
|
|
||||||
include requirements.txt
|
|
||||||
1784
poetry.lock
generated
Normal file
1784
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
pyproject.toml
Normal file
24
pyproject.toml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[project]
|
||||||
|
name = "pyspapi"
|
||||||
|
version = "3.3.0"
|
||||||
|
description = "API wrapper for SP servers written in Python."
|
||||||
|
readme = "README.rst"
|
||||||
|
license = { text = "MIT" }
|
||||||
|
authors = [{ name = "deesiigneer", email = "xdeesiigneerx@gmail.com" }]
|
||||||
|
requires-python = ">=3.12,<3.15"
|
||||||
|
dependencies = ["aiohttp>=3.9,<4.0"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://pyspapi.deesiigneer.ru"
|
||||||
|
Documentation = "https://pyspapi.readthedocs.org"
|
||||||
|
Repository = "https://github.com/deesiigneer/pyspapi"
|
||||||
|
"Issue Tracker" = "https://github.com/deesiigneer/pyspapi/issues"
|
||||||
|
Discord = "https://discord.com/invite/VbyHaKRAaN"
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = ["ruff>=0.14,<0.15", "toml-sort>=0.24,<0.25"]
|
||||||
|
docs = ["sphinx>=7,<9", "sphinx-autobuild (>=2025.8.25,<2026.0.0)", "pydata-sphinx-theme (>=0.16.1,<0.17.0)"]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
@@ -1 +0,0 @@
|
|||||||
aiohttp>=3.8.0
|
|
||||||
43
setup.py
43
setup.py
@@ -1,43 +0,0 @@
|
|||||||
import re
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
requirements = []
|
|
||||||
with open("requirements.txt") as f:
|
|
||||||
requirements = f.read().splitlines()
|
|
||||||
|
|
||||||
version = ""
|
|
||||||
with open("pyspapi/__init__.py") as f:
|
|
||||||
match = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE)
|
|
||||||
if match is None or match.group(1) is None:
|
|
||||||
raise RuntimeError('Version is not set')
|
|
||||||
|
|
||||||
version = match.group(1)
|
|
||||||
|
|
||||||
if not version:
|
|
||||||
raise RuntimeError("Version is not set")
|
|
||||||
|
|
||||||
readme = ""
|
|
||||||
with open("README.rst") as f:
|
|
||||||
readme = f.read()
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='pyspapi',
|
|
||||||
license='MIT',
|
|
||||||
author='deesiigneer',
|
|
||||||
version=version,
|
|
||||||
url='https://github.com/deesiigneer/pyspapi',
|
|
||||||
project_urls={
|
|
||||||
"Documentation": "https://pyspapi.readthedocs.io/ru/latest/",
|
|
||||||
"GitHub": "https://github.com/deesiigneer/pyspapi",
|
|
||||||
"Discord": "https://discord.com/invite/VbyHaKRAaN"
|
|
||||||
},
|
|
||||||
description='API wrapper for SP servers written in Python',
|
|
||||||
long_description=readme,
|
|
||||||
long_description_content_type='text/x-rst',
|
|
||||||
packages=find_packages(),
|
|
||||||
package_data={'pyspapi': ['types/*', 'api/*']}, # Включаем дополнительные файлы и папки
|
|
||||||
include_package_data=True,
|
|
||||||
install_requires=requirements,
|
|
||||||
python_requires='>=3.8.0',
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user