14
0

Accepting request 491075 from home:TheBlackCat:branches:devel:languages:python

Update to version 3.1.1

OBS-URL: https://build.opensuse.org/request/show/491075
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-gflags?expand=0&rev=14
This commit is contained in:
Todd R
2017-04-25 20:18:46 +00:00
committed by Git OBS Bridge
parent b8b596cc49
commit bd7474c91f
4 changed files with 75 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-python-gflags
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,27 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-gflags
Version: 2.0
Version: 3.1.1
Release: 0
Url: http://code.google.com/p/python-gflags
Summary: Google Commandline Flags Module
License: BSD-3-Clause
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/p/python-gflags/python-gflags-%{version}.tar.gz
Source: http://files.pythonhosted.org/packages/source/p/python-gflags/python-gflags-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
Provides: python-gflags = %{version}
# Change to < after 1.6 release
Obsoletes: python-gflags <= %{version}
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
Obsoletes: python-gflags < %{version}
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Requires(post): update-alternatives
Requires(preun): update-alternatives
%python_subpackages
%description
This project is the python equivalent of google-gflags, a Google commandline
@@ -55,17 +54,24 @@ difference from OptParse.)
%setup -q -n python-gflags-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Remove ext from name
mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/gflags2man.py %{buildroot}%{_bindir}/gflags2man
%python_clone -a %{buildroot}%{_bindir}/gflags2man
%files
%post
%python_install_alternative gflags2man
%preun
%python_uninstall_alternative gflags2man
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/gflags2man
%python_alternative %{_bindir}/gflags2man
%{python_sitelib}/*
%changelog