15
0
forked from pool/python-bindep

- Add patch remove-mock.patch:

* Remove use of external mock module, try unittest.mock first.
- Switch to pyproject macros.
- Actually run the testsuite using pytest. 
- Stop using %python_sitelib/*

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bindep?expand=0&rev=10
This commit is contained in:
2023-03-27 06:49:55 +00:00
committed by Git OBS Bridge
parent 2febc4ba61
commit 5aacca197a
3 changed files with 54 additions and 8 deletions

View File

@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-bindep
Version: 2.11.0
Release: 0
@@ -24,6 +23,7 @@ Summary: Binary dependency utility
License: Apache-2.0
URL: https://docs.opendev.org/opendev/bindep
Source: https://files.pythonhosted.org/packages/source/b/bindep/bindep-%{version}.tar.gz
Patch0: remove-mock.patch
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
@@ -32,14 +32,18 @@ BuildRequires: %{python_module distro >= 1.7.0}
BuildRequires: %{python_module Parsley}
BuildRequires: %{python_module coverage >= 3.6}
BuildRequires: %{python_module fixtures >= 0.3.12}
BuildRequires: %{python_module mock >= 2.0}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pbr >= 2.0.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-subunit}
BuildRequires: %{python_module testrepository >= 0.0.13}
BuildRequires: %{python_module testtools >= 0.9.27}
BuildRequires: %{python_module wheel}
# /SECTION
BuildRequires: fdupes
BuildRequires: openSUSE-release
Requires: python-Parsley
Requires: python-distro >= 1.7.0
Requires: python-packaging
@@ -58,18 +62,18 @@ not Python based, and particularly for testing, some dependencies have to be
installed before `pip` can be used - such as `virtualenv` and `pip` itself.
%prep
%setup -q -n bindep-%{version}
%autosetup -p1 -n bindep-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/bindep
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# %check
# %xpython_exec setup.py test
%check
%pytest -s -k 'not (test_arch_implies_pacman or test_manjaro_implies_pacman)'
%post
%python_install_alternative bindep
@@ -81,6 +85,7 @@ installed before `pip` can be used - such as `virtualenv` and `pip` itself.
%doc AUTHORS ChangeLog NEWS.rst README.rst
%license LICENSE
%python_alternative %{_bindir}/bindep
%{python_sitelib}/*
%{python_sitelib}/bindep
%{python_sitelib}/bindep-%{version}*info
%changelog