forked from python-caldav/caldav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·78 lines (71 loc) · 2.4 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import ast
import re
import sys
from setuptools import find_packages
from setuptools import setup
## I believe it's good practice to keep the version number
## available as package.__version__
## It is defitively good practice not to have to maintain the
## version number several places.
# However, there seems to be no "best current practice" on how
## to set up version number in the setup.py file?
## I've copied the following from the icalendar library:
_version_re = re.compile(r"__version__\s+=\s+(.*)")
with open("caldav/__init__.py", "rb") as f:
version = str(
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))
)
if __name__ == "__main__":
## TODO: consider if automated testing with radicale in addition to
## xandikos would yield any benefits.
test_packages = [
"pytest",
"pytest-coverage",
"coverage",
"sphinx",
"backports.zoneinfo;python_version<'3.9'",
"tzlocal",
"xandikos==0.2.8;python_version<'3.9'",
"dulwich==0.20.50;python_version<'3.9'",
"xandikos;python_version>='3.9'",
]
setup(
name="caldav",
version=version,
py_modules=[
"caldav",
],
description="CalDAV (RFC4791) client library",
long_description=open("README.md").read(),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General " "Public License (GPL)",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Office/Business :: Scheduling",
"Topic :: Software Development :: Libraries " ":: Python Modules",
],
keywords="",
author="Cyril Robert",
author_email="[email protected]",
url="https://github.com/python-caldav/caldav",
license="GPL",
packages=find_packages(exclude=["tests"]),
include_package_data=True,
zip_safe=False,
install_requires=[
"vobject",
"lxml",
"requests",
"icalendar",
"recurring-ical-events>=2.0.0",
"typing_extensions",
],
extras_require={
"test": test_packages,
},
)