diff --git a/.gitignore b/.gitignore index cc054834..0168e437 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ a.out *.kdev_include_paths main.c *.diff +*.swp .idea dist/ *.egg-info @@ -18,4 +19,4 @@ dist/ /rust/ target/ Cargo.lock -.vscode/ \ No newline at end of file +.vscode/ diff --git a/long_description.md b/long_description.md new file mode 100644 index 00000000..88a251db --- /dev/null +++ b/long_description.md @@ -0,0 +1,7 @@ +Glad +---- + +Glad uses the official Khronos-XML specs to generate a +GL/GLES/EGL/GLX/VK/WGL Loader made for your needs. + +Checkout the GitHub repository: https://github.com/Dav1dde/glad diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..086488a1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,65 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "glad2" +dynamic = ["version"] +description = "Multi-Language GL/GLES/EGL/GLX/VK/WGL Loader-Generator based on the official specifications." +readme = "long_description.md" +license = {file = "LICENSE"} +authors = [ {name = "David Herberth", email = "github@dav1d.de"} ] +maintainers = [ {name = "David Herberth", email = "github@dav1d.de"} ] +dependencies = ["Jinja2>=2.7,<4.0"] +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'Intended Audience :: Education', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Topic :: Games/Entertainment', + 'Topic :: Multimedia :: Graphics', + 'Topic :: Multimedia :: Graphics :: 3D Rendering', + 'Topic :: Software Development', + 'Topic :: Software Development :: Build Tools', + 'Topic :: Utilities' +] +keywords = ["opengl", "glad", "generator", "gl", "wgl", "egl", "gles", "vulkan", "vk", "glx"] + +[project.urls] +Source = "https://github.com/Dav1dde/glad" + +[project.scripts] +glad = "glad.__main__:main" + +[project.entry-points."glad.generator"] +c = "glad.generator.c.__init__:CGenerator" +rust = "glad.generator.rust.__init__:RustGenerator" + +[project.entry-points."glad.specification"] +egl = "glad.specification:EGL" +gl = "glad.specification:GL" +glx = "glad.specification:GLX" +wgl = "glad.specification:WGL" +vk = "glad.specification:VK" + +[project.optional-dependencies] +fortran = ["glad2-fortran"] + +[tool.setuptools] +platforms = ["any"] + +[tool.setuptools.dynamic] +version = {attr = "glad.__version__"} + +[tool.setuptools.packages] +find = {} + diff --git a/setup.py b/setup.py deleted file mode 100644 index c687805f..00000000 --- a/setup.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python - -""" -Glad ----- - -Glad uses the official Khronos-XML specs to generate a -GL/GLES/EGL/GLX/WGL Loader made for your needs. - -Checkout the GitHub repository: https://github.com/Dav1dde/glad -""" - -from setuptools import setup, find_packages -import ast -import re - - -# Thanks flask: https://github.com/mitsuhiko/flask/blob/master/setup.py -_version_re = re.compile(r'__version__\s+=\s+(.*)') - -with open('glad/__init__.py', 'rb') as f: - version = str(ast.literal_eval(_version_re.search( - f.read().decode('utf-8')).group(1))) - - -if __name__ == '__main__': - setup( - name='glad2', - version=version, - description='Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specifications.', - long_description=__doc__, - packages=find_packages(), - include_package_data=True, - install_requires=['jinja2'], - entry_points={ - 'console_scripts': [ - 'glad = glad.__main__:main' - ], - 'glad.generator': [ - 'c = glad.generator.c.__init__:CGenerator', - 'rust = glad.generator.rust.__init__:RustGenerator' - ], - 'glad.specification': [ - 'egl = glad.specification:EGL', - 'gl = glad.specification:GL', - 'glx = glad.specification:GLX', - 'wgl = glad.specification:WGL', - 'vk = glad.specification:VK' - ] - }, - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Topic :: Games/Entertainment', - 'Topic :: Multimedia :: Graphics', - 'Topic :: Multimedia :: Graphics :: 3D Rendering', - 'Topic :: Software Development', - 'Topic :: Software Development :: Build Tools', - 'Topic :: Utilities' - ], - keywords='opengl glad generator gl wgl egl gles glx', - author='David Herberth', - author_email='github@dav1d.de', - url='https://github.com/Dav1dde/glad', - license='MIT', - platforms='any' - )