forked from pool/python-srcinfo
- Convert to pip-based build and libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=11
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-srcinfo
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without libalternatives
|
||||
Name: python-srcinfo
|
||||
Version: 0.1.2
|
||||
Release: 0
|
||||
@@ -24,12 +25,14 @@ License: ISC
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/kyrias/python-srcinfo
|
||||
Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: alts
|
||||
Requires: python-parse >= 1.19.0
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module parse >= 1.19.0}
|
||||
@@ -45,21 +48,18 @@ Python library to parse Arch .SRCINFO files.
|
||||
mv test/__init__.py test_srcinfo.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/parse_srcinfo
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%post
|
||||
%python_install_alternative parse_srcinfo
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative parse_srcinfo
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative parse_srcinfo
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
|
Reference in New Issue
Block a user