]>
Commit | Line | Data |
---|---|---|
764b2389 JR |
1 | %define module chardet |
2 | ||
3 | Summary: Character encoding auto-detection in Python | |
3d61b479 | 4 | Summary(pl.UTF-8): Automatyczne wykrywanie kodowania znaków w Pythonie |
764b2389 | 5 | Name: python-%{module} |
e096522f | 6 | Version: 2.3.0 |
da08e7be | 7 | Release: 1 |
764b2389 | 8 | License: LGPL |
035e1894 | 9 | Group: Libraries/Python |
da08e7be | 10 | Source0: https://pypi.python.org/packages/source/c/chardet/%{module}-%{version}.tar.gz |
e096522f | 11 | # Source0-md5: 25274d664ccb5130adae08047416e1a8 |
da08e7be | 12 | URL: https://pypi.python.org/pypi/chardet |
ddd2957e MK |
13 | BuildRequires: python >= 1:2.4 |
14 | BuildRequires: python-devel >= 1:2.4 | |
25c19e4a JB |
15 | BuildRequires: rpm-pythonprov |
16 | BuildRequires: rpmbuild(macros) >= 1.219 | |
764b2389 | 17 | %pyrequires_eq python-modules |
da08e7be | 18 | BuildArch: noarch |
764b2389 JR |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
3d61b479 | 22 | Character encoding auto-detection in Python. As smart as your browser. |
764b2389 JR |
23 | |
24 | %description -l pl.UTF-8 | |
3d61b479 | 25 | Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w |
26 | przeglądarce. | |
764b2389 JR |
27 | |
28 | %prep | |
29 | %setup -q -n %{module}-%{version} | |
30 | ||
31 | %build | |
25c19e4a | 32 | %{__python} setup.py build |
764b2389 JR |
33 | |
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | ||
25c19e4a | 37 | %{__python} setup.py install \ |
764b2389 JR |
38 | --root=$RPM_BUILD_ROOT \ |
39 | --optimize=2 | |
40 | ||
41 | %py_postclean | |
42 | ||
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %files | |
47 | %defattr(644,root,root,755) | |
e096522f AM |
48 | %attr(755,root,root) %{_bindir}/chardetect |
49 | %doc README.rst | |
764b2389 JR |
50 | %dir %{py_sitescriptdir}/chardet |
51 | %{py_sitescriptdir}/chardet/*.py[co] | |
ddd2957e | 52 | %if "%{py_ver}" > "2.4" |
764b2389 | 53 | %{py_sitescriptdir}/*.egg-info |
ddd2957e | 54 | %endif |