-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·137 lines (118 loc) · 3.87 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import sys
from shutil import rmtree
sys.path.append(".")
try:
from setuptools import find_packages
from setuptools import setup
from setuptools import Command
from setuptools import Extension
except ImportError:
sys.exit(
"We need the Python library 'setuptools' to be installed."
"Try running: python -m ensurepip"
)
if sys.version_info[:2] < (3, 7):
sys.stderr.write(
"NGS-CI is tested on Python 3.7 or later. "
"Python %d.%d detected. \n" % sys.version_info[:2]
)
sys.exit(1)
# class test_biopython(Command):
# """Run all of the tests for the package.
# This is a automatic test run class to make distutils kind of act like
# perl. With this you can do:
# python setup.py build
# python setup.py install
# python setup.py test
# """
# description = "Automatically run the test suite for Biopython."
# user_options = [("offline", None, "Don't run online tests")]
# def initialize_options(self):
# """No-op, initialise options."""
# self.offline = None
# def finalize_options(self):
# """No-op, finalise options."""
# pass
# def run(self):
# """Run the tests."""
# this_dir = os.getcwd()
# # change to the test dir and run the tests
# os.chdir("test")
# sys.path.insert(0, "")
# import run_tests
# if self.offline:
# run_tests.main(["--offline"])
# else:
# run_tests.main([])
# # change back to the current directory
# os.chdir(this_dir)
def can_import(module_name):
"""Check we can import the requested module."""
try:
return __import__(module_name)
except ImportError:
return None
# Package meta-data.
NAME = 'ngsci'
DESCRIPTION = 'The Next Generation Sequencing Complexity Index'
long_description = 'See README.md for details'
URL = 'https://github.com/MatthewRalston/ngs-ci'
EMAIL = '[email protected]'
AUTHOR = 'Matthew Ralston'
REQUIRES_PYTHON = '>=3.7.0'
VERSION = '0.0.1'
# What packages are required for this module to be executed?
REQUIRED = [l.rstrip() for l in open('./requirements.txt', 'r')]
# REQUIRED = [
# 'biopython==1.74',
# 'jsonschema==3.1.1',
# 'PyYAML==5.1.2'
# ]
# What packages are optional?
EXTRAS = {
'development': [l.rstrip() for l in open('./requirements-dev.txt', 'r')]
# 'fancy feature': ['django'],
}
# Where the magic happens:
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
# If your package is a single module, use this instead of 'packages':
#py_modules=['ngsci'],
scripts=['bin/ngsci'],
# entry_points={
# 'console_scripts': ['mycli=mymodule:cli'],
# },
install_requires=REQUIRED,
extras_require=EXTRAS,
include_package_data=True,
license='GPLv3+',
test_suite='test',
# tests_require=['mamba', 'expect'],
)