forked from MazinLab/MKIDPipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (54 loc) · 2.02 KB
/
setup.py
File metadata and controls
66 lines (54 loc) · 2.02 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
59
60
61
62
63
64
65
66
from __future__ import print_function
import setuptools
from setuptools.command.install import install
from setuptools.command.develop import develop
import subprocess
import numpy
from setuptools.extension import Extension
from Cython.Build import cythonize
#pip install -e git+http://github.com/mazinlab/mkidpipeline.git@develop#egg=mkidpipeline
# example_extension = Extension(
# name="mkidpipeline.some.module",
# sources=['mkidpipeline/some/module.pyx'],
# include_dirs=[numpy.get_include()],
# extra_compile_args=["-std=c99", "-O3", '-pthread']
# )
def compile_and_install_software():
"""Used the subprocess module to compile/install the C software.
e.g. subprocess.check_call('/usr/local/hdf5/bin/h5cc -shlib -pthread -O3 -o bin2hdf bin2hdf.c',
cwd=src_path, shell=True)
"""
pass
class CustomInstall(install, object):
"""Custom handler for the 'install' command."""
def run(self):
compile_and_install_software()
super(CustomInstall, self).run()
class CustomDevelop(develop, object):
"""Custom handler for the 'install' command."""
def run(self):
compile_and_install_software()
super(CustomDevelop,self).run()
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="mkidpipeline",
version="0.1",
author="MazinLab",
author_email="mazinlab@ucsb.edu",
description="An UVOIR MKID Data Reduction Package",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/MazinLab/MKIDPipeline",
packages=setuptools.find_packages(),
ext_modules=cythonize([]),
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research"),
zip_safe=False,
cmdclass={'install': CustomInstall, 'develop': CustomDevelop},
scripts=['scripts/mkidpipe']
)