From 867340108dacf97d0f18aa923e248e28956f7aa2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 02 2019 08:07:41 +0000 Subject: import python-chardet-3.0.4-10.module+el8.1.0+3111+de3f2d8e --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61255db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/chardet-3.0.4.tar.gz diff --git a/.python-chardet.metadata b/.python-chardet.metadata new file mode 100644 index 0000000..0ae0fbd --- /dev/null +++ b/.python-chardet.metadata @@ -0,0 +1 @@ +4766fb07e700945a7085d073257f1f320d037ce8 SOURCES/chardet-3.0.4.tar.gz diff --git a/SPECS/python-chardet.spec b/SPECS/python-chardet.spec new file mode 100644 index 0000000..5277ed5 --- /dev/null +++ b/SPECS/python-chardet.spec @@ -0,0 +1,106 @@ +%bcond_without python3 +%global pypi_name chardet +Name: python-%{pypi_name} +Version: 3.0.4 +Release: 10%{?dist} +Summary: Character encoding auto-detection in Python + +Group: Development/Languages +License: LGPLv2 +URL: https://github.com/%{pypi_name}/%{pypi_name} +Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel, python2-setuptools + +%if %{with python3} +BuildRequires: python3-devel, python3-setuptools +%endif # with python3 + +%global _description\ +Character encoding auto-detection in Python. As\ +smart as your browser. Open source. + +%description %_description + +%package -n python2-%{pypi_name} +Summary: %summary +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} %_description + +%if %{with python3} +%package -n python3-%{pypi_name} +Summary: Character encoding auto-detection in Python 3 + +%description -n python3-%{pypi_name} +Character encoding auto-detection in Python. As +smart as your browser. Open source. + +Python 3 version. +%endif # with python3 + +%prep +%setup -q -n %{pypi_name}-%{version} +sed -ie '1d' %{pypi_name}/cli/chardetect.py + +%if %{with python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with python3 + +%build +%{__python2} setup.py build + +%if %{with python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with python3 + + +%install +# Do Python 3 first not to overwrite the entrypoint +%if %{with python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +mv $RPM_BUILD_ROOT%{_bindir}/{,python3-}chardetect +popd +%endif # with python3 + +%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +mv $RPM_BUILD_ROOT%{_bindir}/chardetect{,-%{python2_version}} +ln -s chardetect-%{python2_version} $RPM_BUILD_ROOT%{_bindir}/chardetect-2 + +%files -n python2-%{pypi_name} +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README.rst +%{python2_sitelib}/* +%{_bindir}/chardetect-2 +%{_bindir}/chardetect-%{python2_version} + +%if %{with python3} +%files -n python3-%{pypi_name} +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README.rst +%{python3_sitelib}/* +%{_bindir}/python3-chardetect +%endif # with python3 + + +%changelog +* Thu Apr 25 2019 Tomas Orsava - 3.0.4-10 +- Bumping due to problems with modular RPM upgrade path +- Resolves: rhbz#1695587 + +* Wed Aug 08 2018 Lumír Balhar - 3.0.4-9 +- Remove unversioned binaries from python2 subpackage +- Resolves: rhbz#1613343 + +* Tue Jul 31 2018 Lumír Balhar - 3.0.4-8 +- Switch python3 conditions to bcond + +* Mon Jul 16 2018 Lumír Balhar - 3.0.4-7 +- First version for python27 module