Hello community,

here is the log from the commit of package meson for openSUSE:Factory checked 
in at 2019-01-28 20:46:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/meson (Old)
 and      /work/SRC/openSUSE:Factory/.meson.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "meson"

Mon Jan 28 20:46:17 2019 rev:39 rq:666689 version:0.49.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/meson/meson.changes      2018-12-10 
12:25:21.646705374 +0100
+++ /work/SRC/openSUSE:Factory/.meson.new.28833/meson.changes   2019-01-28 
20:46:20.994037451 +0100
@@ -1,0 +2,55 @@
+Thu Jan 17 11:57:17 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Switch to distutils build and properly create egg-info
+
+-------------------------------------------------------------------
+Wed Jan 16 11:20:15 UTC 2019 - Dominique Leuenberger <[email protected]>
+
+- Add meson-no-lrelease.patch: Don't require lrelease for qt.
+
+-------------------------------------------------------------------
+Wed Jan  9 14:00:46 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Remove succeeding supposed failing gtest test that checks
+  gtest version, openSUSE ships the .pc file with the actual
+  informations
+
+-------------------------------------------------------------------
+Wed Jan  9 13:24:56 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Make sure the tests stop on the failure and output the failing
+  test at the end for easier digging
+
+-------------------------------------------------------------------
+Wed Jan  9 12:47:37 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Make the setuptools conditional so I can quickly switch around
+  and verify things
+
+-------------------------------------------------------------------
+Wed Jan  9 09:19:05 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Switch the package to use _multibuild rather than multiple
+  spec files
+
+-------------------------------------------------------------------
+Tue Jan  8 14:06:25 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Use distutils to build/run rather than setuptools to reduce
+  buildcycle
+- Add patch to be able to build and install using distutils instead
+  of full setuptools:
+  * meson-distutils.patch
+
+-------------------------------------------------------------------
+Tue Dec 11 06:02:55 UTC 2018 - [email protected]
+
+- Update to version 0.49.0:
+  * See https://mesonbuild.com/Release-notes-for-0-49-0.html
+- Rebase meson-test-installed-bin.patch.
+- Rebase meson-suse-fix-llvm-3.8.patch,
+  meson-restore-python3.4.patch.
+- Add more testsuite dependencies: clang, java-headless,
+  mono(csharp), wxWidgets-any-devel.
+
+-------------------------------------------------------------------

Old:
----
  meson-0.48.2.tar.gz
  meson-0.48.2.tar.gz.asc
  meson-testsuite.changes
  meson-testsuite.spec
  pre_checkin.sh

New:
----
  _multibuild
  meson-0.49.0.tar.gz
  meson-0.49.0.tar.gz.asc
  meson-distutils.patch
  meson-no-lrelease.patch

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

Other differences:
------------------
++++++ meson.spec ++++++
--- /var/tmp/diff_new_pack.2OYq1I/_old  2019-01-28 20:46:21.954036440 +0100
+++ /var/tmp/diff_new_pack.2OYq1I/_new  2019-01-28 20:46:21.974036419 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package meson-testsuite
+# spec file for package meson
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,19 @@
 #
 
 
-%define testsuite 0
-%if %{testsuite}
-%define name_ext -testsuite
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define name_ext -test
+%bcond_without test
 %else
 %define name_ext %{nil}
+%bcond_with test
 %endif
 %define _name   mesonbuild
+%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
+%bcond_with setuptools
 Name:           meson%{name_ext}
-Version:        0.48.2
+Version:        0.49.0
 Release:        0
 Summary:        Python-based build system
 License:        Apache-2.0
@@ -37,18 +41,33 @@
 Patch0:         meson-suse-ify-macros.patch
 # PATCH-FIX-OPENSUSE meson-test-installed-bin.patch [email protected] -- We 
want the test suite to run against /usr/bin/meson coming from our meson package.
 Patch1:         meson-test-installed-bin.patch
-# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
-Patch2:         meson-suse-fix-llvm-3.8.patch
 # PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 
support (reverts commit 0538009).
-Patch3:         meson-restore-python3.4.patch
+Patch2:         meson-restore-python3.4.patch
+# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
+Patch3:         meson-suse-fix-llvm-3.8.patch
 # PATCH-FIX-OPENSUSE meson-fix-gcc48.patch [email protected] -- Fix GCC 4.8 
handling for openSUSE Leap 42.x.
 Patch4:         meson-fix-gcc48.patch
-
+# PATCH-FEATURE-OPENSUSE meson-distutils.patch [email protected] -- build and 
install using distutils instead of full setuptools
+Patch5:         meson-distutils.patch
+# PATCH-FIX-UPSTREAM meson-no-lrelease.patch [email protected] -- Don't 
require lrelease for qt
+Patch6:         meson-no-lrelease.patch
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 BuildRequires:  python3-base
-BuildRequires:  python3-setuptools
 BuildArch:      noarch
