#1 Update to 1.0.22
Merged 6 years ago by churchyard. Opened 6 years ago by cstratak.
Unknown source master  into  master

file modified
+55 -26
@@ -1,21 +1,30 @@

+ %if 0%{?fedora} || 0%{?rhel} > 7

+ # Enable python3 build by default

+ %bcond_without python3

+ %else

+ %bcond_with python3

+ %endif

+ 

+ %if 0%{?rhel} > 7

+ # Disable python2 build by default

+ %bcond_with python2

+ %else

+ %bcond_without python2

+ %endif

+ 

  %global srcname Unidecode

  

  Name:		python-unidecode

- Version:	0.04.16

- Release:	11%{?dist}

+ Version:	1.0.22

+ Release:	1%{?dist}

  Summary:	US-ASCII transliterations of Unicode text

  

  Group:		Development/Libraries

- License:	GPL+ or Artistic

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

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

+ License:	GPLv2+

+ URL:		https://pypi.python.org/pypi/%{srcname}/%{version}

+ Source0:	https://files.pythonhosted.org/packages/source/U/%{srcname}/%{srcname}-%{version}.tar.gz

  

  BuildArch:	noarch

- BuildRequires:	python2-devel

- %if 0%{?fedora} || 0%{?rhel} > 7

- BuildRequires: python3-devel

- %endif

- 

  

  %global _description\

  This is a python port of Text::Unidecode Perl module. It provides a function,\
@@ -24,60 +33,80 @@

  

  %description %_description

  

+ %if %{with python2}

  %package -n python2-unidecode

  Summary: %summary

+ BuildRequires:	python2-devel

+ 

  %{?python_provide:%python_provide python2-unidecode}

  

  %description -n python2-unidecode %_description

+ %endif # with python2

  

- %if 0%{?fedora} || 0%{?rhel} > 7

+ %if %{with python3}

  %package -n python3-unidecode

  Summary:	US-ASCII transliterations of Unicode text

+ BuildRequires: python3-devel

+ 

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

  

  %description -n python3-unidecode

  This is a python port of Text::Unidecode Perl module. It provides a function,

  'unidecode(...)' that takes Unicode data and tries to represent it in ASCII

  characters.

- %endif

+ %endif # with python3

  

  

  %prep

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

  

  %build

- %{__python} setup.py build

+ %if %{with python2}

+ %py2_build

+ %endif # with python2

  

- %if 0%{?fedora} || 0%{?rhel} > 7

+ %if %{with python3}

  rm -rf %{py3dir}

  cp -a . %{py3dir}

  pushd %{py3dir}

- %{__python3} setup.py build

+ %py3_build

  popd

- %endif

+ %endif # with python3

  

  %install

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

+ %if %{with python2}

+ %py2_install

+ %endif # with python2

  

- %if 0%{?fedora} || 0%{?rhel} > 7

+ %if %{with python3}

  pushd %{py3dir}

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

+ %py3_install

  popd

- %endif

+ %endif # with python3

  

+ %if %{with python2}

  %files -n python2-unidecode

- %doc README ChangeLog

- %{python_sitelib}/unidecode/

- %{python_sitelib}/*.egg-info

+ %license LICENSE

+ %doc README.rst ChangeLog

+ %{python2_sitelib}/unidecode/

+ %{python2_sitelib}/*.egg-info

+ %endif # with python2

  

- %if 0%{?fedora} || 0%{?rhel} > 7

+ %if %{with python3}

  %files -n python3-unidecode

- %doc README ChangeLog

+ %license LICENSE

+ %doc README.rst ChangeLog

+ %{_bindir}/unidecode

  %{python3_sitelib}/unidecode/

  %{python3_sitelib}/*.egg-info

- %endif

+ %endif # with python3

  

  

  %changelog

+ * Thu Mar 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.0.22-1

+ - Update to 1.0.22

+ - Don't build Python 2 subpackage on EL > 7

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.04.16-11

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

  

Don't build Python 2 subpackage on EL > 7

Modernize the SPEC file

Change the license tag to the proper license

This has been here for a month without a response. I'm merging it this week if nobody has a problem with that.

Pull-Request has been merged by churchyard

6 years ago