-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
57 lines (49 loc) · 1.63 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
from glob import glob
import os.path
import re
from setuptools import find_packages, setup
try:
# Import all script providers so that ENTRYPOINTS gets populated.
from srcflib.scripts import group, mailman, member, mysql, pgsql, sysadmin # noqa: F401
from srcflib.scripts.utils import ENTRYPOINTS
except ImportError:
# Avoid chicken-and-egg dependency requirements during initial installation.
# This means you need to re-run setup in order to gain script entrypoints.
ENTRYPOINTS = {}
README = os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.rst")
def version():
with open("debian/changelog") as log:
first = next(l for l in log if l.strip())
return re.split("[()]", first)[1].replace("~", "")
setup(
name = "srcf",
version = version(),
description = "Database schemas and core functionality for the Student-Run Computing Facility.",
long_description = open(README).read(),
long_description_content_type = "text/x-rst",
author = "SRCF Sysadmins",
author_email = "sysadmins@srcf.net",
url = "https://www.srcf.net",
platforms = ["Any"],
python_requires = ">=3.6",
install_requires = [
"argcomplete",
"docopt",
"jinja2",
"ldap3",
"psycopg2",
"pylibacl",
"PyMySQL",
"requests",
"six",
"SQLAlchemy <2.0"
],
packages = find_packages(),
py_modules = ["srcfmail"],
package_data = {
"srcf.controllib": ["emails/**/*.txt"],
"srcflib.email": ["templates/**/*.j2"]
},
scripts = glob("bin/*"),
entry_points = {"console_scripts": ENTRYPOINTS}
)