]> git.pld-linux.org Git - packages/python-polib.git/blame - python-polib.spec
rebuild with python 3.10
[packages/python-polib.git] / python-polib.spec
CommitLineData
27d9f0c1
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 polib
8%define egg_name polib
9%define pypi_name polib
10Summary: A library to parse and manage gettext catalogs
11Name: python-%{pypi_name}
12Version: 1.0.7
3a7c0b7a 13Release: 5
27d9f0c1
ER
14License: MIT
15Source0: http://bitbucket.org/izi/polib/get/%{version}.tar.gz
16# Source0-md5: 270110a7010425738e9a08832c5cba4f
17Group: Libraries/Python
18URL: http://bitbucket.org/izi/polib/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33polib allows you to manipulate, create, modify gettext files (pot, po
34and mo files). You can load existing files, iterate through it's
35entries, add, modify entries, comments or metadata, etc... or create
36new po files from scratch.
37
38polib provides a simple and pythonic API, exporting only three
39convenience functions 'pofile', 'mofile' and 'detect_encoding', and
40the 4 core classes: POFile, MOFile, POEntry and MOEntry for creating
41new files/entries.
42
43%package -n python3-%{pypi_name}
44Summary: A library to parse and manage gettext catalogs
45Group: Libraries/Python
46
47%description -n python3-%{pypi_name}
48polib allows you to manipulate, create, modify gettext files (pot, po
49and mo files). You can load existing files, iterate through it's
50entries, add, modify entries, comments or metadata, etc... or create
51new po files from scratch.
52
53polib provides a simple and pythonic API, exporting only three
54convenience functions 'pofile', 'mofile' and 'detect_encoding', and
55the 4 core classes: POFile, MOFile, POEntry and MOEntry for creating
56new files/entries.
57
58%prep
59%setup -qc
60mv izi-polib-d75ce6dbbc2a/* .
61
62%build
63%if %{with python2}
64%py_build %{?with_tests:test}
65%endif
66
67%if %{with python3}
68%py3_build %{?with_tests:test}
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73%if %{with python2}
74%py_install
75%py_postclean
76%endif
77
78%if %{with python3}
79%py3_install
80%endif
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%if %{with python2}
86%files
87%defattr(644,root,root,755)
88%doc README.rst LICENSE
89%{py_sitescriptdir}/%{module}.py[co]
90%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
91%endif
92
93%if %{with python3}
94%files -n python3-%{pypi_name}
95%defattr(644,root,root,755)
96%doc README.rst LICENSE
97%{py3_sitescriptdir}/%{module}.py
98%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.pyc
99%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
100%endif
This page took 0.082741 seconds and 4 git commands to generate.