14
0

Accepting request 925059 from home:pgajdos:python

- %check: use %pyunittest rpm macro
- added sources
  + _multibuild

OBS-URL: https://build.opensuse.org/request/show/925059
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.interface?expand=0&rev=48
This commit is contained in:
2021-10-16 09:42:23 +00:00
committed by Git OBS Bridge
parent ca0f24278b
commit 276da46288
3 changed files with 35 additions and 4 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Oct 13 09:49:15 UTC 2021 - pgajdos@suse.com
- %check: use %pyunittest rpm macro
- added sources
+ _multibuild
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 9 22:37:08 UTC 2021 - Jason Craig <os@jacraig.com> Fri Jul 9 22:37:08 UTC 2021 - Jason Craig <os@jacraig.com>

View File

@@ -1,5 +1,5 @@
# #
# spec file for package python-zope.interface # spec file
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
@@ -17,9 +17,17 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%global modname zope.interface %global modname zope.interface
%define oldpython python %define oldpython python
Name: python-zope.interface Name: python-zope.interface%{psuffix}
Version: 5.4.0 Version: 5.4.0
Release: 0 Release: 0
Summary: Interfaces for Python Summary: Interfaces for Python
@@ -29,8 +37,13 @@ Source: https://files.pythonhosted.org/packages/source/z/zope.interface/
# needed for tests that try to compile things # needed for tests that try to compile things
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module zope.event} BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.interface}
BuildRequires: %{python_module zope.testing} BuildRequires: %{python_module zope.testing}
%endif
# /SECTION
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-setuptools Requires: python-setuptools
@@ -55,20 +68,28 @@ the Design By Contract methodology support in Python.
%setup -q -n %{modname}-%{version} %setup -q -n %{modname}-%{version}
%build %build
%if !%{with test}
%python_build %python_build
%endif
%install %install
%if !%{with test}
%python_install %python_install
%python_expand rm %{buildroot}%{$python_sitearch}/zope/interface/_zope_interface_coptimizations.c %python_expand rm %{buildroot}%{$python_sitearch}/zope/interface/_zope_interface_coptimizations.c
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%endif
%check %check
sed -i '/coverage/d' setup.py %if %{with test}
%python_exec setup.py test cd src
%pyunittest zope/interface/{common/,}tests/test_*.py
%endif
%if !%{with test}
%files %{python_files} %files %{python_files}
%license LICENSE.txt COPYRIGHT.txt %license LICENSE.txt COPYRIGHT.txt
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst
%{python_sitearch}/* %{python_sitearch}/*
%endif
%changelog %changelog