| |
@@ -6,7 +6,7 @@
|
| |
|
| |
Name: python-%{pypi_name}
|
| |
Version: 0.5.0
|
| |
- Release: 11%{?dist}
|
| |
+ Release: 12%{?dist}
|
| |
Summary: Testscenarios, a pyunit extension for dependency injection
|
| |
|
| |
License: ASL 2.0 and BSD
|
| |
@@ -15,13 +15,17 @@
|
| |
BuildArch: noarch
|
| |
|
| |
BuildRequires: python2-devel
|
| |
+ BuildRequires: python2-fixtures
|
| |
BuildRequires: python2-setuptools
|
| |
BuildRequires: python2-pbr
|
| |
+ BuildRequires: python2-testtools
|
| |
|
| |
%if 0%{?with_python3}
|
| |
BuildRequires: python3-devel
|
| |
+ BuildRequires: python3-fixtures
|
| |
BuildRequires: python3-setuptools
|
| |
BuildRequires: python3-pbr
|
| |
+ BuildRequires: python3-testtools
|
| |
%endif # with_python3
|
| |
|
| |
%global _description\
|
| |
@@ -35,6 +39,7 @@
|
| |
|
| |
%package -n python2-%{pypi_name}
|
| |
Summary: %summary
|
| |
+ Requires: python2-pbr
|
| |
Requires: python2-testtools
|
| |
%{?python_provide:%python_provide python2-%{pypi_name}}
|
| |
|
| |
@@ -44,7 +49,8 @@
|
| |
%package -n python3-%{pypi_name}
|
| |
Summary: Testscenarios, a pyunit extension for dependency injection
|
| |
Group: Development/Languages
|
| |
- Requires: python3
|
| |
+ Requires: python3-pbr
|
| |
+ Requires: python3-testtools
|
| |
|
| |
%description -n python3-%{pypi_name}
|
| |
testscenarios provides clean dependency injection for python unittest style
|
| |
@@ -58,31 +64,31 @@
|
| |
%setup -q -n %{pypi_name}-%{version}
|
| |
# Remove bundled egg-info
|
| |
rm -rf %{pypi_name}.egg-info
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- cp -a . %{py3dir}
|
| |
- %endif # with_python3
|
| |
-
|
| |
+ # Remove unknown test options from setup.py
|
| |
+ sed -i '/^buffer = 1$/d' setup.cfg
|
| |
+ sed -i '/^catch = 1$/d' setup.cfg
|
| |
|
| |
%build
|
| |
- %{__python} setup.py build
|
| |
+ %py2_build
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
- %{__python3} setup.py build
|
| |
- popd
|
| |
+ %py3_build
|
| |
%endif # with_python3
|
| |
|
| |
|
| |
%install
|
| |
- %{__python} setup.py install --skip-build --root %{buildroot}
|
| |
+ %py2_install
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
- %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
| |
- popd
|
| |
+ %py3_install
|
| |
%endif # with_python3
|
| |
|
| |
+ %check
|
| |
+ %{__python2} setup.py test
|
| |
+
|
| |
+ %if 0%{?with_python3}
|
| |
+ %{__python3} setup.py test
|
| |
+ %endif # with_python3
|
| |
|
| |
%files -n python2-%{pypi_name}
|
| |
%doc Apache-2.0 BSD GOALS HACKING NEWS README doc/
|
| |
@@ -96,6 +102,11 @@
|
| |
%endif # with_python3
|
| |
|
| |
%changelog
|
| |
+ * Thu Jun 21 2018 Lumír Balhar <lbalhar@redhat.com> - 0.5.0-12
|
| |
+ - Added tests
|
| |
+ - Fixed dependencies
|
| |
+ - Improved and modernized specfile
|
| |
+
|
| |
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.0-11
|
| |
- Rebuilt for Python 3.7
|
| |
|
| |
Hello.
I found out some things which might be improved so I'm creating a pull request.
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27763087
What do you think about it? Have a nice day.
Lumír