bcbaede
# FIXME python3-pytests is not available in epel7
bcbaede
%bcond_with tests
bcbaede
bcbaede
%global pypi_name chardet
bcbaede
bcbaede
Name:           python3-%{pypi_name}
263f52e
Version:        3.0.4
263f52e
Release:        1%{?dist}
Orion Poplawski 39d9568
Summary:        Character encoding auto-detection in Python
Orion Poplawski 39d9568
License:        LGPLv2
bcbaede
URL:            https://github.com/%{pypi_name}/%{pypi_name}
bcbaede
Source0:        %pypi_source
Orion Poplawski 39d9568
Orion Poplawski 39d9568
BuildArch:      noarch
bcbaede
Orion Poplawski 39d9568
BuildRequires:  python%{python3_pkgversion}-devel
Orion Poplawski 39d9568
BuildRequires:  python%{python3_pkgversion}-setuptools
bcbaede
%if 0%{?with tests}
bcbaede
BuildRequires:  python%{python3_pkgversion}-pytest
bcbaede
%endif
bcbaede
%if 0%{?python3_other_pkgversion}
bcbaede
BuildRequires:  python%{python3_other_pkgversion}-devel
bcbaede
BuildRequires:  python%{python3_other_pkgversion}-setuptools
bcbaede
%if 0%{?with tests}
bcbaede
BuildRequires:  python%{python3_other_pkgversion}-pytest
bcbaede
%endif
bcbaede
%endif
bcbaede
bcbaede
%global _description\
bcbaede
Character encoding auto-detection in Python. As\
Orion Poplawski 39d9568
smart as your browser. Open source.
Orion Poplawski 39d9568
bcbaede
%description %_description
Orion Poplawski 39d9568
bcbaede
%package -n python%{python3_pkgversion}-%{pypi_name}
bcbaede
Summary:        Character encoding auto-detection in Python %{python3_version}
bcbaede
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
Orion Poplawski 39d9568
bcbaede
%description -n python%{python3_pkgversion}-%{pypi_name}
bcbaede
%_description
bcbaede
This package is for Python3 with version %{python3_version} .
Orion Poplawski 39d9568
bcbaede
%if 0%{?python3_other_pkgversion}
bcbaede
%package -n python%{python3_other_pkgversion}-%{pypi_name}
bcbaede
Summary:        Character encoding auto-detection in Python %{python3_other_version}
bcbaede
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}}
bcbaede
bcbaede
%description -n python%{python3_other_pkgversion}-%{pypi_name}
bcbaede
%_description
bcbaede
This package is for Python3 with version %{python3_other_version} .
bcbaede
%endif
Orion Poplawski 39d9568
Orion Poplawski 39d9568
bcbaede
%prep
bcbaede
%setup -q -n %{pypi_name}-%{version}
bcbaede
Orion Poplawski 39d9568
%build
Orion Poplawski 39d9568
%py3_build
bcbaede
%{?python3_other_pkgversion: %py3_other_build}
Orion Poplawski 39d9568
Orion Poplawski 39d9568
%install
Orion Poplawski 39d9568
%py3_install
bcbaede
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version}
a26927d
ln -s chardetect-%{python3_version} %{buildroot}%{_bindir}/chardetect-3
bcbaede
%if 0%{?python3_other_pkgversion}
bcbaede
%py3_other_install
bcbaede
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_other_version}
bcbaede
%endif
bcbaede
bcbaede
%check
bcbaede
%if %{with tests}
bcbaede
%{__python3} -m pytest -v
bcbaede
%{?python3_other_pkgversion: %{__python3_other} -m pytest -v}
bcbaede
%endif
Orion Poplawski 39d9568
Orion Poplawski 39d9568
bcbaede
%files -n python%{python3_pkgversion}-%{pypi_name}
Orion Poplawski 39d9568
%license LICENSE
Orion Poplawski 39d9568
%doc README.rst
bcbaede
%{python3_sitelib}/%{pypi_name}/
bcbaede
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
bcbaede
%{_bindir}/chardetect-%{python3_version}
bcbaede
%{_bindir}/chardetect-3
bcbaede
bcbaede
%if 0%{?python3_other_pkgversion}
bcbaede
%files -n python%{python3_other_pkgversion}-%{pypi_name}
bcbaede
%license LICENSE
bcbaede
%doc README.rst
bcbaede
%{python3_other_sitelib}/%{pypi_name}/
bcbaede
%{python3_other_sitelib}/%{pypi_name}-%{version}-py%{python3_other_version}.egg-info/
bcbaede
%{_bindir}/chardetect-%{python3_other_version}
bcbaede
%endif
Orion Poplawski 39d9568
Orion Poplawski 39d9568
Orion Poplawski 39d9568
%changelog
263f52e
* Thu Aug 22 2019 Orion Poplawski <orion@nwra.com> - 3.0.4-1
263f52e
- Update to 3.0.4
263f52e
a26927d
* Tue Apr  2 2019 Orion Poplawski <orion@nwra.com> - 2.3.0-6
a26927d
- Fix chardetect-3 link (bug #1691827)
a26927d
a26927d
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 2.3.0-5
aab7061
- Rebuilt to change main python from 3.4 to 3.6
aab7061
bcbaede
* Fri Sep 28 2018 Raphael Groner <projects.rg@smart.ms> - 2.3.0-4
bcbaede
- add python3 subpackages
bcbaede
- use same macro names as in Fedora
bcbaede
- use binary suffix and individual symlinks for python default version
bcbaede
Orion Poplawski 39d9568
* Thu Jan 14 2016 Orion Poplwski <orion@cora.nwra.com> - 2.3.0-3
Orion Poplawski 39d9568
- Drop group, use new macros
Orion Poplawski 39d9568
Orion Poplawski 39d9568
* Wed Jan 13 2016 Orion Poplwski <orion@cora.nwra.com> - 2.3.0-2
Orion Poplawski 39d9568
- Remove unneeded shebang
Orion Poplawski 39d9568
Orion Poplawski 39d9568
* Tue Dec 29 2015 Orion Poplwski <orion@cora.nwra.com> - 2.3.0-1
Orion Poplawski 39d9568
- Initial EPEL7 package