-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
52 lines (46 loc) · 1.32 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
from setuptools import setup, find_packages
from setuptools.extension import Extension
import numpy
# from Cython.Build import cythonize
try:
# from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
except ImportError:
from setuptools import Extension
USING_CYTHON = False
else:
USING_CYTHON = True
ext = '.pyx' if USING_CYTHON else '.c'
extensions = [
Extension(
"flashgamma.gamma_evaluation_c",
["flashgamma/gamma_evaluation_c" + ext],
include_dirs=[numpy.get_include()],
),
]
if USING_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="flashgamma",
version="0.0.1",
author="Samuel Peet",
author_email="[email protected]",
description="Analysis of radiotherapy dose distributions",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/samuelpeet/flashgamma",
packages=find_packages(),
install_requires=[
'numpy',
'scipy'
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
ext_modules = extensions
)