-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
43 lines (36 loc) · 1.36 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
import os
from importlib.machinery import SourceFileLoader
from setuptools import find_packages, setup
module_name = "calendar_fu"
module = SourceFileLoader(
module_name, os.path.join(module_name, "__init__.py")
).load_module()
def load_requirements(fname):
""" load requirements from a pip requirements file """
with open(fname) as f:
line_iter = (line.strip() for line in f.readlines())
return [line for line in line_iter if line and line[0] not in {"#", "-"}]
setup(
name=module_name.replace("_", "-"),
version=module.__version__,
author=module.__author__,
author_email=module.authors_email,
license=module.__license__,
description=module.package_info,
long_description=open("README.md").read(),
platforms="all",
classifiers=[
"Intended Audience :: Developers",
"Natural Language :: Russian",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
python_requires=">=3.7",
packages=find_packages(exclude=["tests"]),
install_requires=load_requirements("requirements.txt"),
extras_require={"develop": load_requirements("requirements.dev.txt")},
entry_points={"console_scripts": ["{0} = {0}.__main__:main".format(module_name),]},
include_package_data=True,
)