-%if %{testsuite}
+%if %{with setuptools}
+BuildRequires:  python3-setuptools
+Requires:       python3-setuptools
+%endif
+%if !%{with test}
+Requires:       ninja
+Requires:       python3-base
+# meson-gui was last used in openSUSE Leap 42.1.
+Provides:       meson-gui = %{version}
+Obsoletes:      meson-gui < %{version}
+%else
 BuildRequires:  bison
+BuildRequires:  clang
 BuildRequires:  cups-devel
 BuildRequires:  flex
 BuildRequires:  gcc-c++
@@ -59,21 +78,18 @@
 BuildRequires:  git
 BuildRequires:  gnustep-make
 BuildRequires:  googletest-devel
-BuildRequires:  gtk-doc
 BuildRequires:  itstool
 BuildRequires:  libjpeg-devel
 BuildRequires:  libpcap-devel
+BuildRequires:  libqt5-qtbase-common-devel
 BuildRequires:  libqt5-qtbase-private-headers-devel
 BuildRequires:  libwmf-devel
 BuildRequires:  llvm-devel
 BuildRequires:  meson = %{version}
-BuildRequires:  ncurses-devel
 BuildRequires:  ninja
 BuildRequires:  pkgconfig
-BuildRequires:  python3-devel >= 3.4
+BuildRequires:  python2-devel
 BuildRequires:  python3-gobject
-BuildRequires:  vala
-BuildRequires:  vulkan-devel
 BuildRequires:  zlib-devel-static
 BuildRequires:  cmake(Qt5Core)
 BuildRequires:  cmake(Qt5Gui)
@@ -82,25 +98,31 @@
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gobject-introspection-1.0)
 BuildRequires:  pkgconfig(gtk+-3.0)
+BuildRequires:  pkgconfig(gtk-doc)
+BuildRequires:  pkgconfig(ncurses)
+BuildRequires:  pkgconfig(python3) >= 3.4
 BuildRequires:  pkgconfig(sdl2)
+BuildRequires:  pkgconfig(vapigen)
+BuildRequires:  pkgconfig(vulkan)
 BuildRequires:  pkgconfig(zlib)
 %if 0%{?suse_version} >= 1500
+BuildRequires:  java-headless
 BuildRequires:  libboost_log-devel
 BuildRequires:  libboost_system-devel
 BuildRequires:  libboost_test-devel
 BuildRequires:  libboost_thread-devel
 BuildRequires:  rust
 BuildRequires:  rust-std
+BuildRequires:  wxWidgets-any-devel
+# csharp is not on s390 machines
+%ifnarch s390x
+BuildRequires:  mono(csharp)
+%endif
 %else
 BuildRequires:  boost-devel
+BuildRequires:  mono-core
+BuildRequires:  wxWidgets-devel
 %endif
-%else
-Requires:       ninja
-Requires:       python3-setuptools
-Requires:       python3-xml
-# meson-gui was last used in openSUSE Leap 42.1.
-Provides:       meson-gui = %{version}
-Obsoletes:      meson-gui < %{version}
 %endif
 
 %description
@@ -112,7 +134,6 @@
 Domain Specific Language.
 
 %package vim
-%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
 Summary:        Vim support for meson.build files
 Group:          Productivity/Text/Editors
 Requires:       vim
@@ -138,8 +159,12 @@
 %patch3 -p1
 %patch4 -p1
 %endif
+%if !%{with setuptools}
+%patch5 -p1
+%endif
+%patch6 -p1
 
-# Remove static boost tests from test cases/frameworks/1 boost (can't use 
patch due to spaces in dirname)
+# Remove static boost tests from "test cases/frameworks/1 boost/".
 sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build
 
 # Disable test of llvm-static libs: openSUSE does not package/ship them
@@ -155,44 +180,61 @@
 # Remove hashbang from non-exec script
 sed -i '1{/\/usr\/bin\/env/d;}' ./mesonbuild/rewriter.py
 
+# remove gtest check that actually works because our gtest has .pc files
+rm -rf test\ cases/failing/85\ gtest\ dependency\ with\ version
+
 %build
-# If this is the test suite, we don't need anything else but the meson package
-%if !%{testsuite}
-python3 setup.py build
+%if !%{with test}
+%python3_build
 %else
+# FIXME: you should use %%meson macros
 # Ensure we have no mesonbuild / meson in CWD, thus guaranteeing we use meson 
in $PATH
-rm -rf meson.py mesonbuild
+rm -r meson.py mesonbuild
 %endif
 
 %install
 # If this is the test suite, we don't need anything else but the meson package
