forked from vpython/vpython-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (58 loc) · 2.15 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
import sys
try:
from setuptools import setup # try first in case it's already there.
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
from distutils.extension import Extension
try:
from Cython.Build import cythonize
USE_CYTHON = True
extensions = cythonize('vpython/cyvector.pyx')
except ImportError:
extensions = [Extension('vpython.cyvector', ['vpython/cyvector.c'])]
import versioneer
install_requires = ['jupyter', 'vpnotebook', 'numpy', 'ipykernel',
'autobahn>=18.8.2']
if sys.version_info.major == 3 and sys.version_info.minor >= 5:
install_requires.append('autobahn')
setup_args = dict(
name='vpython',
packages=['vpython'],
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='VPython for Jupyter Notebook',
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
author='John Coady / Ruth Chabay / Bruce Sherwood / Steve Spicklemire',
author_email='[email protected]',
url='http://pypi.python.org/pypi/vpython/',
license='LICENSE.txt',
keywords='vpython',
classifiers=[
'Framework :: IPython',
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Natural Language :: English',
'Programming Language :: Python',
'Topic :: Multimedia :: Graphics :: 3D Modeling',
'Topic :: Multimedia :: Graphics :: 3D Rendering',
'Topic :: Scientific/Engineering :: Visualization',
],
ext_modules=extensions,
install_requires=install_requires,
package_data={'vpython': ['vpython_data/*',
'vpython_libraries/*',
'vpython_libraries/images/*']},
)
try:
setup(**setup_args)
except SystemExit as e:
print('Compiled version of vector failed with:')
print(e)
print('***** Using pure python version of vector, which is slower.')
# Do not try to build the extension
del setup_args['ext_modules']
setup(**setup_args)