-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsetup.py
More file actions
101 lines (89 loc) · 3.69 KB
/
setup.py
File metadata and controls
101 lines (89 loc) · 3.69 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright 2009, Teraview Ltd., Bryan Cole
#
# This file is part of Raypier.
#
# Raypier is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#import distribute_setup
#distribute_setup.use_setuptools()
from setuptools import find_packages, setup
#from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
#from setuptools import find_packages
import sys
import numpy
includes = [numpy.get_include()]
libpath = []
Win64 = sys.platform.startswith("win")
openmp = '/openmp' if Win64 else '-fopenmp'
ext_modules = cythonize("raypier/core/*.pyx",
language="c++" if Win64 else None,
include_path=[numpy.get_include()],
language_level = "3")
for module in ext_modules:
module.extra_compile_args.append(openmp)
if not Win64:
module.extra_compile_args.append('-march=native')
module.extra_link_args.append(openmp)
with open("README.rst", 'r', encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="raypier",
version="0.2.3",
packages=find_packages(),
scripts = [], #no stand-alone application yet
cmdclass = {'build_ext': build_ext},
#ext_package = "raypier", ###Not needed on linux. Is it necessary on Win64?
ext_modules = ext_modules,
include_dirs = [numpy.get_include()],
zip_safe = False, #Zipped eggs cause the ReadTheDocs build to fail.
install_requires = [
#"VTK",
#"wxPython", #maybe can avoid an explicit dependancy on wx
"numpy >= 1.19",
"traits >= 6.0",
"mayavi >= 4.7", #TVTK is distributed as part of Mayavi
"traitsui >= 7.0",
"pyyaml"
],
package_data = {
"": ["*.pyx", "*.pxd"],
"raypier": ["material_data/glass_dispersion_database.db"]
},
author = "Bryan Cole",
author_email = "bryancole.cam@gmail.com",
description = """A optical ray-tracing package, for design, optimisation and \
visualisation of mirror/lens systems.""",
long_description = long_description,
license = "GPL3",
keywords = "science engineering optics ray-tracing physics",
classifiers=["Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Cython",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization"
],
url = "https://groups.google.com/u/1/g/python-raytrace",
project_urls = {
"Homepage" : "https://groups.google.com/u/1/g/python-raytrace",
"Documentation" : "https://raypier-optics.readthedocs.io/en/latest/index.html",
"Source" : "https://github.com/bryancole/raypier_optics.git",
"Issues" : "https://github.com/bryancole/raypier_optics/issues"
},
python_requires=">=3.7"
)