%global pypi_name mmdzanata Name: python-%{pypi_name} Version: 0.7 Release: 2%{?dist} Summary: Tools for working with translations of modulemd License: MIT URL: https://github.com/sgallagher/modulemd-zanata Source0: https://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2dist(setuptools) BuildRequires: python3-devel BuildRequires: python3dist(setuptools) # The following are needed for generating the manpages which are only produced # for the python3 package. BuildRequires: python3dist(babel) BuildRequires: python3dist(click) BuildRequires: python3dist(click-man) BuildRequires: python3dist(pygobject) BuildRequires: python3dist(requests) BuildRequires: koji BuildRequires: libmodulemd %{?python_enable_dependency_generator} %description Provides a library and tools for dealing with translatable strings in modulemd documents. %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: koji Requires: libmodulemd Requires: zanata-client Requires: python2dist(pygobject) %description -n python2-%{pypi_name} Provides a library and tools for dealing with translatable strings in modulemd documents. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: koji Requires: libmodulemd Requires: zanata-client Requires: python3dist(pygobject) %description -n python3-%{pypi_name} Provides a library and tools for dealing with translatable strings in modulemd documents. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py install. %py2_install rm -rf %{buildroot}%{_bindir}/* %py3_build %install %py2_install %py3_install %{__python3} setup.py --command-packages=click_man.commands man_pages --target=%{buildroot}/%{_mandir}/man1 %files -n python2-%{pypi_name} %doc README.md %license COPYING %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %doc README.md %doc %{_mandir}/man1/* %license COPYING %{_bindir}/mmdzanata %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Fri Aug 31 2018 Stephen Gallagher - 0.7-2 - Fix description * Thu Aug 30 2018 Stephen Gallagher - 0.7-1 - Include python2 subpackage * Wed Aug 29 2018 Stephen Gallagher - 0.6-2 - Fix missing BuildRequires * Wed Aug 29 2018 Stephen Gallagher - 0.6-1 - Fix copyright dates - Clean up command documentation - Add manpages - Drop shebang from cli.py * Tue Aug 28 2018 Stephen Gallagher - 0.5-1 - Include COPYING file * Tue Aug 28 2018 Stephen Gallagher - 0.4-1 - Initial package.