-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
36 lines (26 loc) · 1.14 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
import os
import re
from setuptools import setup, find_packages
REGEX_COMMENT = re.compile(r"[\s^]#(.*)")
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
dir_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(dir_path, "VERSION"), "r") as version_file:
version = str(version_file.readline()).strip()
def parse_requirements(filename):
filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), filename)
with open(filename, "rt") as filehandle:
requirements = filehandle.readlines()[2:]
return tuple(filter(None, (REGEX_COMMENT.sub("", line).strip() for line in requirements)))
setup(
name="labop_labware_ontology",
version=version,
packages=find_packages(),
include_package_data=True,
author="mark doerr",
author_email="[email protected]",
description="LabOP open ontology for scientific labware.",
url="opensourcelab/labop-labware-ontology",
install_requires=parse_requirements("requirements.txt"),
extras_require={"tests": parse_requirements("requirements_dev.txt")},
)