forked from Clinical-Genomics/loqusdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·77 lines (65 loc) · 2.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Based on https://github.com/pypa/sampleproject/blob/master/setup.py."""
from __future__ import unicode_literals
# To use a consistent encoding
import codecs
import os
from setuptools import setup, find_packages
import sys
# Shortcut for building/publishing to Pypi
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist bdist_wheel upload')
sys.exit()
def parse_reqs(req_path='./requirements.txt'):
"""Recursively parse requirements from nested pip files."""
install_requires = []
with codecs.open(req_path, 'r') as handle:
# remove comments and empty lines
lines = (line.strip() for line in handle
if line.strip() and not line.startswith('#'))
for line in lines:
# check for nested requirements files
if line.startswith('-r'):
# recursively call this function
install_requires += parse_reqs(req_path=line[3:])
else:
# add the line as a new requirement
install_requires.append(line)
return install_requires
# For making things look nice on pypi:
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError, RuntimeError):
long_description = 'Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.'
# with open('README.txt') as file:
# long_description = file.read()
setup(name='loqusdb',
version='0.1.2',
description='Store frequencies of vcf variants in a mongodb',
author = 'Mans Magnusson',
author_email = 'mans.magnusson@scilifelab.se',
url = 'http://github.com/moonso/loqusdb',
license = 'MIT License',
install_requires=parse_reqs(),
packages=find_packages(exclude=('tests*', 'docs', 'examples')),
entry_points=dict(
console_scripts=[
"loqusdb = loqusdb.__main__:base_command",
],
),
keywords = ['vcf', 'variants'],
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Unix",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
long_description = long_description,
)