-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
40 lines (36 loc) · 1.11 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
import os
import re
import setuptools
envstring = lambda var: os.environ.get(var) or ""
try:
with open("README.md", "r") as fh:
long_description = fh.read()
except:
long_description = ""
if os.path.isfile("variables"):
try:
with open("variables", "r") as fh:
variables = fh.read().strip().split("\n")
for v in variables:
key, value = v.split("=")
os.environ[key] = re.sub("['\"]", "", value)
except:
pass
setuptools.setup(
name=envstring("NAME"),
version=envstring("VERSION"),
author=envstring("AUTHOR"),
author_email=envstring("AUTHOR_EMAIL"),
description=envstring("DESCRIPTION"),
url=envstring("URL"),
long_description=long_description,
long_description_content_type="text/markdown",
packages=[envstring("NAME"), envstring("NAME") + ".main"],
classifiers=[
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: MIT License",
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)