This repository has been archived by the owner on May 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
setup.py
69 lines (59 loc) · 1.91 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
from glob import glob
import os
from setuptools import setup
from setuptools.extension import Extension
import numpy as np
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
print('Cython is not available; using pre-generated C files')
USE_CYTHON = False
ext = '.pyx' if USE_CYTHON else '.c'
extensions = []
for source_file in glob('probfit/*' + ext):
fname, _ = os.path.splitext(os.path.basename(source_file))
extensions.append(
Extension('probfit.{0}'.format(fname),
sources=['probfit/{0}{1}'.format(fname, ext)],
include_dirs=[np.get_include()])
)
if USE_CYTHON:
extensions = cythonize(extensions)
def get_version():
version = {}
with open('probfit/version.py') as fp:
exec(fp.read(), version)
return version['__version__']
__version__ = get_version()
setup(
name='probfit',
version=__version__,
description='Distribution Fitting/Regression Library',
long_description=''.join(open('README.rst').readlines()[4:]),
author='Piti Ongmongkolkul',
author_email='piti118@gmail.com',
url='https://github.com/scikit-hep/probfit',
package_dir={'probfit': 'probfit'},
packages=['probfit'],
ext_modules=extensions,
install_requires=[
'setuptools',
'numpy',
'iminuit',
'matplotlib'
],
classifiers=[
"Programming Language :: Python",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Mathematics',
'Intended Audience :: Science/Research',
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License'
],
)