-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
52 lines (44 loc) · 1.28 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
"""Setup for dundie."""
import os
from setuptools import setup, find_packages
def read(*paths):
"""Read the contents of a text file safely.
>>> read("dundie", "VERSION")
'0.1.0'
>>> read("README.md")
...
"""
rootpath = os.path.dirname(__file__)
filepath = os.path.join(rootpath, *paths)
with open(filepath) as file_:
return file_.read().strip()
def read_requirements(path):
"""Return a list of requirements from a text file."""
return [
line.strip()
for line in read(path).split("\n")
if not line.startswith(("#", "git+", '"', "-"))
]
setup(
name="dundie",
# Major.Minor.Patch
# X.Y.Z
version="0.1.1",
description="Reward Point System for Dundler Mifflin",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Victor Magueta",
python_requires=">=3.8",
packages=find_packages(exclude=["integration"]),
include_package_data=True,
entry_points={
"console_scripts": [
"dundie = dundie.__main__:main"
]
},
install_requires=read_requirements("requirements.txt"),
extras_require={
"test": read_requirements("requirements.test.txt"),
"dev": read_requirements("requirements.dev.txt")
}
)