-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
111 lines (93 loc) · 3.29 KB
/
setup.py
File metadata and controls
111 lines (93 loc) · 3.29 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python
import os
from collections import defaultdict
from glob import glob
from setuptools import find_packages, setup
import versioneer
NAME = "MONSDA"
DESCRIPTION = (
"MONSDA, Modular Organizer of Nextflow and Snakemake driven HTS Data Analysis"
)
# Set __version__ done by versioneer
# exec(open("MONSDA/__init__.py").read())
def generate_datafiles():
df = list()
dirlist = defaultdict(list)
libs = list()
for l in glob("MONSDA/lib/*"):
if any(x in l for x in [".pl", ".pm", ".py", ".sh", ".R", ".groovy"]):
libs.append(os.path.relpath(l))
for l in libs:
dirlist[str(os.path.join("share", os.path.dirname(l)))].append(l)
scripts = list()
for s in glob("scripts/**", recursive=True):
if any(x in s for x in [".pl", ".pm", ".py", ".sh", ".R"]):
scripts.append(os.path.relpath(s)) # os.path.join(s, os.path.split(s)[1]))
for s in scripts:
dirlist[str(os.path.join("share", "MONSDA", os.path.dirname(s)))].append(s)
workflows = list()
for d in glob("workflows/*"):
if "wip" not in d:
workflows.append(
os.path.relpath(d)
) # os.path.join(d, os.path.split(d)[1]))
for w in workflows:
dirlist[os.path.join("share", "MONSDA", os.path.dirname(w))].append(w)
envs = list()
for e in glob("envs/*"):
envs.append(os.path.relpath(e)) # os.path.join(d, os.path.split(d)[1]))
for e in envs:
dirlist[os.path.join("share", "MONSDA", os.path.dirname(e))].append(e)
confs = list()
for c in glob("configs/*"):
if any(x in c for x in [".json"]):
confs.append(os.path.relpath(c)) # os.path.join(d, os.path.split(d)[1]))
for c in confs:
dirlist[os.path.join("share", "MONSDA", os.path.dirname(c))].append(c)
profiles = list()
for p in glob("profile_*/**"):
profiles.append(os.path.relpath(p)) # os.path.join(d, os.path.split(d)[1]))
for p in profiles:
dirlist[os.path.join("share", "MONSDA", os.path.dirname(p))].append(p)
dirlist[""].append("LICENSE")
for k, v in dirlist.items():
df.append((k, v))
return df
# requires = open(os.path.abspath("requirements.txt")).read().strip().split("\n")
setup(
name=NAME,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description=DESCRIPTION,
author="Joerg Fallmann",
author_email="jot.fallmann@gmail.com",
packages=find_packages(include=["MONSDA", "MONSDA.*"]),
include_package_data=True,
data_files=generate_datafiles(),
entry_points={
"console_scripts": [
"monsda = MONSDA.RunMONSDA:main",
"monsda_configure = MONSDA.Configurator:main",
]
},
# install_requires=requires,
install_requires=[
"biopython>=1.86",
"fastapi>=0.128.5",
"isort>=5.13.2",
"natsort>=8.4.0",
"numpy>=2.4.2",
"pandas>=2.3.3",
"pyyaml>=6.0.3",
"scipy>=1.17.0",
"snakemake>=9.16.3",
"uvicorn>=0.40.0",
],
python_requires=">=3.12.0",
setup_requires=["pytest-runner"],
zip_safe=False,
license="LICENSE",
url="https://github.com/jfallmann/MONSDA",
long_description_content_type="text/markdown",
long_description=open("README.md").read(),
)