]> git.pld-linux.org Git - packages/python-langdetect.git/blame - python-langdetect.spec
rebuild with python 3.10
[packages/python-langdetect.git] / python-langdetect.spec
CommitLineData
d9afd364
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module langdetect
8%define egg_name langdetect
9%define pypi_name langdetect
10Summary: Language detection library ported from Google's language-detection
11Name: python-%{pypi_name}
12Version: 1.0.7
0b3a9bb6 13Release: 5
d9afd364
ER
14License: ASL-2.0
15Group: Libraries/Python
16Source0: https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.zip
17# Source0-md5: 6675db2d8abccb97246372767270e912
18URL: https://github.com/Mimino666/langdetect
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-setuptools
24BuildRequires: python-six
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28BuildRequires: python3-setuptools
29BuildRequires: python3-six
30%endif
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
ea4ad5db 35Port of Google's language-detection library to Python.
d9afd364
ER
36
37%package -n python3-%{pypi_name}
38Summary: Language detection library ported from Google's language-detection
39Group: Libraries/Python
40
41%description -n python3-%{pypi_name}
ea4ad5db 42Port of Google's language-detection library to Python.
d9afd364
ER
43
44%prep
45%setup -q -n %{pypi_name}-%{version}
46
47# Remove bundled egg-info
48%{__rm} -r %{egg_name}.egg-info
49
50%build
51%if %{with python2}
52%py_build %{?with_tests:test}
53%endif
54
55%if %{with python3}
56%py3_build %{?with_tests:test}
57%endif
58
59%install
60rm -rf $RPM_BUILD_ROOT
61%if %{with python2}
62%py_install
63%py_postclean
64%endif
65
66%if %{with python3}
67%py3_install
68%endif
69
70%clean
71rm -rf $RPM_BUILD_ROOT
72
73%if %{with python2}
74%files
75%defattr(644,root,root,755)
76%doc README.md
77%{py_sitescriptdir}/%{module}
78%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
79%endif
80
81%if %{with python3}
82%files -n python3-%{pypi_name}
83%defattr(644,root,root,755)
84%doc README.md
85%{py3_sitescriptdir}/%{module}
86%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87%endif
This page took 0.079369 seconds and 4 git commands to generate.