# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-chardet
Version:        2.3.0
Release:        1%{?_dist_release}
Summary:        Character encoding auto-detection in Python
Summary(ja):    Python で文字エンコーディングを自動検出

Group:          Development/Languages
License:        LGPLv2
URL:            https://pypi.python.org/pypi/chardet
Source0:        https://pypi.python.org/packages/source/c/chardet/chardet-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildArch:      noarch
BuildRequires:  python-devel, python-setuptools

Vendor: Project Vine
Distribution: Vine Linux

%description
Character encoding auto-detection in Python. As 
smart as your browser. Open source.

%prep
%setup -q -n chardet-%{version}



%build
# Remove CFLAGS=... for noarch packages (unneeded)
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE
# For noarch packages: sitelib
%{_bindir}/chardetect
%{python_sitelib}/*


%changelog
* Wed May 06 2015 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.3.0-1
- new upstream release

* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.1-1
- new upstream release

* Sun Apr 28 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.1.1-1
- new upstream release
- changed Source0 and URL

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-4
- rebuild with python-2.7.2

* Wed Sep 29 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-3
- rebuilt with rpm-4.8.1 for pkg-config

* Sat Feb 6 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-2
- rebuilt with python-2.6.4

* Mon Nov 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-1
- new upstream release
- fixed Japanese summary

* Mon Sep 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.1-1
- initial build for VineSeed

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.0.1-1
- Initial release

