#2 Drop python2-xtermcolor, modernize
Merged 4 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python-xtermcolor nopy2  into  master

file modified
+14 -55
@@ -1,98 +1,57 @@ 

- # Created by pyp2rpm-0.5.0

  %global pypi_name xtermcolor

- %global with_python3 1

  

  Name:           python-%{pypi_name}

  Version:        1.3

- Release:        14%{?dist}

+ Release:        15%{?dist}

  Summary:        Python module for colorizing output with xterm 256 color support

  

  License:        MIT

  URL:            http://pypi.python.org/pypi/xtermcolor/%{version}

- Source0:        http://pypi.python.org/packages/source/x/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

+ Source0:        %{pypi_source}

  # I already asked upstream to put LICENSE in the source archive:

  # https://github.com/broadinstitute/xtermcolor/issues/1

  Source1:        https://raw.github.com/broadinstitute/xtermcolor/master/LICENSE

  BuildArch:      noarch

   

- BuildRequires:  python2-devel

- BuildRequires:  python2-setuptools

- %if 0%{?with_python3}

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

- %endif

  

  %global _description\

  Python module for colorizing output with xterm 256 color support.

  

  %description %_description

  

- %package -n python2-%{pypi_name}

- Summary: %summary

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

- 

- %description -n python2-%{pypi_name} %_description

- 

- %if 0%{?with_python3}

  %package -n python3-%{pypi_name}

- Summary:        Python module for colorizing output with xterm 256 color support

+ Summary:        %{summary}

+ Conflicts:      python2-%{pypi_name} < 1.3-15

+ %{?python_provide:%python_provide python3-%{pypi_name}}

  

- %description -n python3-%{pypi_name}

- Python module for colorizing output with xterm 256 color support.

- This package contains Python 3 build of xtermcolor.

- %endif

+ %description -n python3-%{pypi_name} %_description

  

  %prep

- %setup -q -n %{pypi_name}-%{version}

+ %autosetup -n %{pypi_name}-%{version}

  # Remove bundled egg-info

  rm -rf %{pypi_name}.egg-info

  cp %{SOURCE1} .

  # delete distribute setup, we don't need it

  sed -i '/distribute_setup/d' setup.py

  

- %if 0%{?with_python3}

- rm -rf %{py3dir}

- cp -a . %{py3dir}

- %endif # with_python3

- 

  %build

- %py2_build

- 

- %if 0%{?with_python3}

- pushd %{py3dir}

- %{__python3} setup.py build

- popd

- %endif # with_python3

+ %py3_build

  

  %install

- %if 0%{?with_python3}

- pushd %{py3dir}

- %{__python3} setup.py install --skip-build --root %{buildroot}

- mv %{buildroot}%{_bindir}/{,python3-}xtermcolor

- popd

- %endif # with_python3

+ %py3_install

  

- %py2_install

- 

- %files -n python2-%{pypi_name}

- %doc LICENSE

- %{_bindir}/xtermcolor

- %{python2_sitelib}/%{pypi_name}

- # exclude file used for generation of setup.py

- %exclude %{python_sitelib}/%{pypi_name}/distribute_setup.py*

- %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

- 

- %if 0%{?with_python3}

  %files -n python3-%{pypi_name}

  %doc LICENSE

- %{_bindir}/python3-xtermcolor

- %{python3_sitelib}/%{pypi_name}

- # exclude file used for generation of setup.py

- %exclude %{python3_sitelib}/%{pypi_name}/distribute_setup.py*

+ %{_bindir}/xtermcolor

+ %{python3_sitelib}/%{pypi_name}/

  %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

- %endif

  

  %changelog

+ * Thu Apr 25 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3-15

+ - Drop python2-xtermcolor

+ 

  * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-14

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

  

no initial comment

Pull-Request has been merged by churchyard

4 years ago