-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
76 lines (71 loc) · 2.73 KB
/
setup.py
File metadata and controls
76 lines (71 loc) · 2.73 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
import sys
from distutils.core import setup
from setuptools.command.install import install
from distutils import log
import os
import pathlib
from setuptools import find_packages
if sys.version_info.major < 3:
sys.exit('Sorry, sierra-local requires Python 3.x or above')
# adapted from
# https://stackoverflow.com/questions/5932804/set-file-permissions-in-setup-py-file/25761434
class OverrideInstall(install):
def run(self):
install.run(self)
# Make sure postalign.linux is executable
for filepath in self.get_outputs():
if filepath.endswith("postalign.linux"):
log.info(f"Setting executable permissions on {filepath}")
os.chmod(filepath, 0o755)
set_data_dir = False
for filepath in self.get_outputs():
path = os.path.dirname(filepath)
if path.endswith('data') and not set_data_dir:
log.info('Changing permissions of %s to %s' % (path, oct(0o777)))
os.chmod(path, 0o777)
set_data_dir = True
setup(
name='sierralocal',
description='Local execution of HIVdb algorithm',
long_description="Lightweight implementation of the Stanford HIVdb "
"resistance genotyping algorithm (Sierra web "
"service) for local execution.",
packages=find_packages(),
install_requires=[
'cython >=0.29.35',
'more-itertools>=9.1.0',
'orjson>=3.9.1',
'types-setuptools>=67.8.0.0'
],
version='0.4.4',
author=['Jasper Ho', 'Garway Ng', 'Gopi Gugan', 'Mathias Renaud', 'William Wang', 'Art Poon'],
author_email=['jasperchho@gmail.com', 'apoon42@uwo.ca'],
url='https://github.com/PoonLab/sierra-local',
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent'
],
scripts=['bin/sierralocal'],
options={'build_scripts': {'executable': '/usr/bin/env python3'}},
package_data={
'sierralocal': [
'bin/nucamino-*',
'bin/postalign*',
'bin/minimap2*',
'data/genotype-properties.*.csv',
'data/genotype-references.*.fasta',
'data/*Prevalences.tsv',
'data/*-comments.csv',
'data/HIVDB_9.4.xml',
'data/apobec-drms.221b0330.tsv',
'data/alignment-config_hiv1.json',
'data/apobec_drms.json',
'data/apobecs.csv',
'data/mutation-type-pairs_hiv1.csv',
'data/sdrms_hiv1.csv',
'data/rx-all_subtype-all.csv'
]},
cmdclass={'install': OverrideInstall
}
)