-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
70 lines (57 loc) · 2.26 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
from setuptools import setup, find_packages
import re
import os
version_data = open("mmappickle/_version.py", "r").read()
mo = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_data, re.M)
if mo:
version_string = mo.group(1)
else:
raise RuntimeError("Unable to find version string")
long_description = open('README.md', 'r').read()
def test_suite():
import unittest
test_loader = unittest.TestLoader()
test_suite = test_loader.discover('tests', pattern='test_*.py')
return test_suite
if os.name == 'nt':
platform_requirements = ['pywin32']
else:
platform_requirements = []
_setup_data = {
# Base information
'name': 'mmappickle',
'version': version_string,
'packages': find_packages(),
'test_suite': 'setup.test_suite',
'tests_require': ['numpy'] + platform_requirements,
# Description and classification
'description': 'Mmappickle is a Python 3 library which enables storing large numpy arrays into a file, along with the associated metadata, and to ' + \
'retrieve it in such a way that the numpy array are memory-mapped (numpy.memmap) instead of copied into the system memory.',
'long_description': long_description,
'long_description_content_type': 'text/markdown',
'classifiers': [
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
# Author and license...
'author': "Laurent Fasnacht",
'author_email': "l@libres.ch",
'maintainer': "Laurent Fasnacht",
'maintainer_email': "l@libres.ch",
'url': 'https://github.com/UniNE-CHYN/mmappickle',
'license': 'LGPLv3',
# Requirements
'python_requires': '>=3.4',
# Numpy is required to have memmap array, but it still makes sense to use this module
# without it, so it is not a requirement per-se.
'install_requires': [] + platform_requirements,
}
if __name__ == '__main__':
setup(**_setup_data)