-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
113 lines (100 loc) · 3.36 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
# -*- coding: utf-8 -*-
import pathlib
import sys
from collections import defaultdict
import setuptools
# check for python version
if sys.version_info < (3, 8):
raise SystemExit('Python 3.8+ is required!')
def get_extra_requirements(path, add_all=True):
"""Parse extra-requirements file."""
with open(path) as depfile:
extra_deps = defaultdict(set)
for line in depfile:
if not line.startswith('#'):
if ':' not in line:
raise ValueError(
f'Dependency in {path} not correct formatted: {line}',
)
dep, tags = line.split(':')
tags = {tag.strip() for tag in tags.split(',')}
for tag in tags:
extra_deps[tag].add(dep)
# add tag `all` at the end
if add_all:
extra_deps['all'] = {
tag for tags in extra_deps.values() for tag in tags
}
return extra_deps
def remove_gh_dark_mode_only_tags(text, tag='#gh-dark-mode-only'):
"""Remove recursively all """
idx = text.find(tag)
if idx < 0:
return text
idx_tag_end = text.find('>', idx)
idx_tag_start = text.rfind('<', 0, idx)
return remove_gh_dark_mode_only_tags(
text[:idx_tag_start] + text[idx_tag_end + 1:], tag,
)
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = remove_gh_dark_mode_only_tags(
(HERE / 'README.md').read_text(),
)
# This call to setup() does all the work
setuptools.setup(
name='msmhelper',
version='1.1.1',
description='Helper functions for Markov State Models.',
long_description=README,
long_description_content_type='text/markdown',
keywords=[
'MSM',
'Markov model',
'Markov state model',
'MD analysis',
],
author='braniii',
url='https://github.com/moldyn/msmhelper',
license='BSD-3-Clause License',
classifiers=[
'License :: OSI Approved :: BSD License',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Software Development :: Libraries :: Python Modules',
],
project_urls={
'Documentation': 'https://moldyn.github.io/msmhelper',
'Source Code': 'https://github.com/moldyn/msmhelper',
'Changelog': 'https://moldyn.github.io/msmhelper/changelog',
'Bug Tracker': 'https://github.com/moldyn/msmhelper/issues',
},
package_dir={'': 'src'},
packages=setuptools.find_packages(where='src'),
include_package_data=True,
python_requires='>=3.8',
entry_points={
'console_scripts': [
'mosaic = mosaic.__main__:main',
],
},
install_requires=[
'numpy>=1.21',
'numba>=0.57',
'pandas',
'decorit',
'scipy',
'click',
'prettypyplot>=0.11',
],
extras_require=get_extra_requirements('extra-requirements.txt'),
)