forked from SNEWS2/snewpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (61 loc) · 2.26 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
#!/usr/bin/env python
#
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
from distutils.command.sdist import sdist as DistutilsSdist
from setuptools import setup, find_packages
# Git-based version info. Remove?
from python.snewpy._git import get_version, SetVersion
#
# Begin setup
#
setup_keywords = dict()
#
setup_keywords['name'] = 'snewpy'
setup_keywords['description'] = 'A Python package for working with supernova neutrinos'
setup_keywords['author'] = 'SNEWS Collaboration'
setup_keywords['author_email'] = '[email protected]'
setup_keywords['license'] = 'BSD'
setup_keywords['url'] = 'https://github.com/SNEWS2/snewpy'
setup_keywords['version'] = get_version()
#
# Use README.md as a long_description.
#
setup_keywords['long_description'] = ''
if os.path.exists('README.md'):
with open('README.md') as readme:
setup_keywords['long_description'] = readme.read()
setup_keywords['long_description_content_type'] = 'text/markdown'
#
# Set other keywords for the setup function.
#
# Use entry_points to let `pip` create executable scripts for each target platform.
# See https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html
# setup_keywords['entry_points'] = {'console_scripts': ['to_snowglobes = snewpy.to_snowglobes:generate_time_series', ], },
setup_keywords['provides'] = [setup_keywords['name']]
setup_keywords['python_requires'] = '>=3.7'
setup_keywords['zip_safe'] = False
setup_keywords['packages'] = find_packages('python')
setup_keywords['package_dir'] = {'': 'python'}
setup_keywords['package_data'] = {'':['templates/*.glb']}
setup_keywords['cmdclass'] = {'version': SetVersion, 'sdist': DistutilsSdist}
setup_keywords['test_suite']='snewpy.test.snewpy_test_suite.snewpy_test_suite'
requires = []
with open('requirements.txt', 'r') as f:
for line in f:
if line.strip():
requires.append(line.strip())
setup_keywords['install_requires'] = requires
setup_keywords['extras_require'] = { # Optional
'dev': ['pytest', 'pytest-benchmark'],
'docs':['numpydoc']
}
#
# Internal data directories.
#
#setup_keywords['data_files'] = [('snewpy/data/config', glob('data/config/*')),
# ('snewpy/data/spectra', glob('data/spectra/*'))]
#
# Run setup command.
#
setup(**setup_keywords)