]> git.pld-linux.org Git - packages/python-charade.git/commitdiff
- pl
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 3 Oct 2014 14:54:31 +0000 (16:54 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 3 Oct 2014 14:54:31 +0000 (16:54 +0200)
- package charade binary

python-charade.spec

index 2deef2ac89c2fa2de4001cc2cfca12b47c29b79f..71858db801f922b128d7bec2d7dacbae3d82950b 100644 (file)
@@ -1,9 +1,11 @@
+#
 # Conditional build:
-%bcond_without  python2         # build python 2 module
-%bcond_without  python3         # build python 3 module
+%bcond_without python2 # build CPython 2.x module
+%bcond_without python3 # build CPython 3.x module
 #
 %define        module  charade
-Summary:       The Universal character encoding detector
+Summary:       Charade - The Universal character encoding detector for Python
+Summary(pl.UTF-8):     Charade - uniwersalny moduł Pythona wykrywający kodowanie znaków
 Name:          python-%{module}
 Version:       1.0.3
 Release:       1
@@ -16,7 +18,7 @@ URL:          https://github.com/sigmavirus24/charade
 BuildRequires: python-modules >= 1:2.6
 %endif
 %if %{with python3}
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.2
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
@@ -26,24 +28,39 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Charade: The Universal character encoding detector. This is a port of
-Mark Pilgrim's excellent chardet. Previous two versions needed to be
-maintained: one that supported python 2.x and one that supported
-python 3.x. With the minor amount of work placed into this port,
-charade now supports both in one codebase. The base for the work was
-Mark's last available copy of the chardet source for python 3000.
+Mark Pilgrim's excellent chardet, modified to share codebase for both
+Python 2.x and 3.x.
+
+This package contains module built for Python 2.x.
+
+%description -l pl.UTF-8
+Moduł Pythona Charade służy do automatycznego wykrywania kodowania
+znaków. Jest to port znakomitego modułu chardet Marka Pilgrima,
+zmodyfikowany pod kątem współdzielenia kodu między wersjami Pythona
+2.x oraz 3.x.
+
+Ten pakiet zawiera moduł zbudowany dla Pythona 2.x.
 
 %package -n python3-charade
-Summary:       The Universal character encoding detector
+Summary:       Charade - The Universal character encoding detector
+Summary(pl.UTF-8):     Charade - uniwersalny moduł Pythona wykrywający kodowanie znaków
 Group:         Development/Languages/Python
-Requires:      python3-modules
+Requires:      python3-modules >= 1:3.2
 
 %description -n python3-charade
 Charade: The Universal character encoding detector. This is a port of
-Mark Pilgrim's excellent chardet. Previous two versions needed to be
-maintained: one that supported python 2.x and one that supported
-python 3.x. With the minor amount of work placed into this port,
-charade now supports both in one codebase. The base for the work was
-Mark's last available copy of the chardet source for python 3000.
+Mark Pilgrim's excellent chardet, modified to share codebase for both
+Python 2.x and 3.x.
+
+This package contains module built for Python 3.x.
+
+%description -n python3-charade -l pl.UTF-8
+Moduł Pythona Charade służy do automatycznego wykrywania kodowania
+znaków. Jest to port znakomitego modułu chardet Marka Pilgrima,
+zmodyfikowany pod kątem współdzielenia kodu między wersjami Pythona
+2.x oraz 3.x.
+
+Ten pakiet zawiera moduł zbudowany dla Pythona 3.x.
 
 %prep
 %setup -q -n %{module}-%{version}
@@ -60,25 +77,27 @@ Mark's last available copy of the chardet source for python 3000.
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%{__python} setup.py \
-       build -b py2 \
+%if %{with python3}
+%{__python3} setup.py \
+       build -b py3 \
        install \
        --skip-build \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/charade{,3}
 %endif
 
-%if %{with python3}
-%{__python3} setup.py  \
-       build -b py3 \
+%if %{with python2}
+%{__python} setup.py \
+       build -b py2 \
        install \
        --skip-build \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_postclean
 %endif
 
 %clean
@@ -88,16 +107,16 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc HISTORY.rst README.rst
+%attr(755,root,root) %{_bindir}/charade
 %{py_sitescriptdir}/%{module}
-%if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
-%endif
 
 %if %{with python3}
 %files -n python3-charade
 %defattr(644,root,root,755)
 %doc HISTORY.rst README.rst
+%attr(755,root,root) %{_bindir}/charade3
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
This page took 0.083645 seconds and 4 git commands to generate.