Add py-svgpath and py-trimesh (#34471)

* Add py-svgpath and dependency

* Update copyright expiration

* [@spackbot] updating style on behalf of heerener

* Process review remarks

* Update var/spack/repos/builtin/packages/py-trimesh/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Fix style issue

* py-trimesh: cleanup and optional dependencies

* Fix formatting issue

* py-trimesh: complete dependency list for easy variant

Two new packages: py-mapbox-earcut and py-pycollada

* Some more missing dependencies

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Erik Heeren 2023-01-04 18:00:00 +01:00 committed by GitHub
parent b9f48da560
commit ab2f842424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyMapboxEarcut(PythonPackage):
"""Python bindings for the C++ implementation of the Mapbox Earcut library,
which provides very fast and quite robust triangulation of 2D polygons."""
homepage = "https://pypi.org/project/mapbox-earcut/"
pypi = "mapbox-earcut/mapbox_earcut-1.0.1.tar.gz"
git = "https://github.com/skogler/mapbox_earcut_python"
version("1.0.1", "9f155e429a22e27387cfd7a6372c3a3865aafa609ad725e2c4465257f154a438")
depends_on("py-setuptools@42:", type="build")
depends_on("py-pybind11@2.6:2", type="build")
depends_on("py-numpy", type=("build", "run"))

View File

@ -0,0 +1,20 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPycollada(PythonPackage):
"""Python library for reading and writing collada documents"""
homepage = "https://pypi.org/project/pycollada/"
pypi = "pycollada/pycollada-0.7.2.tar.gz"
git = "https://github.com/pycollada/pycollada"
version("0.7.2", "70a2630ed499bdab718c0e61a3e6ae3698130d7e4654e89cdecde51bfdaea56f")
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-python-dateutil@2.2:", type=("build", "run"))

View File

@ -0,0 +1,20 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PySvgpath(PythonPackage):
"""svg.path is a collection of objects that implement the different path
commands in SVG, and a parser for SVG path definitions.
"""
homepage = "https://github.com/regebro/svg.path"
pypi = "svg.path/svg.path-4.1.tar.gz"
git = "https://github.com/regebro/svg.path.git"
version("6.2", sha256="1a2159f9db898df93c4637cfd3ccaf7da1fd073f59fa9a5950c73e46d4aa1aca")
version("4.1", sha256="7e6847ba690ff620e20f152818d52e1685b993aacbc41b321f8fee3d1cb427db")
depends_on("py-setuptools", type="build")

View File

@ -0,0 +1,50 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyTrimesh(PythonPackage):
"""Import, export, process, analyze and view triangular meshes"""
homepage = "https://github.com/mikedh/trimesh"
pypi = "trimesh/trimesh-2.38.10.tar.gz"
version(
"3.17.1",
sha256="025bb2fa3a2e87bdd6873f11db45a7ca19216f2f8b6aed29140fca57e32c298e",
)
version(
"2.38.10",
sha256="866e73ea35641ff2af73867c891d7f9b90c75ccb8a3c1e8e06e16ff9af1f8c64",
)
variant(
"easy",
default=False,
description="Install soft dependencies and unlock extra functionality",
)
depends_on("py-setuptools@40.8:", type="build")
depends_on("py-chardet", type=("build", "run"), when="+easy")
depends_on("py-colorlog", type=("build", "run"), when="+easy")
depends_on("py-jsonschema", type=("build", "run"), when="+easy")
depends_on("py-lxml", type=("build", "run"), when="+easy")
depends_on("py-mapbox-earcut", type=("build", "run"), when="+easy")
depends_on("py-msgpack", type=("build", "run"), when="+easy")
depends_on("py-networkx", type=("build", "run"), when="+easy")
depends_on("py-numpy", type=("build", "run"))
depends_on("pil", type=("build", "run"), when="+easy")
depends_on("py-pycollada", type=("build", "run"), when="+easy")
depends_on("py-pyglet@:1", type=("build", "run"), when="+easy")
depends_on("py-requests", type=("build", "run"), when="+easy")
depends_on("py-rtree", type=("build", "run"), when="+easy")
depends_on("py-scipy", type=("build", "run"), when="+easy")
depends_on("py-setuptools", type=("build", "run"), when="+easy")
depends_on("py-shapely", type=("build", "run"), when="+easy")
depends_on("py-svgpath", type=("build", "run"), when="+easy")
depends_on("py-sympy", type=("build", "run"), when="+easy")
depends_on("py-xxhash", type=("build", "run"), when="+easy")