-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (73 loc) · 2.98 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
#!/usr/bin/env python
# Adapted from https://github.com/fedarko/strainFlye/blob/main/setup.py
# (... adapted from https://github.com/biocore/qurro/blob/master/setup.py)
import os
from setuptools import find_packages, setup
classifier_str = """
Development Status :: 3 - Alpha
License :: OSI Approved :: BSD License
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Bio-Informatics
Topic :: Scientific/Engineering :: Visualization
Programming Language :: Python :: 3 :: Only
Operating System :: Unix
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
"""
classifiers = [s.strip() for s in classifier_str.split("\n") if s]
description = "Small library for creating and visualizing dot plot matrices"
with open("README.md", "r") as f:
long_description = f.read()
# Extract the version from a special _version.py file. The reason we don't just
# store it in wotplot/__init__.py is that that will break if dependencies
# aren't installed. This is basically option 3 from
# https://packaging.python.org/en/latest/guides/single-sourcing-package-version
# -- also inspired by https://stackoverflow.com/a/7071358
with open(os.path.join("wotplot", "_version.py"), "r") as f:
# The output of f.read() looks like '__version__ = "0.1.0"\n'.
# Splitting on "=" gives us ' "0.1.0"\n'; stripping whitespace gives us
# '"0.1.0"'; and slicing with [1:-1] gives us '0.1.0'.
version = f.read().split("=")[1].strip()[1:-1]
setup(
name="wotplot",
version=version,
license="BSD",
description=description,
long_description=long_description,
long_description_content_type="text/markdown",
author="Marcus Fedarko",
author_email="[email protected]",
maintainer="Marcus Fedarko",
maintainer_email="[email protected]",
url="https://github.com/fedarko/wotplot",
packages=find_packages(),
install_requires=[
"numpy",
# earliest version of SciPy I can find that supports python 3 (although
# the python >= 3.6 requirement will almost certainly result in a
# higher SciPy version being selected anyway). for reference, this also
# has scipy.sparse.coo_matrix.
"scipy >= 0.9",
"matplotlib",
"pydivsufsort",
],
# Based on how Altair splits up its requirements:
# https://github.com/altair-viz/altair/blob/master/setup.py
extras_require={
"dev": [
"pytest >= 4.2",
"pytest-cov >= 2.0",
"flake8",
# black 22.10 stopped supporting python 3.6; ideally we'd adjust
# our CI to use later versions of black on the 3.7 build, but as a
# hacky solution pinning black is fine
"black < 22.10",
# some tests check that the code handles pyfastx.Sequence objects
# properly. However, actually using wotplot does not require
# that you install pyfastx
"pyfastx",
],
},
classifiers=classifiers,
python_requires=">=3.6",
)