-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
85 lines (72 loc) · 2.73 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
"""Python setuptools setup."""
import os
from setuptools import find_namespace_packages, setup
def get_verified_absolute_path(path):
"""Verify and return absolute path of argument.
Args:
path : Relative/absolute path
Returns:
Absolute path
"""
installed_path = os.path.abspath(path)
if not os.path.exists(installed_path):
raise RuntimeError("No valid path for requested component exists")
return installed_path
def get_installation_requirments(file_path):
"""Parse pip requirements file.
Args:
file_path : path to pip requirements file
Returns:
list of requirement strings
"""
with open(file_path, 'r') as file:
requirements_file_content = \
[line.strip() for line in file if
line.strip() and not line.lstrip().startswith('#')]
return requirements_file_content
# Get current dir (pyclaragenomics folder is copied into a temp directory
# created by pip)
current_dir = os.path.dirname(os.path.realpath(__file__))
# Classifiers for PyPI
pyaw_classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9"
]
required_packages = \
get_installation_requirments(
get_verified_absolute_path(
os.path.join(current_dir, 'requirements.txt'))
)
setup(name='geps',
description='NVIDIA GWAS Epistatic Phenotype Simulator',
author='NVIDIA Corporation',
url="https://github.com/clara-parabricks/GEPSi",
include_package_data=True,
install_requires=required_packages,
packages=find_namespace_packages(),
python_requires='>=3.6',
long_description='Python libraries and utilities for manipulating '
'genomics data',
classifiers=pyaw_classifiers,
entry_points={'console_scripts': ['gepsi = scripts.main:main']},
data_files=[
('configs', ['configs/genotype.yaml',
'configs/phenotype.yaml'])],
platforms=['any'],
)