14
0
Files
python-testflo/python-testflo.spec

89 lines
3.0 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package python-testflo
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-testflo
Version: 1.2
Release: 0
License: Apache-2.0
Summary: A simple flow based testing framework
Url: https://github.com/OpenMDAO/testflo
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/t/testflo/testflo-%{version}.tar.gz
Source10: https://raw.githubusercontent.com/OpenMDAO/testflo/%{version}/LICENSE.txt
# PATCH-FIX-OPENSUSE use_setuptools.patch -- some of the optional features we want need setuptools
Patch0: use_setuptools.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module mpi4py}
# /SECTION
Requires: python-six
Recommends: python-mpi4py
BuildArch: noarch
Requires(post): update-alternatives
Requires(preun): update-alternatives
%python_subpackages
%description
A simple flow based testing framework. testflo was written to support
testing of the OpenMDAO framework. Some OpenMDAO features require
execution under MPI while some others dont, so we wanted a testing
framework that could run all of our tests in the same way and would
allow us to build all of our tests using unittest.TestCase objects
that we were already familiar with.
The MPI testing functionality was originally implemented using the
nose testing framework. It worked, but was always buggy, and the size
and complexity of the nose framework made it difficult to know
exactly what was going on. Enter testflo, an attempt to build a
simpler testing framework that would have the basic functionality of
other test frameworks, with the additional ability to run MPI unit
tests that are very similar to regular unit tests
%prep
%setup -q -n testflo-%{version}
cp %{SOURCE10} .
%patch0 -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/testflo
%check
%python_expand $python -m unittest testflo.test
%post
%python_install_alternative testflo
%preun
%python_uninstall_alternative testflo
%files %{python_files}
%license LICENSE.txt
%python_alternative %{_bindir}/testflo
%{python_sitelib}/*
%changelog