-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (50 loc) · 1.8 KB
/
setup.py
File metadata and controls
58 lines (50 loc) · 1.8 KB
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
import re
from setuptools import find_packages, setup # type: ignore
with open("README.md") as r, open("CHANGELOG.md") as c:
long_description = r.read() + "\n\n" + c.read()
version_regex = re.compile(r"__version__ = [\'\"]((\d+\.?)+(-beta)?)[\'\"]")
with open("ionical/__init__.py") as f:
vlines = f.readlines()
version = next(
re.match(version_regex, line).group(1) # type: ignore
for line in vlines
if re.match(version_regex, line)
)
with open("requirements.txt") as requirements_file:
requirements = requirements_file.read().splitlines()
with open("requirements-dev.txt") as dev_requirements_file:
dev_requirements = dev_requirements_file.read().splitlines()
with open("requirements-test.txt") as test_requirements_file:
test_requirements = test_requirements_file.read().splitlines()
dev_requirements.extend(test_requirements)
found_packages = find_packages()
print(f"FINDPACKAGES: {found_packages}")
setup(
name="ionical",
version=version,
description="command line tool for tracking ical changes",
long_description=long_description,
long_description_content_type="text/markdown",
author="Daniel Langsam",
author_email="dangit@langsam.org",
url="https://github.com/danyul/ionical",
packages=found_packages,
include_package_data=True,
install_requires=requirements,
license="MIT",
zip_safe=False,
keywords="icalendar, ics, schedule, changelog, amion, gcal, google, calendar",
classifiers=[
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
],
extras_require={
"dev": dev_requirements,
"test": test_requirements,
},
entry_points={
"console_scripts": ["ionical=ionical.__main__:cli"],
},
test_suite="tests",
tests_require=test_requirements,
)