forked from vispy/vispy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
146 lines (127 loc) · 4.78 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
""" Vispy setup script.
Steps to do a new release:
Preparations:
* Test on Windows, Linux, Mac
* Make release notes
* Update API documentation and other docs that need updating.
* Install 'twine' package for uploading to PyPI
Define the version:
* update __version__ in __init__.py
* tag the tip changeset as version x.x.x; `git tag -a 'vX.Y.Z'`
Test installation:
* clear the build and dist dir (if they exist)
* python setup.py sdist
* twine register --repository-url https://test.pypi.org/legacy/ dist/*
* twine upload --repository-url https://test.pypi.org/legacy/ dist/*
* pip install -i https://testpypi.python.org/pypi vispy
Generate and upload package
* python setup.py sdist
* twine register dist/*
* twine upload dist/*
Announcing:
* It can be worth waiting a day for eager users to report critical bugs
* Announce in scipy-user, vispy mailing list, G+
"""
import os
from os import path as op
from warnings import warn
try:
# use setuptools namespace, allows for "develop"
import setuptools # noqa, analysis:ignore
except ImportError:
warn("unable to load setuptools. 'setup.py develop' will not work")
pass # it's not essential for installation
from distutils.core import setup
name = 'vispy'
description = 'Interactive visualization in Python'
# Get version and docstring
__version__ = None
__doc__ = ''
docStatus = 0 # Not started, in progress, done
initFile = os.path.join(os.path.dirname(__file__), 'vispy', '__init__.py')
for line in open(initFile).readlines():
if (line.startswith('version_info') or line.startswith('__version__')):
exec(line.strip())
elif line.startswith('"""'):
if docStatus == 0:
docStatus = 1
line = line.lstrip('"')
elif docStatus == 1:
docStatus = 2
if docStatus == 1:
__doc__ += line
def package_tree(pkgroot):
path = os.path.dirname(__file__)
subdirs = [os.path.relpath(i[0], path).replace(os.path.sep, '.')
for i in os.walk(os.path.join(path, pkgroot))
if '__init__.py' in i[2]]
return subdirs
setup(
name=name,
version=__version__,
author='Vispy contributors',
author_email='[email protected]',
license='(new) BSD',
url='http://vispy.org',
download_url='https://pypi.python.org/pypi/vispy',
keywords="visualization OpenGl ES medical imaging 3D plotting "
"numpy bigdata",
description=description,
long_description=__doc__,
platforms='any',
provides=['vispy'],
install_requires=['numpy'],
extras_require={
'ipython-static': ['ipython'],
'ipython-vnc': ['ipython>=2'],
'ipython-webgl': ['ipython>=2', 'tornado'],
'pyglet': ['pyglet>=1.2'],
# 'pyqt4': [], # Why is this on PyPI, but without downloads?
# 'pyqt5': [], # Ditto.
'pyside': ['PySide'],
'sdl2': ['PySDL2'],
'wx': ['wxPython'],
},
packages=package_tree('vispy'),
package_dir={
'vispy': 'vispy'},
package_data={
'vispy': [op.join('io', '_data', '*'),
op.join('html', 'static', 'js', '*'),
op.join('app', 'tests', 'qt-designer.ui'),
],
'vispy.glsl': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.antialias': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.arrowheads': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.arrows': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.collections': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.colormaps': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.lines': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.markers': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.math': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.misc': ['*.vert','*.frag', "*.glsl"],
'vispy.glsl.transforms': ['*.vert','*.frag', "*.glsl"],
},
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Intended Audience :: Education',
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering :: Visualization',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Framework :: IPython'
],
)