-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'epicwink/pep517' into develop
- Loading branch information
Showing
11 changed files
with
79 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = [ "setuptools >= 42.0", "Cython >= 0.28", "numpy" ] | ||
build-backend = "setuptools.build_meta" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[metadata] | ||
name = PyOpenGL-accelerate | ||
version = attr: OpenGL_accelerate.__init__.__version__ | ||
description = Acceleration code for PyOpenGL | ||
author = Mike C. Fletcher | ||
author_email = [email protected] | ||
url = http://pyopengl.sourceforge.net | ||
download_url = http://sourceforge.net/project/showfiles.php?group_id=5988 | ||
license = BSD | ||
long_description = file: readme.txt | ||
long_description_content_type = text/plain | ||
keywords = PyOpenGL, accelerate, Cython | ||
platforms = Win32, Linux, OS-X, Posix | ||
classifiers = | ||
License :: OSI Approved :: BSD License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: C | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Topic :: Multimedia :: Graphics :: 3D Rendering | ||
Intended Audience :: Developers | ||
|
||
[options] | ||
packages = OpenGL_accelerate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#!/usr/bin/env python | ||
"""Builds accelleration functions for PyOpenGL | ||
""" | ||
try: | ||
from setuptools import setup,Extension | ||
except ImportError: | ||
from distutils.core import setup,Extension | ||
|
||
from setuptools import setup, Extension | ||
|
||
try: | ||
from Cython.Distutils import build_ext | ||
except ImportError: | ||
|
@@ -15,15 +14,6 @@ | |
import sys, os | ||
|
||
HERE = os.path.normpath(os.path.abspath(os.path.dirname( __file__ ))) | ||
with open(os.path.join(HERE, 'README.txt'), 'r') as f: | ||
long_description = f.read() | ||
|
||
version = None | ||
# get version from __init__.py | ||
for line in open( os.path.join( HERE,'OpenGL_accelerate','__init__.py') ): | ||
if line.startswith( '__version__' ): | ||
version = eval(line.split( '=' )[1].strip()) | ||
assert version, """Couldn't determine version string!""" | ||
|
||
extensions = [ | ||
] | ||
|
@@ -41,7 +31,6 @@ def cython_extension( name, include_dirs = (), ): | |
), | ||
], | ||
include_dirs = [ | ||
os.path.join(HERE,'..'), | ||
os.path.join(HERE,'src'), | ||
HERE, | ||
]+ list(include_dirs), | ||
|
@@ -92,7 +81,7 @@ def cython_extension( name, include_dirs = (), ): | |
|
||
) ) | ||
|
||
if __name__ == "__main__": | ||
if True: # minimise Git diff | ||
# Workaround for Broken apple Python build params echoed in distutils | ||
# Approach taken from the PyMongo driver. OS-X Python builds were created with | ||
# non-existent flag, and distutils passes those flags to the extension | ||
|
@@ -104,46 +93,20 @@ def cython_extension( name, include_dirs = (), ): | |
for key in ('CFLAGS', 'PY_CFLAGS'): | ||
if key in res: | ||
res[key] = res[key].replace('-mno-fused-madd', '') | ||
|
||
extraArguments = { | ||
'classifiers': [ | ||
"""License :: OSI Approved :: BSD License""", | ||
"""Programming Language :: Python""", | ||
"""Programming Language :: Python :: 3""", | ||
"""Programming Language :: C""", | ||
"""Topic :: Software Development :: Libraries :: Python Modules""", | ||
"""Topic :: Multimedia :: Graphics :: 3D Rendering""", | ||
"""Intended Audience :: Developers""", | ||
], | ||
'keywords': 'PyOpenGL,accelerate,Cython', | ||
'long_description' : long_description, | ||
'long_description_content_type' : 'text/plain', | ||
'platforms': ['Win32','Linux','OS-X','Posix'], | ||
} | ||
|
||
extraArguments = {} | ||
### Now the actual set up call | ||
if have_cython: | ||
extraArguments['cmdclass'] = { | ||
'build_ext': build_ext, | ||
} | ||
setup ( | ||
name = "PyOpenGL-accelerate", | ||
version = version, | ||
description = "Acceleration code for PyOpenGL", | ||
author = "Mike C. Fletcher", | ||
author_email = "[email protected]", | ||
url = "http://pyopengl.sourceforge.net", | ||
download_url = "http://sourceforge.net/project/showfiles.php?group_id=5988", | ||
license = 'BSD', | ||
packages = ['OpenGL_accelerate'], | ||
options = { | ||
'sdist': { | ||
'formats': ['gztar','zip'], | ||
'force_manifest': True, | ||
}, | ||
}, | ||
package_dir = { | ||
'OpenGL_accelerate':'OpenGL_accelerate', | ||
}, | ||
ext_modules=extensions, | ||
**extraArguments | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = [ "setuptools >= 42.0" ] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[metadata] | ||
name = PyOpenGL | ||
version = attr: OpenGL.version.__version__ | ||
description = Standard OpenGL bindings for Python | ||
author = Mike C. Fletcher | ||
author_email = [email protected] | ||
url = http://pyopengl.sourceforge.net | ||
download_url = http://sourceforge.net/projects/pyopengl/files/PyOpenGL/ | ||
license = BSD | ||
long_description = file: readme.rst | ||
long_description_content_type = text/x-rst | ||
keywords = Graphics, 3D, OpenGL, GLU, GLUT, GLE, GLX, EXT, ARB, Mesa, ctypes | ||
classifiers = | ||
License :: OSI Approved :: BSD License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Topic :: Multimedia :: Graphics :: 3D Rendering | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Intended Audience :: Developers | ||
|
||
[options] | ||
packages = find: | ||
|
||
[options.packages.find] | ||
include = OpenGL* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,51 +3,8 @@ | |
""" | ||
import sys, os | ||
extra_commands = {} | ||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
HERE = os.path.normpath(os.path.abspath(os.path.dirname( __file__ ))) | ||
with open(os.path.join(HERE, 'readme.rst'), 'r') as f: | ||
long_description = f.read() | ||
|
||
sys.path.insert(0, '.' ) | ||
metadata = dict( | ||
version = [ | ||
(line.split('=')[1]).strip().strip('"').strip("'") | ||
for line in open(os.path.join('OpenGL','version.py')) | ||
if line.startswith( '__version__' ) | ||
][0], | ||
author = 'Mike C. Fletcher', | ||
author_email = '[email protected]', | ||
url = 'http://pyopengl.sourceforge.net', | ||
license = 'BSD', | ||
download_url = "http://sourceforge.net/projects/pyopengl/files/PyOpenGL/", | ||
keywords = 'Graphics,3D,OpenGL,GLU,GLUT,GLE,GLX,EXT,ARB,Mesa,ctypes', | ||
classifiers = [ | ||
"""License :: OSI Approved :: BSD License""", | ||
"""Programming Language :: Python""", | ||
"""Programming Language :: Python :: 3""", | ||
"""Topic :: Multimedia :: Graphics :: 3D Rendering""", | ||
"""Topic :: Software Development :: Libraries :: Python Modules""", | ||
"""Intended Audience :: Developers""", | ||
], | ||
long_description = long_description, | ||
long_description_content_type = 'text/x-rst', | ||
) | ||
|
||
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( '/','.' ) | ||
|
||
requirements = [] | ||
if sys.hexversion < 0x2050000: | ||
requirements.append( 'ctypes' ) | ||
from setuptools import setup | ||
|
||
from distutils.command.install_data import install_data | ||
class smart_install_data(install_data): | ||
|
@@ -77,9 +34,6 @@ def run(self): | |
|
||
if __name__ == "__main__": | ||
setup( | ||
name = "PyOpenGL", | ||
packages = list( find_packages('OpenGL') ), | ||
description = 'Standard OpenGL bindings for Python', | ||
options = { | ||
'sdist': { | ||
'formats': ['gztar'], | ||
|
@@ -88,5 +42,4 @@ def run(self): | |
}, | ||
data_files = datafiles, | ||
cmdclass = extra_commands, | ||
**metadata | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters