forked from arinbjornk/BiobankRead
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
55 lines (46 loc) · 1.46 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
#!/usr/bin/env python
import sys
import os
import glob
import itertools
#import setuptools
from setuptools import setup
#######
# authored by Dr A. Berlanga
#####
# Get location to this file:
here = os.path.abspath(os.path.dirname(__file__))
print(here)
funct=["extract_death.py","extract_HES.py","extract_SR.py","extract_variables.py"]
def get_cli_scripts():
files = []
for filename in funct:
scripts = [fn for fn in glob.glob(os.path.join('Scripts/**', filename),
recursive = True)
if not os.path.basename(fn).startswith('__init__')
]
files.append(scripts)
flatten_list = list(itertools.chain.from_iterable(files))
return(flatten_list)
Scripts = get_cli_scripts()
# Python version needed:
major, minor1, minor2, s, tmp = sys.version_info
if (major < 3) or (major==3 and minor1<6):
raise SystemExit("""Python 3.6 or later required, exiting.""")
######
# Thanks Antonio
######
setup(name='BiobankRead2',
version='3.1.1',
description='Python scripts for UKB data',
author='Deborah Schneider-Luftman',
author_email='[email protected]',
license ='GNU GPL v3',
packages=['BiobankRead2'],
package_dir={'': 'Biobankread2'},
install_requires=[
"bs4", "numpy", "pandas", "urllib3", "regex", "seaborn"
],
include_package_data = True,
package_data={'BiobankRead2': ['data/*.tsv','data/*.csv']},
scripts=Scripts)