-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
45 lines (35 loc) · 1.19 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
# coding: utf-8
""" A Python tool for extracting and analysing multi-fiber echelle (GHOST/RHEA/Veloce) data """
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
major, minor1, minor2, release, serial = sys.version_info
readfile_kwargs = {"encoding": "utf-8"} if major >= 3 else {}
def readfile(filename):
with open(filename, **readfile_kwargs) as fp:
contents = fp.read()
return contents
version_regex = re.compile("__version__ = \"(.*?)\"")
contents = readfile(os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"pymfe",
"__init__.py"))
version = version_regex.findall(contents)[0]
setup(name="pymfe",
version=version,
author="Michael J. Ireland",
author_email="[email protected]",
packages=["pymfe"],
url="http://www.github.com/mikeireland/pymfe/",
license="MIT",
description="A Python tool for extracting and analysing multi-fiber echelle (GHOST/RHEA/Veloce) data.",
long_description=readfile(os.path.join(os.path.dirname(__file__), "README.md")),
install_requires=[
"requests",
"requests_futures"
]
)