Skip to content

Commit

Permalink
BUILD Attempts to get cleaner/more-modern build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfletch committed Oct 2, 2024
1 parent 459421b commit 36d2c5c
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 6 deletions.
2 changes: 2 additions & 0 deletions numpy-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy >= 2; python_version >= '3.9'
numpy < 2; python_version < '3.9'
49 changes: 48 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,58 @@
[project]
name="PyOpenGL"
dynamic=["version"]
description = "Standard OpenGL bindings for Python"
authors = [
{name="Mike C. Fletcher",email="[email protected]"},
]
readme = {file="readme.rst", 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 :: 2",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Graphics :: 3D Rendering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
]

[project.urls]
Homepage = "https://mcfletch.github.io/pyopengl/"
Download = "https://pypi.org/project/PyOpenGL/"
Source = "https://github.com/mcfletch/pyopengl"
Documentation = "https://mcfletch.github.io/pyopengl/documentation/index.html"

[build-system]
requires = [ "setuptools >= 42.0" ]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = {attr = "OpenGL.version.__version__"}

[tool.setuptools.packages.find]
namespaces=false
include=["OpenGL"]
exclude=["tests","accelerate","directdocs","documentation"]


[tool.black]
skip-string-normalization=true

[tool.ruff.lint]
dummy-variable-rgx="^(_|err)$"
ignore = [
'D200', # Allow multiline docstring even when it could fit on one line

Expand All @@ -15,7 +62,7 @@ ignore = [
'PTH', # allow os.path
'PLR0913', # allow too many arguments

'F841', # we often have `err` as unused argument in this codebase
# 'F841', # we often have `err` as unused argument in this codebase
'E401', # I prefer multiple imports/line generally
'E402', # Common pattern with autogenerated boilerplate in the wrappers
'F401', # Unused imports from autogeneration are everywhere
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ author = Mike C. Fletcher
author_email = [email protected]
url = http://pyopengl.sourceforge.net
download_url = https://pypi.org/project/PyOpenGL/
license = BSD
; 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
Expand Down
5 changes: 3 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
tox
pip >= 23 ; python_version >= '3.12'
pytest
pygame; python_version < '3.11'
pygame >= '2.1.3.dev8'; python_version >= '3.11'
pygame < 2.1.3; python_version < '3.11'
pygame >= 2.1.3; python_version >= '3.11'
--only-binary pygame
psutil
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py{312,311,310,39,27,37,38}-num{0,1}-accel{0,1}
envlist=py{313,312,311,310,39,27,37,38}-num{0,1}-accel{0,1}
skip_missing_interpreters=True
[testenv]
whitelistcommands=accel.sh
Expand All @@ -12,7 +12,7 @@ passenv =
USER
deps=
-r{toxinidir}/test-requirements.txt
num1: numpy
num1: -r{toxinidir}/numpy-requirements.txt
accel1: ./accelerate
#install_command = pip install -I {opts} {packages}
commands=
Expand Down

0 comments on commit 36d2c5c

Please sign in to comment.