]> git.pld-linux.org Git - packages/python-configshell-fb.git/blame - python-configshell-fb.spec
rebuild with python 3.10
[packages/python-configshell-fb.git] / python-configshell-fb.spec
CommitLineData
1607ef5a
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module configshell
fa9c33db
JB
7Summary: ConfigShell - Python 2 library for building configuration shells
8Summary(pl.UTF-8): ConfigShell - biblioteka Pythona 2 do tworzenia powłok konfiguracyjnych
1607ef5a 9Name: python-configshell-fb
ca8180a0 10Version: 1.1.fb25
acc6e9c6 11Release: 5
1607ef5a
JK
12License: Apache v2.0
13Group: Libraries/Python
c247c50f
JB
14#Source0Download: https://github.com/open-iscsi/configshell-fb/releases
15Source0: https://github.com/open-iscsi/configshell-fb/archive/v%{version}/configshell-fb-%{version}.tar.gz
ca8180a0 16# Source0-md5: e4d5394815712f661c04917a429f3e06
c247c50f 17URL: https://github.com/open-iscsi/configshell-fb
1607ef5a 18BuildRequires: rpm-pythonprov
fa9c33db 19BuildRequires: rpmbuild(macros) >= 1.714
1607ef5a 20BuildRequires: sed >= 4.0
fa9c33db 21%if %{with python2}
c247c50f 22BuildRequires: python-modules >= 1:2.4
fa9c33db
JB
23BuildRequires: python-setuptools
24%endif
1607ef5a 25%if %{with python3}
c247c50f 26BuildRequires: python3-modules >= 1:3.2
fa9c33db 27BuildRequires: python3-setuptools
1607ef5a 28%endif
c247c50f 29Requires: python-modules >= 1:2.4
1607ef5a 30Requires: python-pyparsing
c247c50f 31Requires: python-urwid
1607ef5a
JK
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36configshell-fb is a Python library that provides a framework for
37building simple but nice CLI-based applications.
38
fa9c33db
JB
39%description -l pl.UTF-8
40configshell-fb to biblioteka Pythona udostępniająca szkielet do
41tworzenia prostych, ale ładnych aplikacji opartych na linii poleceń.
42
1607ef5a 43%package -n python3-configshell-fb
fa9c33db
JB
44Summary: ConfigShell - Python 3 library for building configuration shells
45Summary(pl.UTF-8): ConfigShell - biblioteka Pythona 3 do tworzenia powłok konfiguracyjnych
1607ef5a 46Group: Libraries/Python
fa9c33db 47Requires: python3-modules
1607ef5a 48Requires: python3-pyparsing
c247c50f 49Requires: python3-urwid
1607ef5a
JK
50
51%description -n python3-configshell-fb
52configshell-fb is a Python library that provides a framework for
53building simple but nice CLI-based applications.
54
fa9c33db
JB
55%description -n python3-configshell-fb -l pl.UTF-8
56configshell-fb to biblioteka Pythona udostępniająca szkielet do
57tworzenia prostych, ale ładnych aplikacji opartych na linii poleceń.
58
1607ef5a
JK
59%prep
60%setup -q -n configshell-fb-%{version}
61
62%build
63%if %{with python2}
76d2cac1 64%py_build %{?with_tests:test}
1607ef5a
JK
65%endif
66
67%if %{with python3}
76d2cac1 68%py3_build %{?with_tests:test}
1607ef5a
JK
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
76d2cac1 75%py_install
1607ef5a
JK
76
77%py_postclean
78%endif
79
80%if %{with python3}
76d2cac1 81%py3_install
1607ef5a
JK
82%endif
83
84%if %{with python2}
85install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
b44e7e0e 87%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/myshell
1607ef5a
JK
88%endif
89%if %{with python3}
90install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-configshell-fb-%{version}
91cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-configshell-fb-%{version}
b44e7e0e 92%{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-configshell-fb-%{version}/myshell
1607ef5a
JK
93sed -i '1s|^#!.*python\b|#!%{__python3}|' $RPM_BUILD_ROOT%{_examplesdir}/python3-configshell-fb-%{version}/*
94%endif
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%if %{with python2}
100%files
101%defattr(644,root,root,755)
102%doc README.md
c247c50f
JB
103%{py_sitescriptdir}/configshell
104%{py_sitescriptdir}/configshell_fb
1607ef5a 105%if "%{py_ver}" > "2.4"
c247c50f 106%{py_sitescriptdir}/configshell_fb-*-py*.egg-info
1607ef5a 107%endif
1607ef5a
JK
108%dir %{_examplesdir}/%{name}-%{version}
109%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/myshell
fa9c33db 110%endif
1607ef5a
JK
111
112%if %{with python3}
113%files -n python3-configshell-fb
114%defattr(644,root,root,755)
115%doc README.md
c247c50f
JB
116%{py3_sitescriptdir}/configshell
117%{py3_sitescriptdir}/configshell_fb
1607ef5a 118%{py3_sitescriptdir}/configshell_fb-*-py*.egg-info
1607ef5a
JK
119%dir %{_examplesdir}/python3-configshell-fb-%{version}
120%attr(755,root,root) %{_examplesdir}/python3-configshell-fb-%{version}/myshell
fa9c33db 121%endif
This page took 0.116674 seconds and 4 git commands to generate.