-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
119 lines (99 loc) · 4.54 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
# from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
with open("README.md", "r") as fh:
long_description = fh.read()
requires = [
"numpy ==1.23.4", # 'PyQt5','Pillow',
"scipy >=0.14",
"matplotlib",#>=3.1.1",
"astropy >=1.3",
"pyds9",
"photutils",
"tqdm",
"datetime",
"pandas",
"argparse",
# "pyvista", # ==0.25.3
"PyQt5",
"dataphile",
"sep",
]
entry_points = {}
entry_points["console_scripts"] = ["DS9Utils = pyds9plugin.DS9Utils:main"]
# data = { "pyds9plugin": ["QuickLookPlugIn.ds9.ans","config/*","Images/stack????????.fits","Images/stack.fits","Sextractor/*","dataphile/*","doc/ref/*/*","doc/ref/*"]}#,"doc/features_files/*","doc/img/*","doc/index_files/*"
# data = { "pyds9plugin": ["QuickLookPlugIn.ds9.ans","Macros/*","Macros/Macros_Header_catalog/*","filters/*","SEDs/*","config/*","Images/stack????????.fits","Images/m33_hi.fits","Images/stack.fits","Sextractor/*","dataphile/*","doc/ref/examples/*","doc/ref/img/*","doc/ref/index_files/*","doc/ref/*.html"]}
data = {
"pyds9plugin": [
"pyds9plugin/QuickLookPlugIn.ds9.ans",
"pyds9plugin/*",#?test
"Macros/*",
"Macros/Macros_Header_catalog/*",
"Images/stack????????.fits",
"Images/m33_hi.fits",
"Images/stack.fits",
"Sextractor/*",
"doc/ref/examples/*",
"doc/ref/img/*",
"doc/ref/index_files/*",
"doc/ref/*.html",
]
}
# ,"doc/ref/*/*","doc/features_files/*","doc/img/*","doc/index_files/*"
# pyds9plugin/QuickLookPlugIn.ds9.ans
MAJOR = "3"
MINOR = "0"
MICRO = "1dev8"
version = "%s.%s%s" % (MAJOR, MINOR, MICRO)
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
# print("\033[32mPackage installed. \nRun 'DS9Utils' to see the different functions and 'DS9Utils LoadDS9QuickLookPlugin' to load the analysis file in DS9! \nThen open DS9 and use the different functions.\x1b[0m")
import os
os.system("DS9Utils")
os.system("DS9Utils LoadDS9QuickLookPlugin")
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
# print("\033[32mPackage installed. \nRun 'DS9Utils' to see the different functions and 'DS9Utils LoadDS9QuickLookPlugin' to load the analysis file in DS9! \nThen open DS9 and use the different functions.\x1b[0m")
import os
os.system("DS9Utils")
os.system("DS9Utils LoadDS9QuickLookPlugin")
description = (
""" A python DS9 extension for quicklook processing of astronomical images. This highly interactive extension can be generalized automatically to a set of images to turn the plug-in into a real multi-processing pipeline.
To launch the plugin run `
``DS9Utils LoadDS9QuickLookPlugin```
and then launch DS9.""",
)
def setup_package():
setup(
name="pyds9plugin",
# python_requires=">3.5.2",
version=version,
license="CeCILL-B",
install_requires=requires,
# long_description= long_description,#" A python DS9 extension for quicklook processing of astronomical images. This highly interactive extension can be generalized automatically to a set of images to turn the plug-in into a real multi-processing pipeline.",
long_description="A python DS9 extension for quicklook processing of astronomical images. This highly interactive extension can be generalized automatically to a set of images to turn the plug-in into a real multi-processing pipeline.",
url="https://people.lam.fr/picouet.vincent/index.html",
platforms=["Linux", "Mac OS-X", "Unix"],
# cmdclass={"install": PostInstallCommand, "develop": PostDevelopCommand},
packages=find_packages(),
package_data=data,
include_package_data=True,
entry_points=entry_points,
author="Vincent Picouet",
maintainer="Vincent Picouet",
author_email="[email protected]",
description="DS9 Quick-Look plug-in",
)
return
if __name__ == "__main__":
setup_package()
print("\033[32mPackage installed. \nRun 'DS9Utils' to see the different functions and 'DS9Utils LoadDS9QuickLookPlugin' to load the analysis file in DS9! \nThen open DS9 and use the different functions.\x1b[0m")