Accepting request 853433 from home:mcepl:branches:devel:tools:scm
- Split package into multibuild, to avoid apipkg -> pytest -> py -> apipkg cycle. OBS-URL: https://build.opensuse.org/request/show/853433 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-apipkg?expand=0&rev=6
This commit is contained in:
parent
563342ba3f
commit
25396c7ed0
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,7 +1,5 @@
|
||||
Index: apipkg-1.5/test_apipkg.py
|
||||
===================================================================
|
||||
--- apipkg-1.5.orig/test_apipkg.py
|
||||
+++ apipkg-1.5/test_apipkg.py
|
||||
--- a/test_apipkg.py
|
||||
+++ b/test_apipkg.py
|
||||
@@ -13,7 +13,7 @@ ModuleType = types.ModuleType
|
||||
class TestRealModule:
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 6 11:49:49 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Split package into multibuild, to avoid apipkg -> pytest -> py ->
|
||||
apipkg cycle.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 19 09:02:40 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-apipkg
|
||||
# spec file for package python
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,15 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-apipkg
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -%{flavor}
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-apipkg%{psuffix}
|
||||
Version: 1.5
|
||||
Release: 0
|
||||
Summary: Namespace control and lazy-import mechanism
|
||||
@ -25,8 +33,13 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/pytest-dev/apipkg/
|
||||
Source: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM pytest4.patch bsc#[0-9]+ mimi.vx@gmail.com
|
||||
# Collected upstream fixes for gh#pytest-dev/apipkg#14 and
|
||||
# gh#pytest-dev/apipkg#15
|
||||
Patch0: pytest4.patch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@ -46,24 +59,29 @@ Usage is very simple: you can require 'apipkg' as a dependency or you
|
||||
can copy paste the <100 Lines of code into your project.
|
||||
|
||||
%prep
|
||||
%setup -q -n apipkg-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n apipkg-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if ! %{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" $python -m pytest
|
||||
%if %{with test}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%if ! %{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst CHANGELOG
|
||||
%dir %{python_sitelib}/apipkg
|
||||
%{python_sitelib}/apipkg/*
|
||||
%{python_sitelib}/apipkg-%{version}-py%{python_version}.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user