-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
104 lines (82 loc) · 2.78 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
# -*- coding: utf-8 -*-
'''setup.py - Waqas Bhatti ([email protected]) - Nov 2016
This sets up the package.
Stolen from http://python-packaging.readthedocs.io/en/latest/everything.html and
modified by me.
'''
import versioneer
__version__ = versioneer.get_version()
import sys
from setuptools import setup, find_packages
# pytesting stuff and imports copied wholesale from:
# https://docs.pytest.org/en/latest/goodpractices.html#test-discovery
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
if not self.pytest_args:
targs = []
else:
targs = shlex.split(self.pytest_args)
errno = pytest.main(targs)
sys.exit(errno)
# set up the cmdclass
cmdclass = versioneer.get_cmdclass()
cmdclass['test'] = PyTest
# get the readme
def readme():
with open('README.md') as f:
return f.read()
# let's be lazy and put requirements in one place
# what could possibly go wrong?
with open('requirements.txt') as infd:
INSTALL_REQUIRES = [x.strip('\n') for x in infd.readlines()]
EXTRAS_REQUIRE = {}
###############
## RUN SETUP ##
###############
setup(
name='fitsbits',
version=__version__,
cmdclass=cmdclass,
description=("Utilities for FITS files: safe (de)compression, "
"exporting to images/movies, parallelized ops on "
"collections, and QA"),
long_description=readme(),
long_description_content_type="text/markdown",
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
keywords='astronomy,FITS',
url='https://github.com/waqasbhatti/fitsbits',
author='Waqas Bhatti',
author_email='[email protected]',
license='MIT',
packages=find_packages(),
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
tests_require=['pytest',],
entry_points={
'console_scripts':[
'fitsbits-header=fitsbits.fitshdr:main',
'fitsbits-export=fitsbits.fits2export:main',
'fitsbits-movie=fitsbits.fits2mp4:main',
],
},
include_package_data=True,
zip_safe=False,
python_requires='>=3.6',
)