forked from mckenn0n/OpenGLContext_python3.6_compatable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
77 lines (70 loc) · 2.75 KB
/
setup.py
File metadata and controls
77 lines (70 loc) · 2.75 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
#!/usr/bin/env python
"""Installs OpenGLContext using setuptools
Run:
python setup.py install
to install the package from the source archive.
"""
try:
from setuptools import setup
except ImportError as err:
from distutils.core import setup
import sys, os
sys.path.insert(0, '.' )
def find_version( ):
for line in open( os.path.join(
'OpenGLContext','__init__.py',
)):
if line.strip().startswith( '__version__' ):
return eval(line.strip().split('=')[1].strip())
raise RuntimeError( """No __version__ = 'string' in __init__.py""" )
version = find_version()
def is_package( path ):
return os.path.isfile( os.path.join( path, '__init__.py' ))
def find_packages( root ):
"""Find all packages under this directory"""
for path, directories, files in os.walk( root ):
if is_package( path ):
yield path.replace( '/','.' )
if __name__ == "__main__":
extraArguments = {
'classifiers': [
"""License :: OSI Approved :: BSD License""",
"""Programming Language :: Python""",
"""Programming Language :: C""",
"""Topic :: Software Development :: Libraries :: Python Modules""",
"""Topic :: Multimedia :: Graphics :: 3D Rendering""",
"""Intended Audience :: Developers""",
"""Environment :: X11 Applications""",
"""Environment :: Win32 (MS Windows)""",
],
'download_url': "http://pypi.python.org/pypi/OpenGLContext",
'keywords': 'PyOpenGL,OpenGL,Context,OpenGLContext,render,3D,TrueType,text,VRML,VRML97,scenegraph',
'long_description' : """Demonstration and Testing Contexts for PyOpenGL
OpenGLContext includes rendering contexts (including navigation)
for wxPython, PyGame and GLUT, as well as a partial context for
Tkinter. It also includes support for rendering TrueType fonts,
and a significant subset of VRML97. It provides fairly extensive
VRML97 scenegraph model. It also includes the bulk of the tests
used to maintain and extend PyOpenGL.
""",
'platforms': ['Win32','Linux','OS-X','Posix'],
}
### Now the actual set up call
setup (
name = "OpenGLContext",
version = version,
description = "Demonstration and testing contexts for PyOpenGL/OpenGL-ctypes",
author = "Mike C. Fletcher",
author_email = "mcfletch@vrplumber.com",
url = "http://pyopengl.sourceforge.net/context/",
license = "BSD-style, see license.txt for details",
packages = list(find_packages('OpenGLContext')),
# need to add executable scripts too...
options = {
'sdist': {
'formats':['gztar','zip'],
}
},
# non python files of examples
**extraArguments
)