]> git.pld-linux.org Git - packages/python-charade.git/blob - python-charade.spec
rebuild with tests and docs
[packages/python-charade.git] / python-charade.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # build CPython 2.x module
4 %bcond_without  python3 # build CPython 3.x module
5 #
6 %define         module  charade
7 Summary:        Charade - The Universal character encoding detector for Python
8 Summary(pl.UTF-8):      Charade - uniwersalny moduł Pythona wykrywający kodowanie znaków
9 Name:           python-%{module}
10 Version:        1.0.3
11 Release:        12
12 License:        LGPL v2.1+
13 Group:          Development/Languages/Python
14 Source0:        https://pypi.python.org/packages/source/c/charade/%{module}-%{version}.tar.gz
15 # Source0-md5:  79ac701a147705c09bdce31b79dfa12e
16 URL:            https://github.com/sigmavirus24/charade
17 %if %{with python2}
18 BuildRequires:  python-modules >= 1:2.6
19 %endif
20 %if %{with python3}
21 BuildRequires:  python3-modules >= 1:3.2
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.710
25 Requires:       python-modules >= 1:2.6
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Charade: The Universal character encoding detector. This is a port of
31 Mark Pilgrim's excellent chardet, modified to share codebase for both
32 Python 2.x and 3.x.
33
34 This package contains module built for Python 2.x.
35
36 %description -l pl.UTF-8
37 Moduł Pythona Charade służy do automatycznego wykrywania kodowania
38 znaków. Jest to port znakomitego modułu chardet Marka Pilgrima,
39 zmodyfikowany pod kątem współdzielenia kodu między wersjami Pythona
40 2.x oraz 3.x.
41
42 Ten pakiet zawiera moduł zbudowany dla Pythona 2.x.
43
44 %package -n python3-charade
45 Summary:        Charade - The Universal character encoding detector
46 Summary(pl.UTF-8):      Charade - uniwersalny moduł Pythona wykrywający kodowanie znaków
47 Group:          Development/Languages/Python
48 Requires:       python3-modules >= 1:3.2
49
50 %description -n python3-charade
51 Charade: The Universal character encoding detector. This is a port of
52 Mark Pilgrim's excellent chardet, modified to share codebase for both
53 Python 2.x and 3.x.
54
55 This package contains module built for Python 3.x.
56
57 %description -n python3-charade -l pl.UTF-8
58 Moduł Pythona Charade służy do automatycznego wykrywania kodowania
59 znaków. Jest to port znakomitego modułu chardet Marka Pilgrima,
60 zmodyfikowany pod kątem współdzielenia kodu między wersjami Pythona
61 2.x oraz 3.x.
62
63 Ten pakiet zawiera moduł zbudowany dla Pythona 3.x.
64
65 %prep
66 %setup -q -n %{module}-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71 %endif
72
73 %if %{with python3}
74 %py3_build
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %if %{with python3}
81 %py3_install
82
83 %{__mv} $RPM_BUILD_ROOT%{_bindir}/charade{,3}
84 %endif
85
86 %if %{with python2}
87 %py_install
88 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
89 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
90 %py_postclean
91 %endif
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %files
98 %defattr(644,root,root,755)
99 %doc HISTORY.rst README.rst
100 %attr(755,root,root) %{_bindir}/charade
101 %{py_sitescriptdir}/%{module}
102 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-charade
107 %defattr(644,root,root,755)
108 %doc HISTORY.rst README.rst
109 %attr(755,root,root) %{_bindir}/charade3
110 %{py3_sitescriptdir}/%{module}
111 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
112 %endif
This page took 0.055446 seconds and 3 git commands to generate.