Package init
This commit is contained in:
commit
bcbbeee616
BIN
3.0.4.tar.gz
Normal file
BIN
3.0.4.tar.gz
Normal file
Binary file not shown.
67
python-chardet.spec
Normal file
67
python-chardet.spec
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
Name: python-chardet
|
||||||
|
Version: 3.0.4
|
||||||
|
Release: 8
|
||||||
|
Summary: Python 2/3 compatible character encoding detector.
|
||||||
|
License: LGPL-2.1
|
||||||
|
URL: https://github.com/chardet/chardet
|
||||||
|
Source0: https://github.com/chardet/chardet/archive/3.0.4.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: python2-devel, python2-setuptools
|
||||||
|
BuildRequires: python3-devel, python3-setuptools
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is a continuation of Mark Pilgrim's excellent chardet. Previously,
|
||||||
|
two versions needed to be maintained: one that supported python 2.x
|
||||||
|
and one that supported python 3.x. We've recently merged with
|
||||||
|
Ian Cordasco's charade fork, so now we have one coherent version that
|
||||||
|
works for Python 2.7+ and 3.4+.
|
||||||
|
|
||||||
|
%package -n python2-chardet
|
||||||
|
Summary: Python 2/3 compatible character encoding detector.
|
||||||
|
%{?python_provide:%python_provide python2-chardet}
|
||||||
|
|
||||||
|
%description -n python2-chardet
|
||||||
|
Python 2/3 compatible character encoding detector,Python 2 version.
|
||||||
|
|
||||||
|
%package -n python3-chardet
|
||||||
|
Summary: Python 2/3 compatible character encoding detector.
|
||||||
|
|
||||||
|
%description -n python3-chardet
|
||||||
|
Python 2/3 compatible character encoding detector,Python 3 version.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n chardet-3.0.4
|
||||||
|
sed -ie '1d' chardet/cli/chardetect.py
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__python2} setup.py build
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
|
||||||
|
%install
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
mv %{buildroot}%{_bindir}/{,python3-}chardetect
|
||||||
|
popd
|
||||||
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
%files -n python2-chardet
|
||||||
|
%doc README.rst
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/chardetect
|
||||||
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
|
%files -n python3-chardet
|
||||||
|
%doc README.rst
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/python3-chardetect
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Sep 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.0.4-8
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user