-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
68 lines (56 loc) · 2.68 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
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# This file (setup.py) is part of neurone_loader -
# (https://www.github.com/heilerich/neurone_loader) -
# Copyright © 2019 Felix Heilmeyer. -
# -
# This code is released under the MIT License -
# https://opensource.org/licenses/mit-license.php -
# Please see the file LICENSE for details. -
# ------------------------------------------------------------------------------
from setuptools import setup
import os
import codecs
import re
this_directory = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
# noinspection PyArgumentEqualDefault
with codecs.open(os.path.join(this_directory, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
def find_requirements(*file_paths):
requirements_file = read(*file_paths)
requirements = re.findall(r"^(.+)$", requirements_file, re.M)
return requirements if requirements is not None else []
long_description = read('README.rst')
version_number = find_version('neurone_loader', '__init__.py')
requirements = find_requirements('requirements.txt')
setup(name='neurone_loader',
version=version_number,
description='Utilities for loading data recorded with NeurOne',
long_description=long_description,
long_description_content_type='text/x-rst',
url='http://github.com/heilerich/neurone_loader',
author='Felix Heilmeyer',
author_email='[email protected]',
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, <4',
license='MIT',
packages=['neurone_loader'],
keywords=['EEG', 'science', 'neuroscience', 'neurone', 'bittium', 'megaemg', 'MNE'],
download_url='https://github.com/heilerich/neurone_loader/archive/{}.tar.gz'.format(version_number),
zip_safe=False,
install_requires=requirements,
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering'
]
)