]> git.pld-linux.org Git - packages/python-chardet.git/blob - python-chardet.spec
a1a63a988b39c1e0ca6690ffe01c05656460946f
[packages/python-chardet.git] / python-chardet.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  chardet
7 Summary:        Character encoding auto-detection in Python 2
8 Summary(pl.UTF-8):      Automatyczne wykrywanie kodowania znaków w Pythonie 2
9 Name:           python-%{module}
10 Version:        3.0.4
11 Release:        2
12 License:        LGPL v2.1+
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz
15 # Source0-md5:  7dd1ba7f9c77e32351b0a0cfacf4055c
16 URL:            https://pypi.python.org/pypi/chardet
17 %if %{with python2}
18 BuildRequires:  python >= 1:2.6
19 BuildRequires:  python-devel >= 1:2.6
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3 >= 1:3.2
24 BuildRequires:  python3-devel >= 1:3.2
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 Requires:       python-modules >= 1:2.6
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Character encoding auto-detection in Python. As smart as your browser.
35
36 %description -l pl.UTF-8
37 Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
38 przeglądarce.
39
40 %package -n python3-chardet
41 Summary:        Character encoding auto-detection in Python 3
42 Summary(pl.UTF-8):      Automatyczne wykrywanie kodowania znaków w Pythonie 3
43 Group:          Libraries/Python
44 Requires:       python3-modules >= 1:3.2
45
46 %description -n python3-chardet
47 Character encoding auto-detection in Python. As smart as your browser.
48
49 %description -n python3-chardet -l pl.UTF-8
50 Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
51 przeglądarce.
52
53 %prep
54 %setup -q -n %{module}-%{version}
55
56 %build
57 %if %{with python2}
58 %py_build
59 %endif
60
61 %if %{with python3}
62 %py3_build
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %if %{with python3}
69 %py3_install
70 %endif
71
72 %if %{with python2}
73 %py_install
74
75 %py_postclean
76 %endif
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %files
83 %defattr(644,root,root,755)
84 %doc README.rst
85 %attr(755,root,root) %{_bindir}/chardetect
86 %{py_sitescriptdir}/chardet
87 %{py_sitescriptdir}/chardet-%{version}-py*.egg-info
88 %endif
89
90 %if %{with python3}
91 %files -n python3-chardet
92 %defattr(644,root,root,755)
93 %doc README.rst
94 %{py3_sitescriptdir}/chardet
95 %{py3_sitescriptdir}/chardet-%{version}-py*.egg-info
96 %endif
This page took 0.078504 seconds and 2 git commands to generate.