-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (42 loc) · 1.3 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
# coding: utf-8
""" sick, the spectroscopic inference crank """
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
open_kwargs = {"encoding": "utf-8"} if major >= 3 else {}
def rf(filename):
with open(filename, **open_kwargs) as fp:
contents = fp.read()
return contents
version_regex = re.compile("__version__ = \"(.*?)\"")
contents = rf(os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"sick", "__init__.py"))
version = version_regex.findall(contents)[0]
setup(name="sick",
version=version,
author="Andrew R. Casey",
author_email="arc@ast.cam.ac.uk",
packages=[
"sick",
"sick.models",
"sick.clis",
"sick.specutils"],#"sick.tests"],
url="http://www.github.com/andycasey/sick/",
license="MIT",
description="Infer astrophysical parameters from spectra",
long_description=rf(os.path.join(os.path.dirname(__file__), "README.md")),
install_requires=rf(
os.path.join(os.path.dirname(__file__), "requirements.md")).split("\n"),
entry_points={
"console_scripts": [
"sick-models = sick.clis.models:main",
"sick = sick.clis.run:main"
]
}
)