-%if ! %{testsuite}
-python3 setup.py install \
-  --root=%{buildroot} --prefix=%{_prefix}
+%if !%{with test}
+%python3_install
+%fdupes %{buildroot}%{python3_sitelib}
 
 install -Dpm 0644 data/macros.meson \
   %{buildroot}%{_rpmconfigdir}/macros.d/macros.meson
 
 install -Dpm 0644 data/syntax-highlighting/vim/ftdetect/meson.vim \
-  -t %{buildroot}%{vim_data_dir}/site/ftdetect
+  -t %{buildroot}%{vim_data_dir}/site/ftdetect/
 install -Dpm 0644 data/syntax-highlighting/vim/indent/meson.vim \
-  -t %{buildroot}%{vim_data_dir}/site/indent
+  -t %{buildroot}%{vim_data_dir}/site/indent/
 install -Dpm 0644 data/syntax-highlighting/vim/syntax/meson.vim \
-  -t %{buildroot}%{vim_data_dir}/site/syntax
+  -t %{buildroot}%{vim_data_dir}/site/syntax/
+
+# entry points are not distutils-able
+%if !%{with setuptools}
+mkdir -p %{buildroot}%{_bindir}
+echo """#!%{_bindir}/python3
+import sys
+
+from mesonbuild.mesonmain import main
+sys.exit(main())
+""" > %{buildroot}%{_bindir}/%{name}
+chmod +x %{buildroot}%{_bindir}/%{name}
+
+# ensure egg-info is a directory
+rm %{buildroot}%{python3_sitelib}/*.egg-info
+cp -r meson.egg-info 
%{buildroot}%{python3_sitelib}/meson-%{version}-py%{python3_version}.egg-info
+%endif
 %endif
 
-%if %{testsuite}
+%if %{with test}
 %check
 export LANG=C.UTF-8
 export MESON_EXE=%{_bindir}/meson
-export MESON_PRINT_TEST_OUTPUT=1
-export SUSE_ASNEEDED=0
-python3 run_tests.py
+python3 run_tests.py --failfast
 %endif
 
 %files
 %license COPYING
-%if !%{testsuite}
+%if !%{with test}
 %{_bindir}/meson
 %{python3_sitelib}/%{_name}/
 %{python3_sitelib}/meson-*
@@ -201,16 +243,14 @@
 %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy
 %{_rpmconfigdir}/macros.d/macros.meson
 %{_mandir}/man1/meson.1%{?ext_man}
-%endif
 
-%if !%{testsuite}
 %files vim
 %doc data/syntax-highlighting/vim/README
-%dir %{vim_data_dir}
-%dir %{vim_data_dir}/site
-%dir %{vim_data_dir}/site/ftdetect
-%dir %{vim_data_dir}/site/indent
-%dir %{vim_data_dir}/site/syntax
+%dir %{vim_data_dir}/
+%dir %{vim_data_dir}/site/
+%dir %{vim_data_dir}/site/ftdetect/
+%dir %{vim_data_dir}/site/indent/
+%dir %{vim_data_dir}/site/syntax/
 %{vim_data_dir}/site/ftdetect/meson.vim
 %{vim_data_dir}/site/indent/meson.vim
 %{vim_data_dir}/site/syntax/meson.vim

++++++ _multibuild ++++++
<multibuild>
  <package>test</package>
</multibuild>
++++++ meson-0.48.2.tar.gz -> meson-0.49.0.tar.gz ++++++
++++ 14312 lines of diff (skipped)

++++++ meson-distutils.patch ++++++
Index: meson-0.49.0/setup.py
===================================================================
--- meson-0.49.0.orig/setup.py
+++ meson-0.49.0/setup.py
@@ -22,7 +22,7 @@ if sys.version_info < (3, 5, 0):
     sys.exit(1)
 
 from mesonbuild.coredata import version
-from setuptools import setup
+from distutils.core import setup
 
 # On windows, will create Scripts/meson.exe and Scripts/meson-script.py
 # Other platforms will create bin/meson
++++++ meson-fix-gcc48.patch ++++++
--- /var/tmp/diff_new_pack.2OYq1I/_old  2019-01-28 20:46:22.674035683 +0100
+++ /var/tmp/diff_new_pack.2OYq1I/_new  2019-01-28 20:46:22.674035683 +0100
@@ -1,6 +1,6 @@
 --- a/mesonbuild/compilers/cpp.py
 +++ b/mesonbuild/compilers/cpp.py
-@@ -137,8 +137,8 @@ class ClangCPPCompiler(ClangCompiler, CP
+@@ -140,8 +140,8 @@ class ClangCPPCompiler(ClangCompiler, CP
      def get_options(self):
          opts = CPPCompiler.get_options(self)
          opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ 
language standard to use',
@@ -11,7 +11,7 @@
                                                           'none')})
          return opts
  
-@@ -168,8 +168,8 @@ class ArmclangCPPCompiler(ArmclangCompil
+@@ -171,8 +171,8 @@ class ArmclangCPPCompiler(ArmclangCompil
      def get_options(self):
          opts = CPPCompiler.get_options(self)
          opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ 
language standard to use',
@@ -22,7 +22,7 @@
                                                           'none')})
          return opts
  
-@@ -194,10 +194,12 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
+@@ -197,10 +197,12 @@ class GnuCPPCompiler(GnuCompiler, CPPCom
                            '3': default_warn_args + ['-Wextra', '-Wpedantic']}
  
      def get_options(self):
@@ -37,7 +37,7 @@
                                                           'none'),
                       'cpp_debugstl': 
coredata.UserBooleanOption('cpp_debugstl',
                                                                  'STL debug 
mode',
-@@ -271,7 +273,7 @@ class IntelCPPCompiler(IntelCompiler, CP
+@@ -276,7 +278,7 @@ class IntelCPPCompiler(IntelCompiler, CP
          c_stds = ['c++98', 'c++03']
          g_stds = ['gnu++98', 'gnu++03']
          if version_compare(self.version, '>=15.0.0'):
@@ -75,6 +75,22 @@
      # If we get a meson.build autoformatter one day, this code could
      # be simplified quite a bit.
      formatted_default_options = ', '.join("'{}'".format(x) for x in 
default_options)
+--- "a/test cases/common/152 simd/simdchecker.c"
++++ "b/test cases/common/152 simd/simdchecker.c"
+@@ -10,11 +10,12 @@ int check_simd_implementation(float *fou
+         const float *expected,
+         simd_func fptr,
+         const int blocksize) {
++    int i;
+     int rv = 0;
+     memcpy(four, four_initial, blocksize*sizeof(float));
+     printf("Using %s.\n", simd_type);
+     fptr(four);
+-    for(int i=0; i<blocksize; i++) {
++    for(i=0; i<blocksize; i++) {
+         if(four[i] != expected[i]) {
+             printf("Increment function failed, got %f expected %f.\n", 
four[i], expected[i]);
+             rv = 1;
 --- "a/test cases/unit/17 prebuilt shared/patron.c"
 +++ "b/test cases/unit/17 prebuilt shared/patron.c"
 @@ -5,4 +5,5 @@ int main(int argc, char **argv) {

++++++ meson-no-lrelease.patch ++++++
>From 391878e83aef4c2ba43e69c4850bbc84f409783e Mon Sep 17 00:00:00 2001
From: Dylan Baker <[email protected]>
Date: Tue, 18 Dec 2018 14:13:05 -0800
Subject: [PATCH] dependencies/ui: Don't require lrelease for qt

We previously didn't require it so we shouldn't silently start doing so.

Fixes #4654
---
 mesonbuild/dependencies/ui.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index e8fba91a23..1f65c3b86f 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -243,7 +243,7 @@ def gen_bins():
                 if self.bindir:
                     yield os.path.join(self.bindir, b), b, False
                 yield '{}-{}'.format(b, self.name), b, False
-                yield b, b, self.required
+                yield b, b, self.required if b != 'lrelease' else False
 
         for b, name, required in gen_bins():
             if found[name].found():

++++++ meson-restore-python3.4.patch ++++++
--- /var/tmp/diff_new_pack.2OYq1I/_old  2019-01-28 20:46:22.690035666 +0100
+++ /var/tmp/diff_new_pack.2OYq1I/_new  2019-01-28 20:46:22.694035662 +0100
@@ -1,7 +1,7 @@
 --- a/mesonbuild/backend/ninjabackend.py
 +++ b/mesonbuild/backend/ninjabackend.py
 @@ -32,7 +32,7 @@ from .. import compilers
- from ..compilers import CompilerArgs, CCompiler
+ from ..compilers import CompilerArgs, CCompiler, VisualStudioCCompiler
  from ..linkers import ArLinker
  from ..mesonlib import File, MesonException, OrderedSet
 -from ..mesonlib import get_compiler_for_source, has_path_sep
@@ -9,7 +9,7 @@
  from .backends import CleanTrees
  from ..build import InvalidArguments
  
-@@ -1011,8 +1011,8 @@ int dummy;
+@@ -1025,8 +1025,8 @@ int dummy;
                  # Check if the vala file is in a subdir of --basedir
                  abs_srcbasedir = 
os.path.join(self.environment.get_source_dir(), target.get_subdir())
                  abs_vala_file = 
os.path.join(self.environment.get_build_dir(), vala_file)
@@ -25,13 +25,13 @@
 @@ -18,7 +18,7 @@ import sys
  from pathlib import PurePath
  from collections import OrderedDict
- from .mesonlib import MesonException
--from .mesonlib import default_libdir, default_libexecdir, default_prefix
-+from .mesonlib import default_libdir, default_libexecdir, default_prefix, 
commonpath
+ from .mesonlib import (
+-    MesonException, default_libdir, default_libexecdir, default_prefix
++    MesonException, default_libdir, default_libexecdir, default_prefix, 
commonpath
+ )
  from .wrap import WrapMode
  import ast
- import argparse
-@@ -302,7 +302,7 @@ class CoreData:
+@@ -379,7 +379,7 @@ class CoreData:
              # commonpath will always return a path in the native format, so we
              # must use pathlib.PurePath to do the same conversion before
              # comparing.
@@ -42,7 +42,7 @@
                      'relative path, it is assumed to be a subdir of prefix.'
 --- a/mesonbuild/interpreterbase.py
 +++ b/mesonbuild/interpreterbase.py
-@@ -574,7 +574,9 @@ The result of this is undefined and will
+@@ -617,7 +617,9 @@ The result of this is undefined and will
  
          if cur.operation == 'add':
              if isinstance(l, dict) and isinstance(r, dict):
@@ -53,7 +53,7 @@
              try:
                  return l + r
              except Exception as e:
-@@ -661,7 +662,8 @@ The result of this is undefined and will
+@@ -718,7 +720,8 @@ The result of this is undefined and will
          elif isinstance(old_variable, dict):
              if not isinstance(addition, dict):
                  raise InvalidArguments('The += operator requires a dict on 
the right hand side if the variable on the left is a dict')
@@ -65,17 +65,15 @@
              raise InvalidArguments('The += operator currently only works with 
arrays, dicts, strings or ints ')
 --- a/mesonbuild/mesonlib.py
 +++ b/mesonbuild/mesonlib.py
-@@ -19,7 +19,8 @@ import sys
- import stat
+@@ -20,6 +20,7 @@ import stat
  import time
  import platform, subprocess, operator, os, shutil, re
--import collections
-+import collections
+ import collections
 +import collections.abc
- from mesonbuild import mlog
+ from enum import Enum
+ from functools import lru_cache
  
- have_fcntl = False
-@@ -1062,6 +1062,30 @@ def substring_is_in_list(substr, strlist
+@@ -1149,6 +1150,30 @@ def substring_is_in_list(substr, strlist
              return True
      return False
  
@@ -108,8 +106,8 @@
      insertion.
 --- a/mesonbuild/mesonmain.py
 +++ b/mesonbuild/mesonmain.py
-@@ -269,8 +269,8 @@ def set_meson_command(mainfile):
-         mlog.log('meson_command is {!r}'.format(mesonlib.meson_command))
+@@ -149,8 +149,8 @@ def run_script_command(script_name, scri
+         return 1
  
  def run(original_args, mainfile):
 -    if sys.version_info < (3, 5):
@@ -121,7 +119,7 @@
          return 1
 --- a/mesonbuild/minstall.py
 +++ b/mesonbuild/minstall.py
-@@ -353,8 +353,8 @@ class Installer:
+@@ -348,8 +348,8 @@ class Installer:
              if shutil.which('pkexec') is not None and 'PKEXEC_UID' not in 
os.environ:
                  print('Installation failed due to insufficient permissions.')
                  print('Attempting to use polkit to gain elevated 
privileges...')
@@ -134,7 +132,7 @@
  
 --- a/mesonbuild/modules/python.py
 +++ b/mesonbuild/modules/python.py
-@@ -512,7 +512,7 @@ class PythonModule(ExtensionModule):
+@@ -516,7 +516,7 @@ class PythonModule(ExtensionModule):
              # Sanity check, we expect to have something that at least quacks 
in tune
              try:
                  info = json.loads(run_command(python, INTROSPECT_COMMAND))
@@ -145,7 +143,7 @@
              if isinstance(info, dict) and 'version' in info and 
self._check_version(name_or_path, info['version']):
 --- a/mesonbuild/mtest.py
 +++ b/mesonbuild/mtest.py
-@@ -115,7 +115,12 @@ def returncode_to_status(retcode):
+@@ -114,7 +114,12 @@ def returncode_to_status(retcode):
      if retcode < 0:
          signum = -retcode
          try:
@@ -159,7 +157,7 @@
          except ValueError:
              signame = 'SIGinvalid'
          return '(killed by signal %d %s)' % (signum, signame)
-@@ -125,7 +130,12 @@ def returncode_to_status(retcode):
+@@ -124,7 +129,12 @@ def returncode_to_status(retcode):
  
      signum = retcode - 128
      try:
@@ -173,19 +171,6 @@
      except ValueError:
          signame = 'SIGinvalid'
      return '(exit status %d or signal %d %s)' % (retcode, signum, signame)
---- a/mesonbuild/scripts/dist.py
-+++ b/mesonbuild/scripts/dist.py
-@@ -87,8 +87,8 @@ def run_dist_scripts(dist_root, dist_scr
-                              silent=True)
-         if not ep.found():
-             sys.exit('Script %s could not be found in dist directory.' % d)
--        pc = subprocess.run(ep.command, env=env)
--        if pc.returncode != 0:
-+        pc = subprocess.call(ep.command, env=env)
-+        if pc != 0:
-             sys.exit('Dist script errored out.')
- 
- def create_dist_git(dist_name, src_root, bld_root, dist_sub, dist_scripts):
 --- a/mesonbuild/scripts/gtkdochelper.py
 +++ b/mesonbuild/scripts/gtkdochelper.py
 @@ -17,7 +17,7 @@ import subprocess
@@ -193,11 +178,11 @@
  import shutil
  import argparse
 -from ..mesonlib import MesonException, Popen_safe, is_windows
-+from ..mesonlib import MesonException, Popen_safe, is_windows, commonpath
++from ..mesonlib import MesonException, Popen_safe, commonpath, is_windows
  from . import destdir_join
  
  parser = argparse.ArgumentParser()
-@@ -107,7 +107,7 @@ def build_gtkdoc(source_root, build_root
+@@ -108,7 +108,7 @@ def build_gtkdoc(source_root, build_root
          # FIXME: Use mesonlib.File objects so we don't need to do this
          if not os.path.isabs(f):
              f = os.path.join(doc_src, f)
@@ -208,7 +193,7 @@
  
 --- a/run_meson_command_tests.py
 +++ b/run_meson_command_tests.py
-@@ -18,6 +18,7 @@ import os
+@@ -19,6 +19,7 @@ import os
  import tempfile
  import unittest
  import subprocess
@@ -216,52 +201,28 @@
  import zipapp
  from pathlib import Path
  
-@@ -73,13 +74,27 @@ class CommandTests(unittest.TestCase):
+@@ -68,9 +69,15 @@ class CommandTests(unittest.TestCase):
          # If this call hangs CI will just abort. It is very hard to 
distinguish
          # between CI issue and test bug in that case. Set timeout and fail 
loud
          # instead.
 -        p = subprocess.run(command, stdout=subprocess.PIPE,
--                           stderr=subprocess.STDOUT, env=os.environ.copy(),
--                           universal_newlines=True, cwd=workdir, timeout=60 * 
5)
--        print(p.stdout)
--        if p.returncode != 0:
--            raise subprocess.CalledProcessError(p.returncode, command)
--        return p.stdout
+-                           env=os.environ.copy(), universal_newlines=True,
+-                           cwd=workdir, timeout=60 * 5)
 +        if sys.version_info >= (3, 5):
 +            p = subprocess.run(command, stdout=subprocess.PIPE,
-+                               stderr=subprocess.STDOUT, 
env=os.environ.copy(),
-+                               universal_newlines=True,
++                               env=os.environ.copy(), universal_newlines=True,
 +                               cwd=workdir, timeout=60 * 5)
-+            print(p.stdout)
-+            if p.returncode != 0:
-+                raise subprocess.CalledProcessError(p.returncode, command)
-+            return p.stdout
 +        else:
-+            try:
-+                po = subprocess.check_output(command, 
stderr=subprocess.STDOUT,
-+                                             env=os.environ.copy(),
-+                                             universal_newlines=True,
-+                                             cwd=workdir, timeout=60 * 5)
-+            except subprocess.CalledProcessError as e:
-+                print(e.output)
-+                raise subprocess.CalledProcessError(e.returncode, e.cmd)
-+            else:
-+                print(po)
-+                return po
- 
-     def assertMesonCommandIs(self, line, cmd):
-         self.assertTrue(line.startswith('meson_command '), msg=line)
++            p = subprocess.Popen(command, stdout=subprocess.PIPE,
++                                 env=os.environ.copy(), 
universal_newlines=True,
++                                 cwd=workdir)
++            p.stdout = p.communicate(timeout=60 * 5)[0]
+         print(p.stdout)
+         if p.returncode != 0:
+             raise subprocess.CalledProcessError(p.returncode, command)
 --- a/run_unittests.py
 +++ b/run_unittests.py
-@@ -21,6 +21,7 @@ import tempfile
- import textwrap
- import os
- import shutil
-+import sys
- import unittest
- import platform
- from itertools import chain
-@@ -892,6 +893,24 @@ class DataTests(unittest.TestCase):
+@@ -956,6 +956,24 @@ class DataTests(unittest.TestCase):
              defined = set([a.strip() for a in res.group().split('\\')][1:])
              self.assertEqual(defined, set(chain(interp.funcs.keys(), 
interp.builtin.keys())))
  
@@ -286,7 +247,7 @@
  
  class BasePlatformTests(unittest.TestCase):
      def setUp(self):
-@@ -972,9 +991,16 @@ class BasePlatformTests(unittest.TestCas
+@@ -1036,9 +1054,15 @@ class BasePlatformTests(unittest.TestCas
          # If this call hangs CI will just abort. It is very hard to 
distinguish
          # between CI issue and test bug in that case. Set timeout and fail 
loud
          # instead.
@@ -296,17 +257,16 @@
 +        if sys.version_info >= (3, 5):
 +            p = subprocess.run(command, stdout=subprocess.PIPE,
 +                               stderr=subprocess.STDOUT, 
env=os.environ.copy(),
-+                               universal_newlines=True, cwd=workdir,
-+                               timeout=60 * 5)
++                               universal_newlines=True, cwd=workdir, 
timeout=60 * 5)
 +        else:
 +            p = subprocess.Popen(command, stdout=subprocess.PIPE,
 +                                 stderr=subprocess.STDOUT, 
env=os.environ.copy(),
 +                                 universal_newlines=True, cwd=workdir)
-+            p.stdout = p.communicate(timeout=60 * 5)[0]
++            p.stdout  = p.communicate(timeout=60 * 5)[0]
          print(p.stdout)
          if p.returncode != 0:
              if 'MESON_SKIP_TEST' in p.stdout:
-@@ -2698,17 +2724,23 @@ recommended as it is not supported on so
+@@ -2849,17 +2873,23 @@ recommended as it is not supported on so
                  of = open(mfile, 'w')
                  of.write("project('foobar', 'c')\n")
                  of.close()
@@ -339,11 +299,30 @@
  
      def get_opts_as_dict(self):
          result = {}
+@@ -4671,13 +4701,14 @@ class NativeFileTests(BasePlatformTests)
+                 f.write('        print("{}", file=sys.{})\n'.format(value, 
kwargs.get('outfile', 'stdout')))
+                 f.write('        sys.exit(0)\n')
+             f.write(textwrap.dedent('''
+-                    ret = subprocess.run(
++                    ret = subprocess.Popen(
+                         ["{}"] + extra_args,
+                         stdout=subprocess.PIPE,
+                         stderr=subprocess.PIPE,
+-                        encoding='utf-8')
+-                    print(ret.stdout)
+-                    print(ret.stderr, file=sys.stderr)
++                        universal_newlines=True)
++                    stdout, stderr = ret.communicate()
++                    print(stdout)
++                    print(stderr, file=sys.stderr)
+                     sys.exit(ret.returncode)
+ 
+                 if __name__ == '__main__':
 --- a/setup.py
 +++ b/setup.py
-@@ -18,9 +18,9 @@ import sys
+@@ -16,9 +16,9 @@
  
- from mesonbuild.coredata import version
+ import sys
  
 -if sys.version_info < (3, 5, 0):
 +if sys.version_info < (3, 4, 0):
@@ -352,7 +331,7 @@
 +          'Meson requires Python 3.4.0 or greater')
      sys.exit(1)
  
- from setuptools import setup
+ from mesonbuild.coredata import version
 --- "a/test cases/common/188 find override/subdir/converter.py"
 +++ "b/test cases/common/188 find override/subdir/converter.py"
 @@ -10,6 +10,7 @@ ftempl = '''int %s() {
@@ -381,17 +360,25 @@
 +    f.write(ftempl % d)
 --- "a/test cases/unit/35 dist script/replacer.py"
 +++ "b/test cases/unit/35 dist script/replacer.py"
-@@ -7,6 +7,8 @@ source_root = pathlib.Path(os.environ['M
+@@ -11,6 +11,8 @@ source_root = pathlib.Path(os.environ['M
  
  modfile = source_root / 'prog.c'
  
 -contents = modfile.read_text()
 +with modfile.open('r') as f:
 +    contents = f.read()
- contents = contents.replace('"incorrect"', '"correct"')
+ contents = contents.replace(sys.argv[1], sys.argv[2])
 -modfile.write_text(contents)
 +with modfile.open('w') as f:
 +    f.write(contents)
+--- "a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py"
++++ "b/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py"
+@@ -9,4 +9,4 @@ environ['PKG_CONFIG_LIBDIR'] = os.path.j
+     os.path.dirname(os.path.realpath(__file__)), 'cross_pkgconfig')
+ 
+ sys.exit(
+-    subprocess.run(['pkg-config'] + sys.argv[1:], env=environ).returncode)
++    subprocess.call(['pkg-config'] + sys.argv[1:], env=environ))
 --- "a/test cases/windows/13 test argument extra paths/test/test_run_exe.py"
 +++ "b/test cases/windows/13 test argument extra paths/test/test_run_exe.py"
 @@ -7,6 +7,6 @@ if __name__ == '__main__':

++++++ meson-suse-fix-llvm-3.8.patch ++++++
--- /var/tmp/diff_new_pack.2OYq1I/_old  2019-01-28 20:46:22.702035654 +0100
+++ /var/tmp/diff_new_pack.2OYq1I/_new  2019-01-28 20:46:22.706035649 +0100
@@ -1,6 +1,6 @@
 --- a/mesonbuild/dependencies/dev.py
 +++ b/mesonbuild/dependencies/dev.py
-@@ -205,10 +205,10 @@ class LLVMDependency(ConfigToolDependenc
+@@ -343,10 +343,11 @@ class LLVMDependency(ConfigToolDependenc
          not for shared-linnking, we have to figure those out ourselves, 
because
          of course we do.
          """
@@ -8,6 +8,7 @@
 -            self.link_args = self.get_config_value(
 -                ['--libs', '--ldflags', '--system-libs'] + 
list(self.required_modules),
 -                'link_args')
++        #if self.static:
 +        self.link_args = self.get_config_value(
 +            ['--libs', '--ldflags', '--system-libs'] + 
list(self.required_modules),
 +            'link_args')
@@ -15,7 +16,7 @@
          else:
              # llvm-config will provide arguments for static linking, so we get
              # to figure out for ourselves what to link with. We'll do that by
-@@ -227,6 +227,7 @@ class LLVMDependency(ConfigToolDependenc
+@@ -365,6 +366,7 @@ class LLVMDependency(ConfigToolDependenc
              else:
                  raise DependencyException(
                      'Could not find a dynamically linkable library for LLVM.')
@@ -23,3 +24,17 @@
  
      def check_components(self, modules, required=True):
          """Check for llvm components (modules in meson terms).
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -4771,6 +4771,11 @@ class NativeFileTests(BasePlatformTests)
+         # Do the skip at this level to avoid screwing up the cache
+         if not shutil.which('llvm-config'):
+             raise unittest.SkipTest('No llvm-installed, cannot test')
++
++        output = subprocess.getoutput('llvm-config --version')
++        if version_compare(output, '< 3.9'):
++            raise unittest.SkipTest('llvm-config >= 3.9 needed for the test')
++
+         self._simple_test('config_dep', 'llvm-config')
+ 
+     def test_python3_module(self):

++++++ meson-test-installed-bin.patch ++++++
--- /var/tmp/diff_new_pack.2OYq1I/_old  2019-01-28 20:46:22.726035628 +0100
+++ /var/tmp/diff_new_pack.2OYq1I/_new  2019-01-28 20:46:22.726035628 +0100
@@ -1,6 +1,6 @@
 --- a/run_tests.py
 +++ b/run_tests.py
-@@ -54,18 +54,10 @@ def get_meson_script():
+@@ -104,18 +104,10 @@ def get_meson_script():
      Also used by run_unittests.py to determine what meson to run when not
      running in-process (which is the default).
      '''
@@ -21,12 +21,22 @@
  
  def get_backend_args_for_dir(backend, builddir):
      '''
-@@ -244,7 +236,7 @@ if __name__ == '__main__':
-             env['COVERAGE_PROCESS_START'] = '.coveragerc'
-             env['PYTHONPATH'] = os.pathsep.join([td] + env.get('PYTHONPATH', 
[]))
+@@ -296,12 +288,12 @@ def main():
+             else:
+                 env['PYTHONPATH'] = temp_dir
          if not cross:
--            returncode += subprocess.call(mesonlib.python_command + 
['run_meson_command_tests.py', '-v'], env=env)
-+            #returncode += subprocess.call(mesonlib.python_command + 
['run_meson_command_tests.py', '-v'], env=env)
-             returncode += subprocess.call(mesonlib.python_command + 
['run_unittests.py', '-v'], env=env)
-             returncode += subprocess.call(mesonlib.python_command + 
['run_project_tests.py'] + sys.argv[1:], env=env)
-         else:
+-            cmd = mesonlib.python_command + ['run_meson_command_tests.py', 
'-v']
+-            if options.failfast:
+-                cmd += ['--failfast']
+-            returncode += subprocess.call(cmd, env=env)
+-            if options.failfast and returncode != 0:
+-                return returncode
++            #cmd = mesonlib.python_command + ['run_meson_command_tests.py', 
'-v']
++            #if options.failfast:
++            #    cmd += ['--failfast']
++            #returncode += subprocess.call(cmd, env=env)
++            #if options.failfast and returncode != 0:
++            #    return returncode
+             cmd = mesonlib.python_command + ['run_unittests.py', '-v']
+             if options.failfast:
+                 cmd += ['--failfast']


Reply via email to