From f8e97236448f3b1741d44bc55df4a0e7acf1eb48c01dcadc76a9303b1a294bb5 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 24 May 2018 20:56:56 +0000 Subject: [PATCH] Accepting request 611987 from devel:languages:python:misc flow based testing framework OBS-URL: https://build.opensuse.org/request/show/611987 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testflo?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + LICENSE.txt | 13 +++++++ python-testflo.changes | 11 ++++++ python-testflo.spec | 88 ++++++++++++++++++++++++++++++++++++++++++ testflo-1.2.tar.gz | 3 ++ use_setuptools.patch | 17 ++++++++ 7 files changed, 156 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 python-testflo.changes create mode 100644 python-testflo.spec create mode 100644 testflo-1.2.tar.gz create mode 100644 use_setuptools.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..c3ae08e --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,13 @@ +testflo Open Source License: + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/python-testflo.changes b/python-testflo.changes new file mode 100644 index 0000000..e62455e --- /dev/null +++ b/python-testflo.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Thu May 24 17:50:44 UTC 2018 - toddrme2178@gmail.com + +- Add license +- spec file cleanups + +------------------------------------------------------------------- +Wed May 24 19:26:25 UTC 2017 - toddrme2178@gmail.com + +- Initial version +- Add use_setuptools.patch to make sure entrypoints are installed diff --git a/python-testflo.spec b/python-testflo.spec new file mode 100644 index 0000000..a66fc46 --- /dev/null +++ b/python-testflo.spec @@ -0,0 +1,88 @@ +# +# 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 don’t, 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 diff --git a/testflo-1.2.tar.gz b/testflo-1.2.tar.gz new file mode 100644 index 0000000..65e17f3 --- /dev/null +++ b/testflo-1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d35830cb4ec03cc02592ec2b259dd81f49a60380004e5312442e1c89378f74e +size 16116 diff --git a/use_setuptools.patch b/use_setuptools.patch new file mode 100644 index 0000000..11ee9f2 --- /dev/null +++ b/use_setuptools.patch @@ -0,0 +1,17 @@ +From: toddrme2178@gmail.com +Date: 2017-05-24 +Subject: use setuptools instead of distutils + +Some of the optional commands need setuptools. +In particular this is needed for the entrypoints. + +--- +--- a/setup.py ++++ b/setup.py +@@ -1,5 +1,5 @@ + +-from distutils.core import setup ++from setuptools import setup + + setup(name='testflo', + version='1.2',