-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
60 lines (52 loc) · 1.92 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
from asyncorm import __version__
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
def requirement_parser(file_name):
try:
with open(file_name, "r") as req_file:
file_requirement = []
for line in req_file.readlines():
line = line.rstrip("\n")
if line.startswith("-r"):
file_requirement += requirement_parser(line.split(" ")[1])
elif line:
file_requirement += [line]
except FileNotFoundError:
file_requirement = ""
return file_requirement
requirements = requirement_parser("requirements.txt")
test_requirements = requirement_parser("requirements_dev.txt")
setup(
name="asyncorm",
version=__version__,
description="A fully asynchronous python ORM",
long_description=readme + "\n\n" + history,
author="Héctor Alvarez (monobot)",
author_email="[email protected]",
url="https://github.com/monobot/asyncorm",
packages=["asyncorm"],
package_dir={"asyncorm": "asyncorm"},
include_package_data=True,
install_requires=requirements,
license="Apache Software License 2.0",
zip_safe=False,
keywords="asyncorm",
classifiers=[
"Development Status :: 3 - Alpha",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Database",
],
test_suite="tests",
tests_require=test_requirements,
entry_points={"console_scripts": ["orm_setup=asyncorm.application.commands.orm_setup:setup"]},
)