-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
28 lines (25 loc) · 1010 Bytes
/
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
from setuptools import setup
from setuptools.command.install import install
class post_install(install):
def run(self):
# Call parent
install.run(self)
# Execute commands
import os
codepath=os.path.join(self.install_libbase,'radioflux')
ds9path=os.path.join(self.install_data,'ds9','radio-flux.ds9')
print('Path to .ds9 file is',ds9path)
os.system('sed -i -e s!REPLACE!'+codepath+'! '+ds9path)
os.system('chmod +x '+codepath+'/*.py')
setup(name='radioflux',
author='Martin Hardcastle',
author_email='[email protected]',
url='http://www.extragalactic.info/',
description='Radio flux measurement for ds9',
download_url = 'https://github.com/mhardcastle/radioflux/archive/refs/tags/v1.3.tar.gz',
version='1.3',
packages=['radioflux'],
install_requires=['astropy','pyregion','numpy'],
data_files=[('ds9',['radio-flux.ds9'])],
cmdclass={"install": post_install}
)