forked from quatrope/ProperImage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
121 lines (96 loc) · 3.64 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020 QuatroPe
#
# This file is part of ProperImage (https://github.com/quatrope/ProperImage)
# License: BSD-3-Clause
# Full Text: https://github.com/quatrope/ProperImage/blob/master/LICENSE.txt
#
# =============================================================================
# DOCS
# =============================================================================
"""This file is for distribute properimage
"""
# =============================================================================
# IMPORTS
# =============================================================================
import os
import sys
from ez_setup import use_setuptools
import setuptools
use_setuptools()
# =============================================================================
# PATH TO THIS MODULE
# =============================================================================
PATH = os.path.abspath(os.path.dirname(__file__))
# =============================================================================
# Get the version from properimage file itself (not imported)
# =============================================================================
PROPERIMAGE_INIT_PATH = os.path.join(PATH, "properimage", "__init__.py")
with open(PROPERIMAGE_INIT_PATH, "r") as f:
for line in f:
if line.startswith("__version__"):
_, _, PI_VERSION = line.replace('"', "").split()
break
# =============================================================================
# CONSTANTS
# =============================================================================
REQUIREMENTS = [
"numpy >= 1.13.2",
"scipy >= 1.0",
"astropy >= 2.0",
"matplotlib",
"sep",
"astroscrappy>=1.0.5",
"astroalign>=1.0.3",
"tinynpydb>=0.1",
"pyFFTW>=0.12",
# "pytest>=3.6.2",
]
# =============================================================================
# DESCRIPTION
# =============================================================================
with open("README.md") as fp:
LONG_DESCRIPTION = fp.read()
# =============================================================================
# FUNCTIONS
# =============================================================================
print(setuptools.find_packages()) # exclude=['test*']
def do_setup():
setuptools.setup(
name="properimage",
version=PI_VERSION,
description="Proper Astronomic Image Analysis",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
author="Bruno Sanchez",
author_email="bruno@oac.unc.edu.ar",
url="https://github.com/toros-astro/ProperImage",
py_modules=["ez_setup"],
license="BSD 3",
keywords="astronomy image",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
],
packages=setuptools.find_packages(), # exclude=['test*']),
install_requires=REQUIREMENTS,
)
def do_publish():
pass
if __name__ == "__main__":
if sys.argv[-1] == "publish":
do_publish()
else:
do_setup()