-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
executable file
·72 lines (60 loc) · 2.03 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from io import open
from os import path
from re import search, MULTILINE
def read(filename, encoding='utf-8'):
base_dir = path.abspath(path.dirname(__file__))
with open(path.join(base_dir, filename), 'r', encoding=encoding) as f:
return f.read()
def find_version(filename, encoding='utf-8'):
"""
Reads the version string from the specified file. It should be in the
format:
.. code-block:: python
__version__ = 'version-string'
Where version-string should be the version number.
Adapted from packaging.python.org
"""
version_file = read(filename, encoding)
version_match = search(
r'^__version__\s+=\s+[\'"](?P<version>[^\'"]+)[\'"]',
version_file,
MULTILINE)
if version_match:
return version_match.group('version')
raise RuntimeError('Unable to find version string.')
requirements = [
'numpy>=1.9,<1.11',
'six>=1.8,<2',
'astropy>=1.3,<2.0',
]
setup(
name='nanoscope',
version=find_version('nanoscope/__init__.py'),
description='Library to parse and process of Nanoscope Dimension AFM files',
long_description=read('README.rst'),
url='https://github.com/jmarini/nanoscope',
author='Jonathan Marini',
author_email='[email protected]',
packages=['nanoscope'],
install_requires=requirements,
test_suite='tests',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering',
],
)