py-anuga: add git main version to support build with python@3.5: (#26248)
* py-anuga: add git main version to support build with python@3.5: py-anuga's main branch has been converted to Python-3 recently. * py-triangle: use pypi, py-anuga: Fixed depends and test suite works now
This commit is contained in:
parent
d00c9b47f2
commit
3c5a4157b0
@ -13,20 +13,50 @@ class PyAnuga(PythonPackage):
|
|||||||
|
|
||||||
homepage = "https://github.com/GeoscienceAustralia/anuga_core"
|
homepage = "https://github.com/GeoscienceAustralia/anuga_core"
|
||||||
url = "https://github.com/GeoscienceAustralia/anuga_core/archive/2.1.tar.gz"
|
url = "https://github.com/GeoscienceAustralia/anuga_core/archive/2.1.tar.gz"
|
||||||
|
git = 'https://github.com/GeoscienceAustralia/anuga_core.git'
|
||||||
|
|
||||||
|
# The git main branch of the repo is now python3-only
|
||||||
|
version('main', branch='main')
|
||||||
version('2.1', sha256='0e56c4a7d55570d7b2c36fa9b53ee4e7b85f62be0b4c03ad8ab5f51464321d2f')
|
version('2.1', sha256='0e56c4a7d55570d7b2c36fa9b53ee4e7b85f62be0b4c03ad8ab5f51464321d2f')
|
||||||
|
|
||||||
variant('mpi', default=True, description='Install anuga_parallel')
|
# Non-versioned dependencies for Anuga main and future versions based on python@3.5:
|
||||||
|
depends_on('python@3.5:', type=('build', 'run'), when='@2.2:')
|
||||||
|
depends_on('gdal+geos+python', type=('build', 'run'), when='@2.2:')
|
||||||
|
depends_on('py-future', type=('build', 'run'), when='@2.2:')
|
||||||
|
depends_on('py-matplotlib', type=('build', 'run'), when='@2.2:')
|
||||||
|
depends_on('py-numpy', type=('build', 'run'), when='@2.2:')
|
||||||
|
depends_on('py-setuptools', type=('build'), when='@2.2:')
|
||||||
|
# Replaces pyar in python3 anuga:
|
||||||
|
depends_on('py-mpi4py', type=('build', 'run'), when='@2.2:')
|
||||||
|
|
||||||
# At present AnuGA has only been run and tested using python 2.x.
|
# Version-restricted dependencies for anuga@:2.1, converted to use when='@:2.1':
|
||||||
# We recommend python 2.7.
|
depends_on('python@2.6:2.7.18', type=('build', 'run'), when='@:2.1')
|
||||||
depends_on('python@2.6:2.8', type=('build', 'run'))
|
depends_on('gdal@:3.2+geos+python', type=('build', 'run'), when='@:2.1')
|
||||||
depends_on('py-setuptools@:44', type='build')
|
depends_on('py-matplotlib@:2', type=('build', 'run'), when='@:2.1')
|
||||||
depends_on('py-numpy@:1.16', type=('build', 'run'))
|
depends_on('py-numpy@:1.16', type=('build', 'run'), when='@:2.1')
|
||||||
depends_on('py-netcdf4', type=('build', 'run'))
|
depends_on('py-setuptools@:44', type=('build'), when='@:2.1')
|
||||||
depends_on('py-matplotlib@:2', type=('build', 'run'))
|
# Workaround for problem in the original concretizer selecting 3.6, wanting python3:
|
||||||
depends_on('gdal@:3.2+python', type=('build', 'run'))
|
depends_on('py-setuptools-scm@:3.5', type=('build'), when='@:2.1')
|
||||||
depends_on('py-pypar', when='+mpi', type=('build', 'run'))
|
# pypar is not updated for python3, for python3, py-mpi4py is unsed instead:
|
||||||
|
depends_on('py-pypar', type=('build', 'run'), when='@:2.1')
|
||||||
|
|
||||||
|
# Unversioned dependencies of the python2 and python3-based versions
|
||||||
|
depends_on('py-cython', type=('build'))
|
||||||
|
depends_on('py-netcdf4', type=('build', 'run'))
|
||||||
|
depends_on('py-dill', type=('build', 'test'))
|
||||||
|
depends_on('py-nose', type=('build', 'test'))
|
||||||
|
depends_on('py-scipy', type=('build', 'test'))
|
||||||
|
depends_on('py-triangle', type=('build', 'test'))
|
||||||
|
depends_on('mpi', type=('test', 'run'))
|
||||||
|
|
||||||
# https://github.com/GeoscienceAustralia/anuga_core/issues/247
|
# https://github.com/GeoscienceAustralia/anuga_core/issues/247
|
||||||
conflicts('%apple-clang@12:')
|
conflicts('%apple-clang@12:')
|
||||||
|
|
||||||
|
def setup_run_environment(self, env):
|
||||||
|
if self.run_tests:
|
||||||
|
env.prepend_path('PATH', self.spec['mpi'].prefix.bin)
|
||||||
|
|
||||||
|
install_time_test_callbacks = ['test', 'installtest']
|
||||||
|
|
||||||
|
def installtest(self):
|
||||||
|
python('runtests.py', '--no-build')
|
||||||
|
19
var/spack/repos/builtin/packages/py-triangle/package.py
Normal file
19
var/spack/repos/builtin/packages/py-triangle/package.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 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 PyTriangle(PythonPackage):
|
||||||
|
"""Python bindings to the triangle library"""
|
||||||
|
|
||||||
|
homepage = 'https://github.com/drufat/triangle'
|
||||||
|
pypi = 'triangle/triangle-20200424.tar.gz'
|
||||||
|
|
||||||
|
version('20200424', sha256='fc207641f8f39986f7d2bee1b91688a588cd235d2e67777422f94e61fece27e9')
|
||||||
|
|
||||||
|
depends_on('triangle', type=('build', 'run'))
|
||||||
|
depends_on('py-numpy', type=('build', 'run'))
|
||||||
|
depends_on('py-cython', type=('build'))
|
Loading…
Reference in New Issue
Block a user