Accepting request 528682 from home:mcalmer:branches:devel:libraries:c_c++
- build python3 subpackage - use bcond_without OBS-URL: https://build.opensuse.org/request/show/528682 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/newt?expand=0&rev=36
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 24 13:04:01 UTC 2017 - mc@suse.com
|
||||
|
||||
- build python3 subpackage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 15:24:29 UTC 2017 - lars@linux-schulserver.de
|
||||
|
||||
|
||||
47
newt.spec
47
newt.spec
@@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1320
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%define libname lib%{name}
|
||||
%define libsoname %{libname}0_52
|
||||
Name: newt
|
||||
@@ -46,6 +52,9 @@ BuildRequires: texlive-helvetic
|
||||
BuildRequires: texlive-jadetex
|
||||
BuildRequires: texlive-times
|
||||
%endif
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
Newt is a programming library for color text-mode, widget-based user
|
||||
@@ -136,9 +145,21 @@ Obsoletes: %{name}-python < %{version}
|
||||
%py_requires
|
||||
|
||||
%description -n python-%{name}
|
||||
The newt-python package contains the Python bindings for the newt
|
||||
The python-newt package contains the Python bindings for the newt
|
||||
library providing a python API for creating text mode interfaces.
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{name}
|
||||
Summary: Python 3 bindings for newt
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{name}
|
||||
The python3-newt package contains the Python 3 bindings for the newt library
|
||||
providing a python API for creating text mode interfaces.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
@@ -149,9 +170,14 @@ library providing a python API for creating text mode interfaces.
|
||||
## make depend
|
||||
make CPPFLAGS="%{optflags} -fPIC" %{?_smp_mflags} all
|
||||
#docbook2txt tutorial.sgml
|
||||
chmod 0644 peanuts.py popcorn.py
|
||||
|
||||
%install
|
||||
make PYTHONVERS="python%{py_ver}" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
|
||||
pyversions="python%{py_ver}"
|
||||
%if %{with python3}
|
||||
pyversions="$pyversions python%{py3_ver}"
|
||||
%endif
|
||||
make PYTHONVERS="$pyversions" instroot=%{buildroot} DESTDIR=%{buildroot} install install-sh
|
||||
# currently we don't support these languages
|
||||
for lang in ast bal sr@latin wo; do
|
||||
rm -rf %{buildroot}%{_datadir}/locale/$lang
|
||||
@@ -175,6 +201,15 @@ rm tutorial.{aux,log,out} CATALOG.* *.dsl
|
||||
popd 1>/dev/null
|
||||
%find_lang %{name}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%py_compile %{buildroot}/%{python_sitearch}
|
||||
%py_compile -O %{buildroot}/%{python_sitearch}
|
||||
%if %{with python3}
|
||||
%py3_compile %{buildroot}/%{python3_sitearch}
|
||||
%py3_compile -O %{buildroot}/%{python3_sitearch}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post -n %{libsoname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{libsoname} -p /sbin/ldconfig
|
||||
@@ -215,4 +250,12 @@ popd 1>/dev/null
|
||||
%doc %{_defaultdocdir}/%{name}/examples/*.py
|
||||
%{py_sitedir}/*
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{name}
|
||||
%doc peanuts.py popcorn.py
|
||||
%{python3_sitearch}/*.so
|
||||
%{python3_sitearch}/*.py*
|
||||
%{python3_sitearch}/__pycache__/*.py*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user