[packages/python-langdetect] - updated to 1.0.9
qboosh
qboosh at pld-linux.org
Tue Jul 15 19:36:59 CEST 2025
commit 0975ab130df3ffa5b22be37ad9cdd49d71855da2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Jul 15 19:38:37 2025 +0200
- updated to 1.0.9
python-langdetect.spec | 63 ++++++++++++++++++++++++++++++++------------------
1 file changed, 41 insertions(+), 22 deletions(-)
---
diff --git a/python-langdetect.spec b/python-langdetect.spec
index 264b2fa..85bb006 100644
--- a/python-langdetect.spec
+++ b/python-langdetect.spec
@@ -1,65 +1,84 @@
#
# Conditional build:
-%bcond_without tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module langdetect
-%define egg_name langdetect
-%define pypi_name langdetect
Summary: Language detection library ported from Google's language-detection
-Name: python-%{pypi_name}
-Version: 1.0.7
-Release: 9
-License: ASL-2.0
+Summary(pl.UTF-8): Biblioteka wykrywania języka sportowana z language-detection Google'a
+Name: python-%{module}
+Version: 1.0.9
+Release: 1
+License: Apache v2.0
Group: Libraries/Python
-Source0: https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.zip
-# Source0-md5: 6675db2d8abccb97246372767270e912
+#Source0Download: https://pypi.org/simple/langdetect/
+Source0: https://files.pythonhosted.org/packages/source/l/langdetect/%{module}-%{version}.tar.gz
+# Source0-md5: 6569d39fc69c5b5104ca268ce1a0de51
URL: https://github.com/Mimino666/langdetect
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-devel
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
BuildRequires: python-six
%endif
%if %{with python3}
-BuildRequires: python3-devel
+BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
BuildRequires: python3-six
%endif
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Port of Google's language-detection library to Python.
-%package -n python3-%{pypi_name}
+%description -l pl.UTF-8
+Port biblioteki Google'a language-detection do Pythona.
+
+%package -n python3-%{module}
Summary: Language detection library ported from Google's language-detection
+Summary(pl.UTF-8): Biblioteka wykrywania języka sportowana z language-detection Google'a
Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
-%description -n python3-%{pypi_name}
+%description -n python3-%{module}
Port of Google's language-detection library to Python.
+%description -n python3-%{module} -l pl.UTF-8
+Port biblioteki Google'a language-detection do Pythona.
+
%prep
-%setup -q -n %{pypi_name}-%{version}
+%setup -q -n %{module}-%{version}
# Remove bundled egg-info
-%{__rm} -r %{egg_name}.egg-info
+%{__rm} -r %{module}.egg-info
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} -m unittest discover -s langdetect/tests
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest discover -s langdetect/tests
+%endif
%endif
%install
rm -rf $RPM_BUILD_ROOT
+
%if %{with python2}
%py_install
+
%py_postclean
%endif
@@ -73,15 +92,15 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.md
+%doc LICENSE NOTICE README.md
%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
%if %{with python3}
-%files -n python3-%{pypi_name}
+%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.md
+%doc LICENSE NOTICE README.md
%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-langdetect.git/commitdiff/0975ab130df3ffa5b22be37ad9cdd49d71855da2
More information about the pld-cvs-commit
mailing list