| 1 | %global pypi_name chardet |
|---|
| 2 | |
|---|
| 3 | Name: python-chardet |
|---|
| 4 | Version: 3.0.4 |
|---|
| 5 | Release: 2%{?_dist_release} |
|---|
| 6 | Summary: Character encoding auto-detection in Python |
|---|
| 7 | Summary(ja): Python で文字エンコーディングを自動検出 |
|---|
| 8 | Group: programming |
|---|
| 9 | Vendor: Project Vine |
|---|
| 10 | Distribution: Vine Linux |
|---|
| 11 | |
|---|
| 12 | License: LGPLv2 |
|---|
| 13 | URL: https://pypi.python.org/pypi/chardet |
|---|
| 14 | Source0: https://pypi.python.org/packages/source/c/chardet/chardet-%{version}.tar.gz |
|---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 16 | |
|---|
| 17 | BuildArch: noarch |
|---|
| 18 | BuildRequires: python-rpm-macros |
|---|
| 19 | BuildRequires: python-devel, python-setuptools, python2-rpm-macros |
|---|
| 20 | BuildRequires: python3-devel, python3-setuptools, python3-rpm-macros |
|---|
| 21 | |
|---|
| 22 | %description |
|---|
| 23 | Character encoding auto-detection in Python. As |
|---|
| 24 | smart as your browser. Open source. |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | %package -n python3-%{pypi_name} |
|---|
| 28 | Summary: Character encoding auto-detection in Python 3 |
|---|
| 29 | Summary(ja): Python で文字エンコーディングを自動検出 |
|---|
| 30 | Group: programming |
|---|
| 31 | |
|---|
| 32 | %description -n python3-%{pypi_name} |
|---|
| 33 | Character encoding auto-detection in Python. As |
|---|
| 34 | smart as your browser. Open source. |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | %prep |
|---|
| 38 | %setup -q -n chardet-%{version} |
|---|
| 39 | sed -ie '1d' %{pypi_name}/cli/chardetect.py |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | %build |
|---|
| 43 | %py2_build |
|---|
| 44 | %py3_build |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | %install |
|---|
| 48 | rm -rf $RPM_BUILD_ROOT |
|---|
| 49 | %py2_install |
|---|
| 50 | mv $RPM_BUILD_ROOT%{_bindir}/{,python2-}chardetect |
|---|
| 51 | %py3_install |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | %clean |
|---|
| 55 | rm -rf $RPM_BUILD_ROOT |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | %files |
|---|
| 59 | %defattr(-,root,root,-) |
|---|
| 60 | %{!?_licensedir:%global license %%doc} |
|---|
| 61 | %license LICENSE |
|---|
| 62 | %doc README.rst |
|---|
| 63 | # For noarch packages: sitelib |
|---|
| 64 | %{_bindir}/python2-chardetect |
|---|
| 65 | %{python_sitelib}/* |
|---|
| 66 | |
|---|
| 67 | %files -n python3-%{pypi_name} |
|---|
| 68 | %{!?_licensedir:%global license %%doc} |
|---|
| 69 | %license LICENSE |
|---|
| 70 | %doc README.rst |
|---|
| 71 | %{python3_sitelib}/* |
|---|
| 72 | %{_bindir}/chardetect |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | %changelog |
|---|
| 76 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.4-2 |
|---|
| 77 | - rebuilt with python-3.8. |
|---|
| 78 | |
|---|
| 79 | * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.4-1 |
|---|
| 80 | - new upstream release. |
|---|
| 81 | - added python3 support. |
|---|
| 82 | |
|---|
| 83 | * Wed May 06 2015 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.3.0-1 |
|---|
| 84 | - new upstream release |
|---|
| 85 | |
|---|
| 86 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.1-1 |
|---|
| 87 | - new upstream release |
|---|
| 88 | |
|---|
| 89 | * Sun Apr 28 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.1.1-1 |
|---|
| 90 | - new upstream release |
|---|
| 91 | - changed Source0 and URL |
|---|
| 92 | |
|---|
| 93 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-4 |
|---|
| 94 | - rebuild with python-2.7.2 |
|---|
| 95 | |
|---|
| 96 | * Wed Sep 29 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-3 |
|---|
| 97 | - rebuilt with rpm-4.8.1 for pkg-config |
|---|
| 98 | |
|---|
| 99 | * Sat Feb 6 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-2 |
|---|
| 100 | - rebuilt with python-2.6.4 |
|---|
| 101 | |
|---|
| 102 | * Mon Nov 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.0.1-1 |
|---|
| 103 | - new upstream release |
|---|
| 104 | - fixed Japanese summary |
|---|
| 105 | |
|---|
| 106 | * Mon Sep 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.0.1-1 |
|---|
| 107 | - initial build for VineSeed |
|---|
| 108 | |
|---|
| 109 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2 |
|---|
| 110 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
|---|
| 111 | |
|---|
| 112 | * Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.0.1-1 |
|---|
| 113 | - Initial release |
|---|
| 114 | |
|---|