#1 Remove the Python 2 subpackage
Merged 2 years ago by churchyard. Opened 2 years ago by pviktori.
rpms/ pviktori/python-cookiecutter drop-py2  into  master

file modified
+5 -78
@@ -1,49 +1,14 @@ 

- # This package depends on automagic byte compilation

- # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2

- %global _python_bytecompile_extra 1

- 

- # sitelib for noarch packages, sitearch for others (remove the unneeded one)

- %{!?__python2: %global __python2 %__python}

- %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

- 

- %if 0%{?fedora}

- %bcond_without python3

- %else

- %bcond_with python3

- %endif

- 

  %global pkgname cookiecutter

  

  Name:           python-cookiecutter

  Version:        1.6.0

- Release:        5%{?dist}

+ Release:        6%{?dist}

  Summary:        CLI utility to create projects from templates

  License:        BSD

  URL:            https://github.com/audreyr/cookiecutter

  Source0:        https://github.com/audreyr/%{pkgname}/archive/%{version}.tar.gz

  BuildArch:      noarch

  

- BuildRequires:  python2-devel

- 

- # doc deps

- BuildRequires:  python2-sphinx

- BuildRequires:  python2-click

- BuildRequires:  python2-whichcraft

- BuildRequires:  python2-binaryornot

- BuildRequires:  python2-poyo

- BuildRequires:  python2-jinja2-time

- 

- # testing deps

- BuildRequires:  python2-pytest

- BuildRequires:  python2-pytest-cov

- BuildRequires:  python2-pytest-mock

- BuildRequires:  python2-pytest-catchlog

- BuildRequires:  python2-freezegun

- BuildRequires:  python2-jinja2

- BuildRequires:  python2-future

- BuildRequires:  python2-arrow

- 

- %if %{with python3}

  BuildRequires:  python3-devel

  BuildRequires:  python3-sphinx

  BuildRequires:  python3-click
@@ -60,35 +25,17 @@ 

  BuildRequires:  python3-pytest-catchlog

  BuildRequires:  python3-freezegun

  BuildRequires:  python3-jinja2

- %endif # with python3

  

  %description

  A command-line utility that creates projects from cookiecutters (project

  templates), e.g. creating a Python package project from a Python package

  project template.

  

- %package     -n python2-%{pkgname}

- Summary: %{summary}

- Recommends: python-%{pkgname}-doc

- Requires:  python2-binaryornot

- Requires:  python2-click

- Requires:  python2-jinja2

- Requires:  python2-jinja2-time

- Requires:  python2-poyo

- Requires:  python2-requests

- Requires:  python2-whichcraft

- %{?python_provide:%python_provide python2-%{pkgname}}

- %description -n python2-%{pkgname}

- A command-line utility that creates projects from cookiecutters (project

- templates), e.g. creating a Python package project from a Python package

- project template.

- 

  %package     -n python-%{pkgname}-doc

  Summary: Documentation for %{pkgname}

  %description -n python-%{pkgname}-doc

  Documentation for %{pkgname}

  

- %if %{with python3}

  %package     -n python3-%{pkgname}

  Summary: %{summary}

  Recommends: python-%{pkgname}-doc
@@ -105,54 +52,30 @@ 

  A command-line utility that creates projects from cookiecutters (project

  templates), e.g. creating a Python package project from a Python package

  project template.

- %endif # with python3

  

  

  %prep

  %autosetup -n %{pkgname}-%{version}

  

  # fix invocation of /usr/bin/python

- %if %{with python3}

  sed -i 's#python -c#%{__python3} -c#' Makefile

- %else

- sed -i 's#python -c#%{__python2} -c#' Makefile

- %endif # with python3

  

  %build

- %{py2_build}

- 

- %if %{with python3}

  %{py3_build}

- %endif # with python3

  

  # make sphinx docs

  make docs

  

  %install

- %{py2_install}

- 

- %if %{with python3}

  %{py3_install}

- %endif # with python3

  

  %check

- %{__python2} setup.py test

- 

- %if %{with python3}

  %{__python3} setup.py test

- %endif # with python3

  

- %files -n python2-%{pkgname}

- %license LICENSE

- # For noarch packages: sitelib

- %{python2_sitelib}/*

- 

- %if %{with python3}

  %files -n python3-%{pkgname}

  %license LICENSE

  # For noarch packages: sitelib

  %{python3_sitelib}/*

- %endif # with python3

  %{_bindir}/%{pkgname}

  

  %files -n python-%{pkgname}-doc
@@ -161,6 +84,10 @@ 

  %doc *.rst

  

  %changelog

+ * Fri Dec 07 2018 Petr Viktorin <pviktori@redhat.com> - 1.6.0-6

+ - Remove the Python 2 subpackage

+   https://bugzilla.redhat.com/show_bug.cgi?id=1639308

+ 

  * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild