[packages/python-charade] - pl - package charade binary
qboosh
qboosh at pld-linux.org
Fri Oct 3 16:54:33 CEST 2014
commit c6a13835c81d6f8f5aed56fbfb4a5cbe99a06aae
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Oct 3 16:54:31 2014 +0200
- pl
- package charade binary
python-charade.spec | 73 +++++++++++++++++++++++++++++++++--------------------
1 file changed, 46 insertions(+), 27 deletions(-)
---
diff --git a/python-charade.spec b/python-charade.spec
index 2deef2a..71858db 100644
--- a/python-charade.spec
+++ b/python-charade.spec
@@ -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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-charade.git/commitdiff/c6a13835c81d6f8f5aed56fbfb4a5cbe99a06aae
More information about the pld-cvs-commit
mailing list