-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
67 lines (57 loc) · 1.96 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
import os, sys
from setuptools import setup
# Figure out the version number and write it to
# the main directory
# so that we don't have to import qinfer before it's
# installed. This technique seems to be popular amongst
# scientific libraries for ensuring that PEP-440 is adhered
# to, and that version numbers in __init__.py match those in
# setup.py.
MAJOR = 0
MINOR = 1
PRE = 'b0'
VERSION = "{major}.{minor}{pre}".format(
major=MAJOR, minor=MINOR, pre=PRE if PRE is not None else ''
)
VERSION_TARGET = 'version.py'
def write_version(filename=VERSION_TARGET):
contents = """\
# This file is automatically generated by setup.py.
# Do not modify.
version = "{version}"
""".format(version=VERSION)
with open(filename, 'w') as version_file:
version_file.write(contents)
if os.path.exists(VERSION_TARGET):
os.remove(VERSION_TARGET)
write_version()
from distutils.core import setup
setup(
name='topspin_to_python',
version=VERSION,
url='https://github.com/whitewhim2718/topspin_to_python',
download_url='https://github.com/whitewhim2718/topspin_to_python',
description="Read Bruker TopSpin experiments into Python",
author='Thomas Alexander',
author_email='thomasalexander2718@gmail.com',
packages=[
'topspin_to_python'
],
install_requires=[
'numpy',
'scipy',
'future>=0.15'
],
test_suite='tests',
tests_requires=['pytest',
'pytest-cov',
'pytest-xdist',
'coveralls',
'pylint'],
keywords=['topspin','bruker','spectra','fid','ft','nmr'],
long_description=""" A library to read in and analyze TopSpin experiments.
Can perform Fourier transforms (FT), automatically phase FTs,
and a variety of other useful data analysis.
This version currently requires Python 2.7 due to library dependencies.
"""
)