2019-10-14 06:58:22 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-srcinfo
|
|
|
|
#
|
2020-05-19 08:52:33 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2019-10-14 06:58:22 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-srcinfo
|
|
|
|
Version: 0.0.8
|
|
|
|
Release: 0
|
|
|
|
Summary: Python library to parse Arch SRCINFO files
|
|
|
|
License: ISC
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
URL: https://github.com/kyrias/python-srcinfo
|
|
|
|
Source: https://github.com/kyrias/python-srcinfo/archive/%{version}.tar.gz#/srcinfo-%{version}.tar.gz
|
|
|
|
# Backport of https://github.com/kyrias/python-srcinfo/pull/10
|
|
|
|
Patch0: pr_10.patch
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-parse
|
2020-05-19 08:52:33 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2019-10-14 06:58:22 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module parse}
|
2020-11-23 18:21:45 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-10-14 06:58:22 +00:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python library to parse Arch .SRCINFO files.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n python-srcinfo-%{version}
|
|
|
|
%patch0 -p1
|
2020-11-23 18:21:45 +00:00
|
|
|
mv test/__init__.py test_srcinfo.py
|
|
|
|
|
|
|
|
# Only needed until 0.0.9 is released
|
|
|
|
# https://github.com/kyrias/python-srcinfo/pull/8
|
|
|
|
sed -i '/nose/d' setup.py
|
2019-10-14 06:58:22 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-19 08:52:33 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/parse_srcinfo
|
2019-10-14 06:58:22 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2020-11-23 18:21:45 +00:00
|
|
|
%pytest
|
2019-10-14 06:58:22 +00:00
|
|
|
|
2020-05-19 08:52:33 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative parse_srcinfo
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative parse_srcinfo
|
|
|
|
|
2019-10-14 06:58:22 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2020-05-19 08:52:33 +00:00
|
|
|
%python_alternative %{_bindir}/parse_srcinfo
|
2019-10-14 06:58:22 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|