[py-meshio] Added py-meshio package (#25578)
* Added py-meshio package * Added setuptools dependency to py-meshio package * Update var/spack/repos/builtin/packages/py-meshio/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-meshio/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-meshio/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-meshio/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-meshio/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * added missing py-importlib-metadata dependency in py-meshio Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
d27e0bff5a
commit
e2e7b0788f
2 changed files with 34 additions and 0 deletions
24
var/spack/repos/builtin/packages/py-meshio/package.py
Normal file
24
var/spack/repos/builtin/packages/py-meshio/package.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Copyright 2013-2021 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 import *
|
||||||
|
|
||||||
|
|
||||||
|
class PyMeshio(PythonPackage):
|
||||||
|
"""MeshIO is a Python library to read and write many mesh formats."""
|
||||||
|
|
||||||
|
homepage = "https://github.com/nschloe/meshio"
|
||||||
|
pypi = "meshio/meshio-5.0.0.tar.gz"
|
||||||
|
|
||||||
|
version('5.0.0', sha256='f6327c06d6171d30e0991d3dcb048751035f9cfac1f19e2444971275fd971188')
|
||||||
|
|
||||||
|
# MeshIO uses a setup.cfg/pyproject.toml structure, which spack doesn't yet handle.
|
||||||
|
# This patch adds a small setup.py file that spack can call.
|
||||||
|
patch('setup.patch')
|
||||||
|
|
||||||
|
depends_on('python@3.7:', type=('build', 'run'))
|
||||||
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('py-numpy', type=('build', 'run'))
|
||||||
|
depends_on('py-importlib-metadata', when='^python@:3.7', type=('build', 'run'))
|
10
var/spack/repos/builtin/packages/py-meshio/setup.patch
Normal file
10
var/spack/repos/builtin/packages/py-meshio/setup.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7f1a176
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+from setuptools import setup
|
||||||
|
+
|
||||||
|
+if __name__ == "__main__":
|
||||||
|
+ setup()
|
Loading…
Reference in a new issue