-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (50 loc) · 2.28 KB
/
setup.py
File metadata and controls
58 lines (50 loc) · 2.28 KB
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
import setuptools, re, glob, os, sys
from setuptools import setup, find_packages
# githash = 'unknown'
# if os.path.isdir(os.path.dirname(os.path.abspath(__file__))+'/.git'):
# try:
# gitproc = Popen(['git', 'rev-parse', 'HEAD'], stdout = PIPE)
# githash = gitproc.communicate()[0]
# if gitproc.returncode != 0:
# print("unable to run git, assuming githash to be unknown")
# githash = 'unknown'
# except EnvironmentError:
# print("unable to run git, assuming githash to be unknown")
# githash = githash.decode('utf-8').replace('\n', '')
# with open(os.path.dirname(os.path.abspath(__file__))+'/ClosureInvariants/githash.txt', 'w+') as githash_file:
# githash_file.write(githash)
with open('./ClosureInvariants/__init__.py', 'r') as metafile:
metafile_contents = metafile.read()
metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", metafile_contents))
pkg_data={'astroutils': ['*.txt', 'examples/cosmotile/*.yaml',
'examples/image_cutout/*.yaml',
'examples/catalogops/*.yaml',
'examples/codes/lightcone_operations/*.py',
'examples/codes/lightcone_operations/*.yaml']}
install_req_list=['astroutils']
setup_req_list = ['astroutils']
setup(name='ClosureInvariants',
# version=metadata['version'],
# description=metadata['description'],
# long_description=open("README.rst").read(),
# url=metadata['url'],
# author=metadata['author'],
# author_email=metadata['authoremail'],
# maintainer=metadata['maintainer'],
# maintainer_email=metadata['maintaineremail'],
license='MIT',
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7+',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Utilities'],
packages=find_packages(),
package_data = pkg_data,
include_package_data=True,
scripts=glob.glob('scripts/*.py'),
install_requires=install_req_list,
setup_requires=setup_req_list,
tests_require=['pytest'],
zip_safe=False)