%global with_python3 1 %if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__python2: %global __python2 %{__python}} %{!?python2_sitelib: %global python2_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python2_version: %global python2_version %{python_version}} %global with_python3 0 %endif %global pypi_name releases Name: python-%{pypi_name} Version: 1.0.0 Release: 1%{?dist} Summary: A Sphinx extension for changelog manipulation Group: Development/Libraries License: BSD URL: https://github.com/bitprophet/releases Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %description Releases is a Sphinx extension designed to help you keep a source control friendly, merge friendly changelog file & turn it into useful, human readable HTML output. Specifically: * The source format (kept in your Sphinx tree as changelog.rst) is a stream-like timeline that plays well with source control & only requires one entry per change (even for changes that exist in multiple release lines). * The output (when you have the extension installed and run your Sphinx build command) is a traditional looking changelog page with a section for every release; multi-release issues are copied automatically into each release. * By default, feature and support issues are only displayed under feature releases, and bugs are only displayed under bugfix releases. This can be overridden on a per-issue basis. %package -n python2-%{pypi_name} Summary: A Sphinx extension for changelog manipulation Requires: python-sphinx %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} Releases is a Sphinx extension designed to help you keep a source control friendly, merge friendly changelog file & turn it into useful, human readable HTML output. Specifically: * The source format (kept in your Sphinx tree as changelog.rst) is a stream-like timeline that plays well with source control & only requires one entry per change (even for changes that exist in multiple release lines). * The output (when you have the extension installed and run your Sphinx build command) is a traditional looking changelog page with a section for every release; multi-release issues are copied automatically into each release. * By default, feature and support issues are only displayed under feature releases, and bugs are only displayed under bugfix releases. This can be overridden on a per-issue basis. %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: A Sphinx extension for changelog manipulation Group: Development/Libraries BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-sphinx %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} Releases is a Sphinx extension designed to help you keep a source control friendly, merge friendly changelog file & turn it into useful, human readable HTML output. Specifically: * The source format (kept in your Sphinx tree as changelog.rst) is a stream-like timeline that plays well with source control & only requires one entry per change (even for changes that exist in multiple release lines). * The output (when you have the extension installed and run your Sphinx build command) is a traditional looking changelog page with a section for every release; multi-release issues are copied automatically into each release. * By default, feature and support issues are only displayed under feature releases, and bugs are only displayed under bugfix releases. This can be overridden on a per-issue basis. This package contains the Python 3 version of this module. %endif # with_python3 %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif # with_python3 %install %py2_install %if 0%{?with_python3} %py3_install %endif # with_python3 %files -n python2-%{pypi_name} %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.rst docs %{python2_sitelib}/%{pypi_name}/ %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %license LICENSE %doc README.rst docs %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif # with_python3 %changelog * Mon Mar 14 2016 Eduardo Mayorga Téllez - 1.0.0-1 - Update to 1.0.0 * Sat Aug 1 2015 Eduardo Mayorga Téllez - 0.7.0-2 - Use %%py2_build, %%py3build, %%py2_install and %%py2_install - Make a python2 subpackage - Remove %%py3dir macro * Sat May 23 2015 Eduardo Mayorga Téllez - 0.7.0-1 - Update to 0.7.0 - Fixing Python 3 package name - Adding license text * Thu Aug 07 2014 Eduardo Mayorga Téllez - 0.6.1-1 - Initial packaging