]> git.pld-linux.org Git - packages/python-pykickstart.git/blame - python-pykickstart.spec
rebuild with python 3.10
[packages/python-pykickstart.git] / python-pykickstart.spec
CommitLineData
e1aba57e
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
90aef8a5 6%define module pykickstart
e1aba57e
JB
7Summary: A Python 2 library for manipulating kickstart files
8Summary(pl.UTF-8): Biblioteka Pythona 2 do operowania na plikach kickstart
fe6e2ce5 9Name: python-%{module}
90aef8a5 10Version: 3.32
3cfd8ace 11Release: 2
fe6e2ce5
ER
12License: GPL v2
13Group: Libraries/Python
90aef8a5
JR
14Source0: https://github.com/pykickstart/pykickstart/archive/r%{version}/%{module}-%{version}.tar.gz
15# Source0-md5: 3dc66875645787f3b390d2cb55977c8c
e1aba57e 16URL: https://fedoraproject.org/wiki/pykickstart
6641341c 17BuildRequires: gettext-tools
fe6e2ce5 18BuildRequires: rpm-pythonprov
022d3c04 19BuildRequires: rpmbuild(macros) >= 1.710
e1aba57e
JB
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.7
22%endif
23%if %{with python3}
24BuildRequires: python3-devel >= 1:3.2
25%endif
fe6e2ce5
ER
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
e1aba57e
JB
29%define _duplicate_files_terminate_build 0
30
fe6e2ce5 31%description
e1aba57e
JB
32Pykickstart is a Python 2 and Python 3 library consisting of a data
33representation of kickstart files, a parser to read files into that
34representation, and a writer to generate kickstart files.
35
36%description -l pl.UTF-8
37Pykickstart to biblioteka Pythona 2 i Pythona 3, składająca się z
38reprezentacji danych plików kickstart, parsera do odczytu plików do
39tej reprezentacji oraz generatora plików kickstart.
40
41%package -n python3-%{module}
42Summary: A Python 3 library for manipulating kickstart files
43Summary(pl.UTF-8): Biblioteka Pythona 3 do operowania na plikach kickstart
44Group: Libraries/Python
45
46%description -n python3-%{module}
47Pykickstart is a Python 2 and Python 3 library consisting of a data
48representation of kickstart files, a parser to read files into that
49representation, and a writer to generate kickstart files.
50
51%description -n python3-%{module} -l pl.UTF-8
52Pykickstart to biblioteka Pythona 2 i Pythona 3, składająca się z
53reprezentacji danych plików kickstart, parsera do odczytu plików do
54tej reprezentacji oraz generatora plików kickstart.
fe6e2ce5
ER
55
56%prep
90aef8a5 57%setup -q -n %{module}-r%{version}
fe6e2ce5
ER
58
59%build
e1aba57e 60%if %{with python2}
05cdcc94 61%py_build
e1aba57e
JB
62%endif
63
64%if %{with python3}
65%py3_build
66%endif
67
fe6e2ce5
ER
68%{__make} -C po
69
70%install
71rm -rf $RPM_BUILD_ROOT
e1aba57e
JB
72
73%if %{with python2}
05cdcc94 74%py_install
fe6e2ce5 75
e1aba57e
JB
76%py_postclean
77%endif
78
79%if %{with python3}
80%py3_install
81%endif
82
fe6e2ce5 83%{__make} -C po install \
e1aba57e
JB
84 DESTDIR=$RPM_BUILD_ROOT \
85 INSTALL_NLS_DIR=$RPM_BUILD_ROOT%{_localedir}
fe6e2ce5 86
fe6e2ce5
ER
87%clean
88rm -rf $RPM_BUILD_ROOT
89
e1aba57e 90%if %{with python2}
90aef8a5 91%files
fe6e2ce5 92%defattr(644,root,root,755)
90aef8a5 93%doc README.rst docs/{kickstart-docs.rst,programmers-guide}
e1aba57e
JB
94%if 0
95# TODO: package as *-2 or in -tools package?
fe6e2ce5 96%attr(755,root,root) %{_bindir}/ksflatten
e1aba57e
JB
97%attr(755,root,root) %{_bindir}/ksshell
98%attr(755,root,root) %{_bindir}/ksvalidator
fe6e2ce5 99%attr(755,root,root) %{_bindir}/ksverdiff
e1aba57e
JB
100%{_mandir}/man1/ksflatten.1*
101%{_mandir}/man1/ksshell.1*
102%{_mandir}/man1/ksvalidator.1*
103%{_mandir}/man1/ksverdiff.1*
104%endif
105%{py_sitescriptdir}/pykickstart
fe6e2ce5 106%{py_sitescriptdir}/pykickstart-%{version}-*.egg-info
e1aba57e
JB
107%endif
108
109%if %{with python3}
90aef8a5 110%files -n python3-%{module}
e1aba57e 111%defattr(644,root,root,755)
90aef8a5 112%doc README.rst docs/{kickstart-docs.rst,programmers-guide}
e1aba57e
JB
113%attr(755,root,root) %{_bindir}/ksflatten
114%attr(755,root,root) %{_bindir}/ksshell
115%attr(755,root,root) %{_bindir}/ksvalidator
116%attr(755,root,root) %{_bindir}/ksverdiff
117%{_mandir}/man1/ksflatten.1*
118%{_mandir}/man1/ksshell.1*
119%{_mandir}/man1/ksvalidator.1*
120%{_mandir}/man1/ksverdiff.1*
121%{py3_sitescriptdir}/pykickstart
122%{py3_sitescriptdir}/pykickstart-%{version}-*.egg-info
123%endif
This page took 0.113393 seconds and 4 git commands to generate.