%global pypi_name blurb Name: python-%{pypi_name} Version: 1.0.0 %global post post1 %global uversion %{version}.%{post} Release: 1.%{post}%{?dist} Summary: Command-line tool to manage CPython Misc/NEWS.d entries License: BSD URL: https://github.com/python/core-workflow/tree/master/blurb Source0: https://files.pythonhosted.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{uversion}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-flit >= 0.11 BuildRequires: python3-pip %description Blurb is a tool designed to rid CPython core development of the scourge of Misc/NEWS conflicts. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Provides: %{pypi_name} == %{version}-%{release} # Entrypoints Requires: python3-setuptools # Calls git in subprocess Requires: git %description -n python3-%{pypi_name} Blurb is a tool designed to rid CPython core development of the scourge of Misc/NEWS conflicts. %prep %autosetup -n %{pypi_name}-%{uversion} # https://github.com/python/core-workflow/pull/152 chmod -x LICENSE.txt # script in site-packages sed -i '1d' %{pypi_name}.py chmod -x %{pypi_name}.py %build # we use flit to create a wheel from sources flit wheel %install # We install the wheel created at %%build %py3_install_wheel %{pypi_name}-%{uversion}-py3-none-any.whl %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.rst %{_bindir}/blurb %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{uversion}.dist-info %changelog * Thu Jun 29 2017 Miro HronĨok - 1.0.0-1.post1 - rebuilt