Hello community,

here is the log from the commit of package newt for openSUSE:Factory checked in 
at 2017-09-29 11:48:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/newt (Old)
 and      /work/SRC/openSUSE:Factory/.newt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "newt"

Fri Sep 29 11:48:53 2017 rev:41 rq:528738 version:0.52.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/newt/newt.changes        2017-07-10 
11:01:06.633455807 +0200
+++ /work/SRC/openSUSE:Factory/.newt.new/newt.changes   2017-09-29 
11:48:54.669588306 +0200
@@ -1,0 +2,5 @@
+Sun Sep 24 13:04:01 UTC 2017 - [email protected]
+
+- build python3 subpackage
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ newt.spec ++++++
--- /var/tmp/diff_new_pack.mRgLGm/_old  2017-09-29 11:48:55.933410082 +0200
+++ /var/tmp/diff_new_pack.mRgLGm/_new  2017-09-29 11:48:55.933410082 +0200
@@ -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-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 @@
 %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 @@
 ## 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 @@
 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 @@
 %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


Reply via email to