[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:
Matthieu Dorier 2021-08-25 18:19:40 +01:00 committed by GitHub
parent d27e0bff5a
commit e2e7b0788f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View 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'))

View 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()