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