File: setup.py.bak

package info (click to toggle)
pyopengl 2.0.1.08-5.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,484 kB
  • ctags: 9,036
  • sloc: pascal: 64,950; xml: 28,088; ansic: 20,696; python: 19,761; tcl: 668; makefile: 240; sh: 25
file content (157 lines) | stat: -rwxr-xr-x 5,009 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
#!/usr/bin/env python

## created 2000/08/01, Rene Liebscher <R.Liebscher@gmx.de>

import distutils, re, sys, string, os, os.path

# get the Distutils version, we need at least 1.0.2pre
versions = re.findall(r'(\d+)[.](\d+)(?:[.](\d+))?', distutils.__version__)
version = 0
if len(versions):
	version = 0x10000*int(versions[0][0]) + 0x100*int(versions[0][1])
	if versions[0][2] != '':
		version = version + int(versions[0][2])

if version < 0x010002:
	print 'PyOpenGL setup requires at least version 1.0.2pre of Distutils.'
	print 'Please get the latest version at:'
	print 'http://www.python.org/sigs/distutils-sig/download.html'
	sys.exit(1)

# Add the current directory to the PATH, needed since build_py has to
# execute shadow selectors.
if os.environ.has_key('PATH'):
	path = string.split(os.environ['PATH'], os.pathsep)
else:
	path = []

if os.curdir not in path:
	path.append(os.curdir)
	os.environ['PATH'] = string.join(path, os.pathsep)

from distutils.sysconfig import *
from distutils.core import setup
from distutils.command.sdist import sdist

from setup.build import build
from setup.util import *
from setup.my_install_data import *
from setup.build_w import build_w
from setup.build_py import build_py
from setup.config import config
from setup.build_doc import build_doc
from setup.dist import Distribution
from setup.togl_setup import install, build_ext
from setup.install_shortcuts import install_shortcuts
from setup.bdist_wininst import NumericWinInstaller

#######################################################################
## platform specific stuff
## see config/<platform>.cfg for any configurable options

# Bob's patch for OSX here...
if sys.platform == 'darwin':
	from distutils.unixccompiler import UnixCCompiler
	UnixCCompiler.executables['ranlib'] = ['ranlib']
	del UnixCCompiler

try:
	import Numeric
	if string.split(Numeric.__version__,'.')[0] > '21':
		numeric_requires = ",python-numeric >= 22.0"
	else:
		numeric_requires = ",python-numeric <= 21.0"
except ImportError:
		numeric_requires = ""

setup (
	name = 'PyOpenGL',
	version = get_version(),
	description = 'OpenGL bindings for Python',
	long_description = 'OpenGL bindings for Python including support for GL extensions, GLU, WGL, GLUT, GLE, and Tk',
	maintainer = 'PyOpenGL SourceForge group',
	maintainer_email = 'pyopengl-devel@lists.sourceforge.net',
	url = 'http://pyopengl.sourceforge.net',
	
	license = 'License :: OSI Approved :: BSD License',
	ext_package = 'OpenGL',
	options = {
		'sdist':{'use_defaults':0, 'force_manifest':1},
		'bdist_rpm':{
			'group':'Libraries/Python',
			'provides':'python-OpenGL,python-GLU,python-GLUT,python-GLE,tk-togl,python-GLX,python-togl',
			# Numeric exports itself as python-numeric,  but at least one distro calls it python-numpy :(
			# the rest of them do appear to have their requirements exported
			'requires':'glut,tkinter'+numeric_requires,
		},
		'bdist_wininst':{
			'bitmap':os.path.join('setup', 'wininst_logo.bmp'),
		},
		'register':{
			'keywords': 'Graphics,3D,OpenGL,GLU,GLUT,GLE,GLX,WGL,TOGL,EXT,ARB,Mesa',
			'summary':'OpenGL and OpenGL-related library support',
			'description':"""SWIG-based OpenGL, GLU, GLUT, WGL, GLX and GLE extensions

PyOpenGL is the defacto "official" Python OpenGL binding.
The project provides accesss to the core GL, and GLU
libraries, as well as the GLUT, GLE, GLX, and WGL
extensions.  It is compatible with most OpenGL-friendly
GUI libraries, including wxPython, PyGame, FxPy, and
Tkinter (with the included togl widget).
""",
			'classifiers': [
				"""License :: OSI Approved :: BSD License""",
				"""Programming Language :: Python""",
				"""Topic :: Multimedia :: Graphics :: 3D Rendering""",
				"""Topic :: Software Development :: Libraries :: Python Modules""",
				"""Intended Audience :: Developers""",
			],
			'download_url': "http://sourceforge.net/project/showfiles.php?group_id=5988",
		},
	},
	   
	distclass = Distribution,
	# Overridden command classes
	cmdclass = {
		'build':build,
		'build_w':build_w,
		'build_doc':build_doc,
		'config':config,
		'build_py':build_py,
		'build_ext':build_ext,
		'install':install,
		'install_shortcuts':install_shortcuts,
		# the next line is very important
		# because we use another format for data_files
		'install_data': my_install_data,
		'bdist_wininst': NumericWinInstaller,
	},
	data_files = [Data_Files(
	   
		base_dir='install_lib',
		copy_to = 'OpenGL',
		strip_dirs = 1,
		template=[
			# take the whole tree
			'graft OpenGL',
			'global-exclude *.py',
			'global-exclude Cvs/*',
			'global-exclude CVS/*',
		],
		preserve_path=1
	)],
	libraries = [
		(
			'interface_util',
			{
				'sources':[
					'src/interface_util/interface_util.c',
					'src/interface_util/platform.c'
				],
				#,#, 'include_dirs':[get_python_inc()] + include_dirs, 'macros':define_macros}),
			}
		)
	]
)