]> git.pld-linux.org Git - packages/python-chardet.git/blame - python-chardet.spec
- rebuild with python 3.8
[packages/python-chardet.git] / python-chardet.spec
CommitLineData
06927072
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
6dd1601c
JB
5%bcond_without doc # Sphinx documentation
6%bcond_without tests # unit tets
764b2389 7
06927072
JB
8%define module chardet
9Summary: Character encoding auto-detection in Python 2
10Summary(pl.UTF-8): Automatyczne wykrywanie kodowania znaków w Pythonie 2
764b2389 11Name: python-%{module}
a323fe4f 12Version: 3.0.4
7f05efa7 13Release: 3
06927072 14License: LGPL v2.1+
035e1894 15Group: Libraries/Python
6dd1601c
JB
16#Source0Download: https://pypi.org/simple/chardet/
17Source0: https://files.pythonhosted.org/packages/source/c/chardet/%{module}-%{version}.tar.gz
a323fe4f 18# Source0-md5: 7dd1ba7f9c77e32351b0a0cfacf4055c
6dd1601c 19URL: https://pypi.org/project/chardet/
06927072
JB
20%if %{with python2}
21BuildRequires: python >= 1:2.6
22BuildRequires: python-devel >= 1:2.6
23BuildRequires: python-setuptools
6dd1601c
JB
24%if %{with tests}
25BuildRequires: python-hypothesis
26BuildRequires: python-pytest
27%endif
06927072
JB
28%endif
29%if %{with python3}
6dd1601c
JB
30BuildRequires: python3 >= 1:3.3
31BuildRequires: python3-devel >= 1:3.3
06927072 32BuildRequires: python3-setuptools
6dd1601c
JB
33%if %{with tests}
34BuildRequires: python3-hypothesis
35BuildRequires: python3-pytest
36%endif
37%endif
38%if %{with doc}
39BuildRequires: sphinx-pdg
06927072 40%endif
25c19e4a 41BuildRequires: rpm-pythonprov
06927072
JB
42BuildRequires: rpmbuild(macros) >= 1.714
43Requires: python-modules >= 1:2.6
da08e7be 44BuildArch: noarch
764b2389
JR
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
3d61b479 48Character encoding auto-detection in Python. As smart as your browser.
764b2389
JR
49
50%description -l pl.UTF-8
3d61b479 51Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
52przeglądarce.
764b2389 53
06927072
JB
54%package -n python3-chardet
55Summary: Character encoding auto-detection in Python 3
56Summary(pl.UTF-8): Automatyczne wykrywanie kodowania znaków w Pythonie 3
57Group: Libraries/Python
6dd1601c 58Requires: python3-modules >= 1:3.3
06927072
JB
59
60%description -n python3-chardet
61Character encoding auto-detection in Python. As smart as your browser.
62
63%description -n python3-chardet -l pl.UTF-8
64Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
65przeglądarce.
66
6dd1601c
JB
67%package apidocs
68Summary: API documentation for Python chardet module
69Summary(pl.UTF-8): Dokumentacja API modułu Pythona chardet
70Group: Documentation
71
72%description apidocs
73API documentation for Python chardet module.
74
75%description apidocs -l pl.UTF-8
76Dokumentacja API modułu Pythona chardet.
77
764b2389
JR
78%prep
79%setup -q -n %{module}-%{version}
80
81%build
06927072 82%if %{with python2}
6dd1601c 83%py_build %{?with_tests:test}
06927072
JB
84%endif
85
86%if %{with python3}
6dd1601c
JB
87%py3_build %{?with_tests:test}
88%endif
89
90%if %{with doc}
91PYTHONPATH=$(pwd) \
92%{__make} -C docs html
06927072 93%endif
764b2389
JR
94
95%install
96rm -rf $RPM_BUILD_ROOT
97
06927072
JB
98%if %{with python3}
99%py3_install
100%endif
101
102%if %{with python2}
89b49f7c 103%py_install
764b2389
JR
104
105%py_postclean
06927072 106%endif
764b2389
JR
107
108%clean
109rm -rf $RPM_BUILD_ROOT
110
06927072 111%if %{with python2}
764b2389
JR
112%files
113%defattr(644,root,root,755)
06927072 114%doc README.rst
e096522f 115%attr(755,root,root) %{_bindir}/chardetect
06927072
JB
116%{py_sitescriptdir}/chardet
117%{py_sitescriptdir}/chardet-%{version}-py*.egg-info
118%endif
119
120%if %{with python3}
121%files -n python3-chardet
122%defattr(644,root,root,755)
e096522f 123%doc README.rst
06927072
JB
124%{py3_sitescriptdir}/chardet
125%{py3_sitescriptdir}/chardet-%{version}-py*.egg-info
ddd2957e 126%endif
6dd1601c
JB
127
128%if %{with doc}
129%files apidocs
130%defattr(644,root,root,755)
131%doc docs/_build/html/{_modules,_static,api,*.html,*.js}
132%endif
This page took 0.097499 seconds and 4 git commands to generate.