forked from pool/python-pytest-mpi
Compare commits
4 Commits
Author | SHA256 | Date | |
---|---|---|---|
90d4287d5b | |||
b31266341d | |||
8e5a273d25 | |||
157575f9c5 |
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 4 05:23:17 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
- Fix test runs in %check.
|
||||||
|
- Switch to %pyproject_* macros for build.
|
||||||
|
- Drop no longer necessary skip_python* macro definitions.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 25 14:18:03 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Fix openmpi paths in %check section
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 28 07:30:07 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
Tue May 28 07:30:07 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-mpi
|
# spec file for package python-pytest-mpi
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -23,9 +23,6 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define modname pytest_mpi
|
%define modname pytest_mpi
|
||||||
%define skip_python2 1
|
|
||||||
# mpi4py depends on numpy, which is not available for python36
|
|
||||||
%define skip_python36 1
|
|
||||||
Name: python-pytest-mpi
|
Name: python-pytest-mpi
|
||||||
Version: 0.6
|
Version: 0.6
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -33,15 +30,18 @@ Summary: MPI plugin for pytest
|
|||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://pytest-mpi.readthedocs.io
|
URL: https://pytest-mpi.readthedocs.io
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-mpi/pytest-mpi-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-mpi/pytest-mpi-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-pytest
|
Requires: python-pytest
|
||||||
Recommends: python-mpi4py
|
Recommends: python-mpi4py
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module mpi4py}
|
BuildRequires: openmpi-macros-devel
|
||||||
BuildRequires: %{mpiver}
|
BuildRequires: %{mpiver}
|
||||||
|
BuildRequires: %{python_module mpi4py}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module sybil >= 3}
|
BuildRequires: %{python_module sybil >= 3}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
@@ -54,28 +54,31 @@ mpi plugin for pytest to collect information from openmpi-based tests.
|
|||||||
%autosetup -p1 -n pytest-mpi-%{version}
|
%autosetup -p1 -n pytest-mpi-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PATH=${PATH}:%{_libdir}/mpi/gcc/%{mpiver}/bin
|
|
||||||
source %{_libdir}/mpi/gcc/%{mpiver}/bin/mpivars.sh
|
|
||||||
# Exclude test_fixtures, it fails for i586 arch with Segmentation fault
|
# Exclude test_fixtures, it fails for i586 arch with Segmentation fault
|
||||||
donttest="test_fixtures"
|
donttest="test_fixtures"
|
||||||
%if "%{_arch}" == "s390x"
|
%if "%{_arch}" == "s390x"
|
||||||
# Exclude some test_mpi_ that fails for s390x arch with Segmentation fault
|
# Exclude some test_mpi_ that fails for s390x arch with Segmentation fault
|
||||||
donttest+=" or test_mpi_with_mpi or test_mpi_only_mpi or test_mpi_skip_under_mpi or test_mpi_xfail or test_mpi_xfail_under_mpi"
|
donttest+=" or test_mpi_with_mpi or test_mpi_only_mpi or test_mpi_skip_under_mpi or test_mpi_xfail or test_mpi_xfail_under_mpi"
|
||||||
%endif
|
%endif
|
||||||
|
%setup_openmpi
|
||||||
%pytest -v -p pytester --runpytest=subprocess -k "not ($donttest)"
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
export PYTEST_DEBUG_TEMPROOT=$(mktemp -d -p ./ py%{$python_version_nodots}.XXX)
|
||||||
|
$python -m pytest -v -p pytester --runpytest=subprocess -k "not ($donttest)"
|
||||||
|
rm -fr ${PYTEST_DEBUG_TEMPROOT}
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python_sitelib}/%{modname}/
|
%{python_sitelib}/%{modname}/
|
||||||
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
|
%{python_sitelib}/%{modname}-%{version}*.*-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user