-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
60 lines (51 loc) · 1.53 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
from setuptools import setup, find_packages
from os import path
from io import open
def get_about():
scope = {}
with open("nautapy/__about__.py") as fp:
exec(fp.read(), scope)
return scope
def get_requirements(env="base.txt"):
with open("requirements/{}".format(env)) as fd:
requirements = []
for line in fd.readlines():
if line.startswith("-r"):
_, _env = line.split(" ", 2)
requirements += get_requirements(_env.strip())
else:
requirements.append(line.strip())
return requirements
def get_readme():
"""
Get the long description from the README file
:return:
"""
with open(path.join(here, "README.md"), encoding="utf-8") as f:
return f.read()
here = path.abspath(path.dirname(__file__))
about = get_about()
setup(
name=about["__name__"],
version=about["__version__"],
description=about["__description__"],
long_description=get_readme(),
long_description_content_type="text/markdown",
url=about["__url__"],
author=about["__author__"],
author_email=about["__email__"],
classifiers=[
"Topic :: Internet",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python"
],
keywords="nauta portal cautivo",
packages=find_packages(),
install_requires=get_requirements(),
entry_points={
"console_scripts": [about["__cli__"] + "=nautapy.cli:main"],
},
scripts=[
'bin/run-connected',
]
)