-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
56 lines (43 loc) · 1.47 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
""" Setup for core curate app
"""
from os import chdir, pardir
from os.path import join, exists, dirname, normpath, abspath
from re import sub
from setuptools import find_packages, setup
def req_link(external_url):
"""
Req_link
Args:
external_url:
Return:
"""
egg_link = sub(r"https://[^=]+=", "", external_url)
return "==".join(egg_link.rsplit("-", 1))
reqs_default = join(dirname(__file__), "requirements.txt")
reqs_core = join(dirname(__file__), "requirements.core.txt")
required = []
if exists(reqs_default):
with open(reqs_default, encoding="UTF-8") as f:
required += f.read().splitlines()
if exists(reqs_core):
with open(reqs_core, encoding="UTF-8") as f:
required += f.read().splitlines()
with open(join(dirname(__file__), "README.rst"), encoding="UTF-8") as f:
long_desc = f.read()
# Allow setup.py to be run from any path
chdir(normpath(join(abspath(__file__), pardir)))
dep_links = [r for r in required if r.startswith("https://")]
required = [req_link(r) if r.startswith("https://") else r for r in required]
setup(
name="core_curate_app",
version="2.13.0",
description="Curation functionalities for the curator core project",
long_description=long_desc,
author="NIST IT Lab",
author_email="[email protected]",
url="https://github.com/usnistgov/core_curate_app",
packages=find_packages(),
include_package_data=True,
install_requires=required,
dependency_links=dep_links,
)