forked from raysect/source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (54 loc) · 1.92 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
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
import sys
import numpy
import os
import os.path as path
force = False
profile = False
if "--force" in sys.argv:
force = True
del sys.argv[sys.argv.index("--force")]
if "--profile" in sys.argv:
profile = True
del sys.argv[sys.argv.index("--profile")]
compilation_includes = [".", numpy.get_include()]
compilation_args = []
setup_path = path.dirname(path.abspath(__file__))
# build extension list
extensions = []
for root, dirs, files in os.walk(setup_path):
for file in files:
if path.splitext(file)[1] == ".pyx":
pyx_file = path.relpath(path.join(root, file), setup_path)
module = path.splitext(pyx_file)[0].replace("/", ".")
extensions.append(Extension(module, [pyx_file], include_dirs=compilation_includes, extra_compile_args=compilation_args),)
if profile:
directives = {"profile": True}
else:
directives = {}
setup(
name="raysect",
version="0.2.0",
url="http://www.raysect.org",
author="Dr Alex Meakins",
author_email="developers@raysect.org",
description='A Ray-tracing Framework for Science and Engineering',
license="BSD",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Cython",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Topic :: Multimedia :: Graphics :: 3D Rendering",
"Topic :: Scientific/Engineering :: Physics"
],
packages=find_packages(),
include_package_data=True,
ext_modules=cythonize(extensions, force=force, compiler_directives=directives))