14
0

Accepting request 1284473 from devel:languages:python

- Convert to pip-based build and libalternatives

OBS-URL: https://build.opensuse.org/request/show/1284473
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-gflags?expand=0&rev=13
This commit is contained in:
2025-06-11 14:23:47 +00:00
committed by Git OBS Bridge
2 changed files with 19 additions and 16 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jun 10 13:05:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build and libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 4 12:53:02 UTC 2018 - Matej Cepl <mcepl@suse.com> Tue Dec 4 12:53:02 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-gflags # spec file for package python-python-gflags
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -17,26 +17,27 @@
%define oldpython python %define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without libalternatives
Name: python-python-gflags Name: python-python-gflags
Version: 3.1.2 Version: 3.1.2
Release: 0 Release: 0
Url: http://code.google.com/p/python-gflags
Summary: Google Commandline Flags Module Summary: Google Commandline Flags Module
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://code.google.com/p/python-gflags
Source: https://files.pythonhosted.org/packages/source/p/python-gflags/python-gflags-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/python-gflags/python-gflags-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
BuildArch: noarch
%ifpython2 %ifpython2
Provides: %{oldpython}-gflags = %{version} Provides: %{oldpython}-gflags = %{version}
Obsoletes: %{oldpython}-gflags < %{version} Obsoletes: %{oldpython}-gflags < %{version}
%endif %endif
BuildArch: noarch
Requires(post): update-alternatives
Requires(preun): update-alternatives
%python_subpackages %python_subpackages
%description %description
@@ -56,25 +57,22 @@ difference from OptParse.)
%setup -q -n python-gflags-%{version} %setup -q -n python-gflags-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man
%python_clone -a %{buildroot}%{_bindir}/gflags2man %python_clone -a %{buildroot}%{_bindir}/gflags2man
%post %pre
%python_install_alternative gflags2man %python_libalternatives_reset_alternative gflags2man
%preun
%python_uninstall_alternative gflags2man
%files %{python_files} %files %{python_files}
%defattr(-,root,root,-)
%license COPYING %license COPYING
%doc AUTHORS ChangeLog README.md %doc AUTHORS ChangeLog README.md
%python_alternative %{_bindir}/gflags2man %python_alternative %{_bindir}/gflags2man
%{python_sitelib}/* %{python_sitelib}/gflags
%{python_sitelib}/python[-_]gflags-%{version}*-info
%changelog %changelog