-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
77 lines (69 loc) · 2.56 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
#!/usr/bin/env python
""" visuamisr is a data visualization tool for AMISR data
It provides:
- A data reading utilty
- Range Time Intensity plotting
- Profile plotting
- 3D beam plotting
The full license can be found in LICENSE.txt
"""
import os
import sys
import subprocess
from setuptools import find_packages, setup
# Get the package requirements
REQSFILE = os.path.join(os.path.dirname(__file__), 'requirements.txt')
with open(REQSFILE, 'r') as f:
REQUIREMENTS = f.readlines()
REQUIREMENTS = '\n'.join(REQUIREMENTS)
# Do some nice things to help users install on conda.
if sys.version_info[:2] < (3, 0):
EXCEPTION = OSError
else:
EXCEPTION = subprocess.builtins.FileNotFoundError
try:
subprocess.call(['conda', 'install', ' '.join(REQUIREMENTS)])
REQUIREMENTS = []
except EXCEPTION:
pass
# Get the readme text
README = os.path.join(os.path.dirname(__file__), 'README.rst')
with open(README, 'r') as f:
READMETXT = f.readlines()
READMETXT = '\n'.join(READMETXT)
# Package description
DESC = "A library of data plotting utilities for visualizing processed "
DESC += "Advanced Modular Incoherent Scatter Radar (AMISR) data."
#############################################################################
# First, check to make sure we are executing
# 'python setup.py install' from the same directory
# as setup.py (root directory)
#############################################################################
PATH = os.getcwd()
assert('setup.py' in os.listdir(PATH)), \
"You must execute 'python setup.py install' from within the \
repo root directory."
#############################################################################
# Now execute the setup
#############################################################################
setup(name='visuamisr',
install_requires=REQUIREMENTS,
setup_requires=REQUIREMENTS,
version="2.0.3",
description=DESC,
author="Ashton S. Reimer",
author_email="[email protected]",
url="https://github.com/asreimer/visuamisr",
download_url="https://github.com/asreimer/visuamisr",
packages=find_packages(),
long_description=READMETXT,
zip_safe=False,
py_modules=['visuamisr'],
classifiers=["Development Status :: 2.0.0 - Release",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Natural Language :: English",
"Programming Language :: Python",
],
)