-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
63 lines (48 loc) · 1.71 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
from setuptools import setup
import os,glob,warnings,sys,fnmatch,subprocess
from setuptools.command.test import test as TestCommand
from distutils.core import setup
import numpy.distutils.misc_util
if sys.version_info < (3,0):
sys.exit('Sorry, Python 2 is not supported')
class jhattest(TestCommand):
def run_tests(self):
import jhat
errno = jhat.test()
jhat.test_jhat()
sys.exit(errno)
AUTHOR = 'Armin Rest & Justin Pierel'
AUTHOR_EMAIL = '[email protected]'
VERSION = '0.2.0'
LICENSE = ''
URL = ''
def recursive_glob(basedir, pattern):
matches = []
for root, dirnames, filenames in os.walk(basedir):
for filename in fnmatch.filter(filenames, pattern):
matches.append(os.path.join(root, filename))
return matches
PACKAGENAME='jhat'
# Add the project-global data
data_files = []
for dataFolderName in ['[]']:
pkgdatadir = os.path.join(PACKAGENAME, dataFolderName)
data_files.extend(recursive_glob(pkgdatadir, '*'))
data_files = [f[len(PACKAGENAME)+1:] for f in data_files]
setup(
name=PACKAGENAME,
cmdclass={'test': jhattest},
packages=['bin',PACKAGENAME],
scripts=['bin/run_st_wcs_align.py','bin/run_st_wcs_align_batch.py'],
setup_requires=['numpy'],
install_requires=['argparse', 'numpy', 'matplotlib', 'astropy', 'jwst', 'scipy',
'photutils', 'pysiaf', 'astroquery', 'pandas>=1.5', 'stsci.skypac',
'tweakreg_hack','tweakwcs>=0.8','pytest-astropy'],
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
include_dirs=numpy.distutils.misc_util.get_numpy_include_dirs(),
package_data={PACKAGENAME:data_files},
include_package_data=True
)