Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ligo-lw for openSUSE:Factory 
checked in at 2021-02-15 23:14:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ligo-lw (Old)
 and      /work/SRC/openSUSE:Factory/.python-ligo-lw.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ligo-lw"

Mon Feb 15 23:14:14 2021 rev:2 rq:871643 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ligo-lw/python-ligo-lw.changes    
2020-11-04 18:30:59.956333012 +0100
+++ /work/SRC/openSUSE:Factory/.python-ligo-lw.new.28504/python-ligo-lw.changes 
2021-02-15 23:16:35.747422287 +0100
@@ -1,0 +2,15 @@
+Sat Feb 13 00:27:21 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Skip python36 build: Due to NEP 29, python36-scipy in TW is no
+  more. Numpy and the lal packages follow
+
+-------------------------------------------------------------------
+Thu Jan 21 19:33:51 UTC 2021 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Fix up tests and binary installation to account for multiple
+  python versions.
+- Use mutibuild to split up main pkg building and tests since
+  tests require the binaries which are installed using
+  /etc/alternatives.
+
+-------------------------------------------------------------------

New:
----
  _multibuild

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

Other differences:
------------------
++++++ python-ligo-lw.spec ++++++
--- /var/tmp/diff_new_pack.BsyyXg/_old  2021-02-15 23:16:36.487423392 +0100
+++ /var/tmp/diff_new_pack.BsyyXg/_new  2021-02-15 23:16:36.491423398 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package python-ligo-lw
+# spec file for package python-ligo
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,31 @@
 #
 
 
-Name:           python-ligo-lw
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%bcond_without test
+%define psuffix -test
+# Tests known to fail on 32 bit due to fp precision
+ExcludeArch:    %{ix86}
+%else
+%bcond_with test
+%define psuffix %{nil}
+%endif
+
+# NEP29: TW does not have python36-scipy anymore, numpy and all lal packages 
follow
+%define         skip_python36 1
+
+%define bins ligolw_add ligolw_cut ligolw_no_ilwdchar ligolw_print 
ligolw_segments ligolw_sqlite
+%define srcname python-ligo-lw
+
+Name:           python-ligo-lw%{?psuffix}
 Version:        1.7.0
 Release:        0
 Summary:        Python LIGO Light-Weight XML I/O Library
 License:        GPL-3.0-only
 Group:          Development/Languages/Python
 URL:            https://git.ligo.org/kipp.cannon/python-ligo-lw
-Source:         
http://software.ligo.org/lscsoft/source/%{name}-%{version}.tar.gz
+Source:         
http://software.ligo.org/lscsoft/source/%{srcname}-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM ligo-lw-segments-test-fix.patch badshah...@gmail.com -- 
Fix a test that randomly fails due to dictionary ordering being undefined
 Patch0:         ligo-lw-segments-test-fix.patch
 BuildRequires:  %{python_module devel}
@@ -31,25 +48,31 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-PyYAML
-Requires:       python-glue
 Requires:       python-lal
 Requires:       python-ligo-segments
+Requires:       python-lscsoft-glue
 Requires:       python-python-dateutil
 Requires:       python-six
 Requires:       python-tqdm
 # SECTION Test requirements
+%if %{with test}
 BuildRequires:  %{python_module PyYAML}
-BuildRequires:  %{python_module glue}
 BuildRequires:  %{python_module lal}
+BuildRequires:  %{python_module ligo-lw = %{version}}
 BuildRequires:  %{python_module ligo-segments}
+BuildRequires:  %{python_module lscsoft-glue}
 BuildRequires:  %{python_module matplotlib}
+BuildRequires:  %{python_module numpy-devel}
 BuildRequires:  %{python_module python-dateutil}
 BuildRequires:  %{python_module six}
 BuildRequires:  %{python_module tqdm}
 BuildRequires:  diffutils
 BuildRequires:  libxml2-tools
 BuildRequires:  python3
+%endif
 # /SECTION
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 %python_subpackages
 
 %description
@@ -59,7 +82,7 @@
 format.
 
 %prep
-%setup -q
+%setup -q -n %{srcname}-%{version}
 %patch0 -p1
 # Replace distutils.core by setuptools to fix namespace errors
 # https://git.ligo.org/kipp.cannon/python-ligo-lw/-/issues/16
@@ -69,25 +92,42 @@
 %python_build
 
 %install
+%if %{without test}
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitearch}
 
-# Tests designed to work only for 64-bits
-%ifnarch %ix86
+%{lua: for c in string.gmatch(rpm.expand("%bins"), "%S+") do
+  print(rpm.expand("%python_clone -a %{buildroot}%{_bindir}/" .. c .. "\n"))
+end}
+%endif
+
 %check
-pushd test
-# Test-suite works only for python3
-export PYTHON=%{__python3}
+%if %{with test}
+# Test-suite works only for python3 flavors
+%{python_expand export PYTHON=$python
 export PYTHONDONTWRITEBYTECODE=1
-export PYTHONPATH=%{buildroot}%{python3_sitearch}
-export PATH+=:%{buildroot}%{_bindir}
+cp -r test test-%{$python_bin_suffix}
+pushd test-%{$python_bin_suffix}
 %make_build check
 popd
+}
 %endif
 
+%if %{without test}
+%post
+%python_install_alternative %bins
+
+%postun
+%python_uninstall_alternative %bins
+
 %files %{python_files}
 %license LICENSE
-%python3_only %{_bindir}/ligolw_*
-%{python_sitearch}/*
+%{lua: for c in string.gmatch(rpm.expand("%bins"), "%S+") do
+  print(rpm.expand("%python_alternative %{_bindir}/" .. c .. "\n"))
+end}
+%{python_sitearch}/ligo/
+%{python_sitearch}/python_ligo_lw-%{version}-py%{python_version}.egg-info/
+%{python_sitearch}/python_ligo_lw-%{version}-py%{python_version}-nspkg.pth
+%endif
 
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>test</package>
</multibuild>

Reply via email to