#5 EPEL6: Use python3_pkgversion, specify directory for pytest
Merged 5 years ago by churchyard. Opened 5 years ago by aviso.
rpms/ aviso/python-wcwidth el6  into  el6

file modified
+44 -37
@@ -1,22 +1,15 @@ 

- %if 0%{?rhel} && 0%{?rhel} <= 7

- %bcond_with python3

- %else

- %bcond_without python3

- %endif

- 

- # Disable tests since tox.ini is not found properly. I'll try to enable them back ASAP

- %bcond_with tests

+ %bcond_without tests

  

  %global pypi_name wcwidth

  

  Name:           python-%{pypi_name}

  Version:        0.1.7

- Release:        1%{?dist}

+ Release:        9%{?dist}

  Summary:        Measures number of Terminal column cells of wide-character codes

  

  License:        MIT

  URL:            https://github.com/jquast/wcwidth

- Source0:        https://pypi.io/packages/source/w/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

+ Source0:        %pypi_source

  BuildArch:      noarch

   

  %description
@@ -25,75 +18,89 @@ 

  printable width of a string on a Terminal.

  

  %package -n     python2-%{pypi_name}

+ Summary:        %{summary}

  BuildRequires:  python2-devel

- BuildRequires:  python-setuptools

+ BuildRequires:  python2-setuptools

  %if %{with tests}

- BuildRequires:  python-tox

- %endif # with tests

- Summary:        Measures number of Terminal column cells of wide-character codes

+ BuildRequires:  python2-pytest

+ %endif

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

- %{?el6:Provides: python-%{pypi_name}}

  

  %description -n python2-%{pypi_name}

  This API is mainly for Terminal Emulator implementors, or those writing programs

  that expect to interpreted by a terminal emulator and wish to determine the

  printable width of a string on a Terminal.

  

- %if %{with python3}

- %package -n     python3-%{pypi_name}

- Summary:        Measures number of Terminal column cells of wide-character codes

- BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

+ %package -n     python%{python3_pkgversion}-%{pypi_name}

+ Summary:        %{summary}

+ BuildRequires:  python%{python3_pkgversion}-devel

+ BuildRequires:  python%{python3_pkgversion}-setuptools

  %if %{with tests}

- BuildRequires:  python3-tox 

- %endif # with tests

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

+ BuildRequires:  python%{python3_pkgversion}-pytest

+ %endif

+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}

  

- %description -n python3-%{pypi_name}

+ %description -n python%{python3_pkgversion}-%{pypi_name}

  This API is mainly for Terminal Emulator implementors, or those writing programs

  that expect to interpreted by a terminal emulator and wish to determine the

  printable width of a string on a Terminal.

- %endif # with python3

  

  %prep

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

  

  %build

  %py2_build

- %if %{with python3}

  %py3_build

- %endif # with python3

  

  %install

  %py2_install

- %if %{with python3}

  %py3_install

- %endif # with python3

  

  %if %{with tests}

  %check

- %{__python2} setup.py test

- %if %{with python3}

- %{__python3} setup.py test

- %endif # with python3

+ %{__python2} -m pytest -v wcwidth/tests

+ %{__python3} -m pytest -v wcwidth/tests

  %endif # with tests

  

  %files -n python2-%{pypi_name} 

- %{!?_licensedir:%global license %doc}

  %doc README.rst

  %license LICENSE.txt

  %{python2_sitelib}/%{pypi_name}

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

  

- %if %{with python3}

- %files -n python3-%{pypi_name} 

+ %files -n python%{python3_pkgversion}-%{pypi_name} 

  %doc README.rst

  %license LICENSE.txt

  %{python3_sitelib}/%{pypi_name}

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

- %endif # with python3

  

  %changelog

+ * Sat Nov 05 2018 Avram Lubkin <aviso@rockhopper.net> - 0.1.7-9

+ - Use python3_pkgversion to determine package names

+ - Specify tests directory for pytest

+ 

+ * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-8

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

+ 

+ * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.7-7

+ - Rebuilt for Python 3.7

+ 

+ * Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.7-6

+ - Update Python 2 dependency declarations to new packaging standards

+   (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

+ 

+ * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-5

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

+ 

+ * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

+ 

+ * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

+ 

+ * Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1.7-2

+ - Rebuild for Python 3.6

+ 

  * Tue Dec 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.7-1

  - Update to 0.1.7

  

  • Use python3_pkgversion to determine package names
  • Specify tests directory for pytest

If simple-koji-ci won't start, please, link a scratch build.

Pull-Request has been merged by churchyard

5 years ago
Metadata