-
Notifications
You must be signed in to change notification settings - Fork 16
/
setup.py
70 lines (62 loc) · 2.21 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
"""Hybrid Monte Carlo for Python
This package is a straight-forward port of the functions ``hmc2.m`` and
``hmc2_opt.m`` from the
`MCMCstuff <http://www.lce.hut.fi/research/mm/mcmcstuff/>`__ matlab
toolbox written by Aki Vehtari. The code is originally based on the
functions ``hmc.m`` from the `netlab
toolbox <http://www.ncrg.aston.ac.uk/netlab/index.php>`__ written by Ian
T Nabney. The portion of algorithm involving "windows" is derived from
the C code for this function included in the `Software for Flexible
Bayesian
Modeling <http://www.cs.toronto.edu/~radford/fbm.software.html>`__
written by Radford Neal.
The original Python `port <https://github.com/koepsell/pyhmc>`__ was
made by Kilian Koepsell, and subsequently modernized by Robert T.
McGibbon.
Authors
-------
- Kilian Koepsell [email protected]
- Robert T. McGibbon [email protected]
This software is distributed under the BSD License (see LICENSE file).
"""
from setuptools import find_packages, setup, Extension
import numpy as np
from Cython.Distutils import build_ext
import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = 'pyhmc/_version.py'
versioneer.versionfile_build = 'pyhmc/_version.py'
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'pyhmc-' # dirname like 'myproject-1.2.0'
DOCLINES = __doc__.split("\n")
CLASSIFIERS = """\
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD
Programming Language :: Python
Operating System :: OS Independent
"""
cmdclass = versioneer.get_cmdclass()
cmdclass['build_ext'] = build_ext
extensions = [
Extension('pyhmc._hmc', ['pyhmc/_hmc.pyx'],
include_dirs=[np.get_include()]),
Extension('pyhmc._utils', ['pyhmc/_utils.pyx'],
include_dirs=[np.get_include()]),
]
setup(
name='pyhmc',
author="Robert T. McGibbon",
author_email='[email protected]',
version=versioneer.get_version(),
cmdclass=cmdclass,
url="https://github.com/rmcgibbo/pyhmc",
description=DOCLINES[0],
long_description="\n".join(DOCLINES[2:]),
license='BSD',
install_requires=['numpy'],
packages=find_packages(),
zip_safe=False,
ext_modules=extensions,
)