mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-08 11:15:52 +00:00
Remove setup.py in favour of pyproject.toml
Implements: https://github.com/pimutils/vdirsyncer/issues/1164
This commit is contained in:
parent
646e0b48a5
commit
d8961232c4
3 changed files with 49 additions and 77 deletions
3
Makefile
3
Makefile
|
|
@ -52,7 +52,8 @@ install-dev:
|
|||
pip install -e .
|
||||
pip install -Ur test-requirements.txt -r docs-requirements.txt pre-commit
|
||||
set -xe && if [ "$(REQUIREMENTS)" = "minimal" ]; then \
|
||||
pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \
|
||||
pip install pyproject-dependencies && \
|
||||
pip install -U --force-reinstall $$(pyproject-dependencies . | sed 's/>/=/'); \
|
||||
fi
|
||||
|
||||
.PHONY: docs
|
||||
|
|
|
|||
|
|
@ -1,7 +1,51 @@
|
|||
# Vdirsyncer synchronizes calendars and contacts.
|
||||
#
|
||||
# Please refer to https://vdirsyncer.pimutils.org/en/stable/packaging.html for
|
||||
# how to package vdirsyncer.
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=64", "setuptools_scm>=8"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "vdirsyncer"
|
||||
authors = [
|
||||
{name = "Markus Unterwaditzer", email = "markus@unterwaditzer.net"},
|
||||
]
|
||||
description = "Synchronize calendars and contacts"
|
||||
readme = "README.rst"
|
||||
requires-python = ">=3.8"
|
||||
keywords = ["todo", "task", "icalendar", "cli"]
|
||||
license = {text = "ISC"}
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Console",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Operating System :: POSIX",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Topic :: Internet",
|
||||
"Topic :: Utilities",
|
||||
]
|
||||
dependencies = [
|
||||
"click>=5.0,<9.0",
|
||||
"click-log>=0.3.0,<0.5.0",
|
||||
"requests>=2.20.0",
|
||||
"aiohttp>=3.8.2,<4.0.0",
|
||||
"aiostream>=0.4.3,<0.5.0",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
google = ["aiohttp-oauthlib"]
|
||||
|
||||
[project.scripts]
|
||||
vdirsyncer = "vdirsyncer.cli:app"
|
||||
|
||||
[tool.ruff]
|
||||
select = [
|
||||
"E",
|
||||
|
|
@ -39,6 +83,9 @@ exclude_lines = [
|
|||
"if TYPE_CHECKING:",
|
||||
]
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["vdirsyncer"]
|
||||
|
||||
[tool.setuptools_scm]
|
||||
write_to = "vdirsyncer/version.py"
|
||||
version_scheme = "no-guess-dev"
|
||||
|
|
|
|||
76
setup.py
76
setup.py
|
|
@ -1,76 +0,0 @@
|
|||
"""
|
||||
Vdirsyncer synchronizes calendars and contacts.
|
||||
|
||||
Please refer to https://vdirsyncer.pimutils.org/en/stable/packaging.html for
|
||||
how to package vdirsyncer.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from setuptools import Command
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
|
||||
requirements = [
|
||||
"click>=5.0,<9.0",
|
||||
"click-log>=0.3.0, <0.5.0",
|
||||
"requests >=2.20.0",
|
||||
"aiohttp>=3.8.2,<4.0.0",
|
||||
"aiostream>=0.4.3,<0.5.0",
|
||||
]
|
||||
|
||||
|
||||
class PrintRequirements(Command):
|
||||
description = "Prints minimal requirements"
|
||||
user_options: list = []
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
for requirement in requirements:
|
||||
print(requirement.replace(">", "=").replace(" ", ""))
|
||||
|
||||
|
||||
with open("README.rst") as f:
|
||||
long_description = f.read()
|
||||
|
||||
|
||||
setup(
|
||||
# General metadata
|
||||
name="vdirsyncer",
|
||||
author="Markus Unterwaditzer",
|
||||
author_email="markus@unterwaditzer.net",
|
||||
url="https://github.com/pimutils/vdirsyncer",
|
||||
description="Synchronize calendars and contacts",
|
||||
license="BSD",
|
||||
long_description=long_description,
|
||||
# Runtime dependencies
|
||||
install_requires=requirements,
|
||||
# Optional dependencies
|
||||
extras_require={
|
||||
"google": ["aiohttp-oauthlib"],
|
||||
},
|
||||
# Other
|
||||
packages=find_packages(exclude=["tests.*", "tests"]),
|
||||
include_package_data=True,
|
||||
cmdclass={"minimal_requirements": PrintRequirements},
|
||||
entry_points={"console_scripts": ["vdirsyncer = vdirsyncer.cli:app"]},
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Console",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Operating System :: POSIX",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Topic :: Internet",
|
||||
"Topic :: Utilities",
|
||||
],
|
||||
)
|
||||
Loading…
Reference in a new issue