summaryrefslogtreecommitdiff
path: root/var/spack/repos
diff options
context:
space:
mode:
authorErik Heeren <erik.heeren@epfl.ch>2023-12-01 21:44:30 +0100
committerGitHub <noreply@github.com>2023-12-01 21:44:30 +0100
commit50e76bc3d3eeb9e8f69f746ecd212202c2469c81 (patch)
tree6cdf7327372fccb2e0bbd3725042ce3a62e3626a /var/spack/repos
parenta543fd79f1a614c72e423a355a6a792c6583c2e0 (diff)
downloadspack-50e76bc3d3eeb9e8f69f746ecd212202c2469c81.tar.gz
spack-50e76bc3d3eeb9e8f69f746ecd212202c2469c81.tar.bz2
spack-50e76bc3d3eeb9e8f69f746ecd212202c2469c81.tar.xz
spack-50e76bc3d3eeb9e8f69f746ecd212202c2469c81.zip
py-pyglet: version bump (#41082)
* py-pyglet: version bump * py-pyglet: use zip instead of whl, update dependencies * py-pyglet: 2.0.9 and 2.0.10 zips should be downloaded from github * py-pyglet: style * py-pyglet: use virtual packages in dependencies Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-pyglet: doesn't depend on py-future any more * py-pyglet: remove glx dependency * py-pyglet: back to the pypi zipfiles with patch instead --------- Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com>
Diffstat (limited to 'var/spack/repos')
-rw-r--r--var/spack/repos/builtin/packages/py-pyglet/package.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/py-pyglet/package.py b/var/spack/repos/builtin/packages/py-pyglet/package.py
index 1f874c4bb1..bf7d0f7e77 100644
--- a/var/spack/repos/builtin/packages/py-pyglet/package.py
+++ b/var/spack/repos/builtin/packages/py-pyglet/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -11,12 +13,30 @@ class PyPyglet(PythonPackage):
for developing games and other visually rich applications.
"""
- homepage = "https://github.com/pyglet/pygle://github.com/pyglet/pyglet"
- pypi = "pyglet/pyglet-1.4.2.tar.gz"
+ homepage = "https://github.com/pyglet/pyglet"
+ pypi = "pyglet/pyglet-2.0.9.zip"
+ version("2.0.10", sha256="242beb1b3bd67c5bebdfe5ba11ec56b696ad86b50c6e7f2a317f8d783256b9c9")
+ version("2.0.9", sha256="a0922e42f2d258505678e2f4a355c5476c1a6352c3f3a37754042ddb7e7cf72f")
version("1.4.2", sha256="fda25ae5e99057f05bd339ea7972196d2f44e6fe8fb210951ab01f6609cdbdb7")
version("1.2.1", sha256="d1afb253d6de230e73698377566da333ef42e1c82190216aa7a0c1b729d6ff4d")
depends_on("py-setuptools", type="build")
- depends_on("py-future", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
+ depends_on("py-future", type=("build", "run"), when="@:1")
+ depends_on("python@2.7:2.8,3.4:", type=("build", "run"), when="@:1")
+ depends_on("python@3.8:", type=("build", "run"), when="@2.0:")
+ depends_on("gl", type=("build", "run"), when="@2.0: platform=linux")
+ depends_on("pil", type=("build", "run"), when="@2.0: platform=linux")
+ depends_on("pulseaudio", type=("build", "run"), when="@2.0: platform=linux")
+
+ def url_for_version(self, version):
+ if version <= Version("1.4.2"):
+ return (
+ f"https://files.pythonhosted.org/packages/source/p/pyglet/pyglet-{version}.tar.gz"
+ )
+
+ @when("@2.0.9:2.0.10")
+ def patch(self):
+ # 2.0.9 and 2.0.10 had a broken pyproject.toml in their PyPI zipfile
+ if os.path.exists("pyproject.toml"):
+ os.remove("pyproject.toml")