Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-veusz for openSUSE:Factory checked in at 2022-08-20 20:28:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-veusz (Old) and /work/SRC/openSUSE:Factory/.python-veusz.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-veusz" Sat Aug 20 20:28:13 2022 rev:50 rq:998226 version:3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-veusz/python-veusz.changes 2021-12-30 15:56:13.336691632 +0100 +++ /work/SRC/openSUSE:Factory/.python-veusz.new.2083/python-veusz.changes 2022-08-20 20:28:34.129336983 +0200 @@ -1,0 +2,12 @@ +Fri Aug 19 16:01:25 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Fix obsoletion of flavored package + +------------------------------------------------------------------- +Thu Aug 18 09:05:44 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Add veusz-sip65.patch gh#veusz/veusz#595: fix build with SIP 6.5 +- Remove multiflavor build: This application only needs the primary + python3 flavor. + +------------------------------------------------------------------- Old: ---- python-veusz-rpmlintrc New: ---- veusz-sip65.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-veusz.spec ++++++ --- /var/tmp/diff_new_pack.XLpnFB/_old 2022-08-20 20:28:34.597338281 +0200 +++ /var/tmp/diff_new_pack.XLpnFB/_new 2022-08-20 20:28:34.601338292 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-veusz # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,6 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 -%define skip_python36 1 Name: python-veusz Version: 3.4 Release: 0 @@ -27,29 +24,25 @@ License: GPL-2.0-or-later AND Python-2.0 URL: https://veusz.github.io/ Source0: https://files.pythonhosted.org/packages/source/v/veusz/veusz-%{version}.tar.gz -Source1: %{name}-rpmlintrc Source3: veusz_256.png -BuildRequires: %{python_module devel} -BuildRequires: %{python_module numpy-devel} -BuildRequires: %{python_module qt5-devel} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module sip-devel} +# PATCH-FIX-UPSTREAM veusz-sip65.patch gh#veusz/veusz#595 -- fix build with SIP 6.5 +Patch0: veusz-sip65.patch BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: python-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-numpy-devel +BuildRequires: python3-qt5-devel +BuildRequires: python3-setuptools +BuildRequires: python3-sip-devel +BuildRequires: python3-toml BuildRequires: update-desktop-files -Requires: python-numpy -Requires: python-qt5 -Recommends: python-astropy -Recommends: python-h5py -Recommends: veusz -ExcludeArch: i586 # SECTION For Tests -BuildRequires: %{python_module astropy} -BuildRequires: %{python_module h5py} +BuildRequires: python3-astropy +BuildRequires: python3-h5py # /SECTION -%python_subpackages +ExcludeArch: i586 %description Veusz is a scientific plotting package, designed to create @@ -61,13 +54,20 @@ %package -n veusz Summary: GUI scientific plotting package -Requires: python3-veusz = %{version} +Requires: python3-numpy +Requires: python3-qt5 +Recommends: python3-astropy +Recommends: python3-h5py Requires(post): desktop-file-utils Requires(post): shared-mime-info Requires(postun):desktop-file-utils Requires(postun):shared-mime-info -Obsoletes: veusz3 < %{version} -Provides: veusz3 = %{version} +Obsoletes: veusz3 < %{version}-%{release} +Provides: veusz3 = %{version}-%{release} +Obsoletes: python3-veusz < %{version}-%{release} +Provides: python3-veusz = %{version}-%{release} +Obsoletes: %{primary_python}-veusz < %{version}-%{release} +Provides: %{primary_python}-veusz = %{version}-%{release} %description -n veusz Veusz is a scientific plotting package, designed to create @@ -78,7 +78,7 @@ multiple plots, contours, shapes and fitting data. %prep -%setup -q -n veusz-%{version} +%autosetup -p1 -n veusz-%{version} find -name \*~ | xargs rm -f # Remove hashbangs from eventually non-executable scripts @@ -86,11 +86,10 @@ %build export CFLAGS="%{optflags}" - -%python_build +%python3_build %install -%python_install +%python3_install # Install .desktop, mime and appdata files from upstream tarball install -Dm0644 support/veusz.appdata.xml %{buildroot}%{_datadir}/appdata/veusz.appdata.xml @@ -101,7 +100,7 @@ support/veusz.desktop # move icon files to /usr/share/pixmaps/veusz -%python_expand install -m 0644 %{SOURCE3} %{buildroot}%{$python_sitearch}/veusz/icons/veusz_256.png +install -m 0644 %{SOURCE3} %{buildroot}%{python3_sitearch}/veusz/icons/veusz_256.png mkdir -p %{buildroot}%{_datadir}/pixmaps/veusz ln -s %{python3_sitearch}/veusz/icons %{buildroot}%{_datadir}/pixmaps/veusz @@ -122,12 +121,11 @@ # Remove an unneeded hidden file from documentation rm Documents/manual/html/.buildinfo -%python_expand %fdupes %{buildroot}%{$python_sitearch}/veusz/ +%fdupes %{buildroot}%{python3_sitearch}/veusz/ %check -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} -QT_QPA_PLATFORM=minimal $python -B tests/runselftest.py -} +export PYTHONPATH=%{buildroot}%{python3_sitearch} +QT_QPA_PLATFORM=minimal python3 -B tests/runselftest.py %post -n veusz update-mime-database %{_datadir}/mime > /dev/null 2>&1 || : @@ -139,15 +137,10 @@ update-desktop-database %{_datadir}/applications %icon_theme_cache_postun -%files %{python_files} +%files -n veusz %doc README.md AUTHORS ChangeLog %doc Documents/manual/html %license COPYING -%{python_sitearch}/veusz-%{version}-py*.egg-info -%{python_sitearch}/veusz/ - -%files -n veusz -%license COPYING %{_bindir}/veusz %{_datadir}/applications/veusz.desktop %{_datadir}/pixmaps/veusz/ @@ -156,5 +149,7 @@ %{_datadir}/icons/hicolor/*/apps/veusz.* %{_datadir}/mime/packages/veusz.xml %{_mandir}/man1/* +%{python3_sitearch}/veusz-%{version}*-info +%{python3_sitearch}/veusz/ %changelog ++++++ veusz-sip65.patch ++++++ >From 3c8552b7cf886b282337640be6dd439c77c8f9fe Mon Sep 17 00:00:00 2001 From: Jeremy Sanders <jer...@jeremysanders.net> Date: Wed, 17 Aug 2022 12:21:23 +0200 Subject: [PATCH] Remove use of internal sip interface to compile with recent sip versions Fix for bug #595 --- pyqtdistutils.py | 119 +++++++++++++++++++++++------------------------ requirements.txt | 1 + 2 files changed, 59 insertions(+), 61 deletions(-) diff --git a/pyqtdistutils.py b/pyqtdistutils.py index 5156108a..a4f8f37c 100644 --- a/pyqtdistutils.py +++ b/pyqtdistutils.py @@ -5,18 +5,13 @@ # Based on Pyrex.Distutils, written by Graham Fawcett and Darrel Gallion. import os +import shutil import subprocess +import toml from distutils.sysconfig import customize_compiler, get_python_lib import distutils.command.build_ext -import toml - -from sipbuild.code_generator import set_globals, parse, generateCode -from sipbuild.exceptions import UserException -from sipbuild.module import copy_sip_h, resolve_abi_version -from sipbuild.version import SIP_VERSION, SIP_VERSION_STR - ################################################################## def replace_suffix(path, new_suffix): @@ -30,10 +25,9 @@ def find_on_path(names, mainname): path = os.getenv('PATH', os.path.defpath) pathparts = path.split(os.path.pathsep) for cmd in names: - for dirname in pathparts: - cmdtry = os.path.join(dirname.strip('"'), cmd) - if os.path.isfile(cmdtry) and os.access(cmdtry, os.X_OK): - return cmdtry + resolved = shutil.which(cmd) + if resolved: + return resolved raise RuntimeError('Could not find %s executable' % mainname) def read_command_output(cmd): @@ -206,8 +200,8 @@ def swig_sources(self, sources, extension=None): # Collect the names of the source (.sip) files sip_sources = [] sip_sources = [source for source in sources if source.endswith('.sip')] - other_sources = [source for source in sources - if not source.endswith('.sip')] + other_sources = [ + source for source in sources if not source.endswith('.sip')] generated_sources = [] for sip in sip_sources: @@ -216,64 +210,67 @@ def swig_sources(self, sources, extension=None): if not os.path.exists(sip_builddir) or self.force: os.makedirs(sip_builddir, exist_ok=True) self._sip_compile(sip, sip_builddir) - out = [ - os.path.join(sip_builddir, fn) - for fn in sorted(os.listdir(sip_builddir)) - if fn.endswith(".cpp") + + # files get put in sip_builddir + modulename + modulename = os.path.splitext(os.path.basename(sip))[0] + dirname = os.path.join(sip_builddir, 'output', modulename) + + source_files = [ + os.path.join(dirname, fn) + for fn in sorted(os.listdir(dirname)) + if fn.endswith(".cpp") or fn.endswith(".c") ] - generated_sources.extend(out) + + generated_sources.extend(source_files) return generated_sources + other_sources def _sip_compile(self, source, sip_builddir): """Compile sip file to sources.""" - sip_module = 'PyQt5.sip' - pyqt5_include_dir = os.path.join(get_python_lib(plat_specific=1), - 'PyQt5', 'bindings') + + pyqt5_include_dir = os.path.join( + get_python_lib(plat_specific=1), 'PyQt5', 'bindings') pyqt5_toml = os.path.join(pyqt5_include_dir, 'QtCore', 'QtCore.toml') pyqt5_cfg = toml.load(pyqt5_toml) abi_version = pyqt5_cfg.get('sip-abi-version') - abi_major, abi_minor = abi_version.split('.') - - # header file location changed to major version in sip-6.2.0 - if SIP_VERSION >= 0x60200: - hdr_version = abi_major - else: - hdr_version = abi_version - copy_sip_h(hdr_version, sip_builddir, sip_module) - - sip_major_version = SIP_VERSION >> 16 - common_args = [SIP_VERSION, SIP_VERSION_STR, int(abi_major), int(abi_minor)] - if sip_major_version >= 6: - set_globals(*common_args, sip_module, UserException, [pyqt5_include_dir]) - else: - set_globals(*common_args, UserException, [pyqt5_include_dir]) - - pt, _fq_name, _uses_limited_api, _sip_files, tags, disabled_features = parse( - source, - True, # strict mode - [], # list of additional version/platform tags - [], # list of timeline backstops - [], # list of disabled features - False, # protected is public - ) - generate_args = [ - pt, - sip_builddir, - None, # source files suffix (default .c, .cpp) - False, # whether to enable support for exceptions - False, # whether to generate code with tracing enabled - False, # whether to always release and reacquire the GIL - 0, # number of files to split the generated code into - tags, - disabled_features, - False, # whether to enable the automatic generation of docstrings - False, # whether to generate code for a debug build of Python - ] - if sip_major_version < 6: - generate_args.append(sip_module) - generateCode(*generate_args) + modulename = os.path.splitext(os.path.basename(source))[0] + srcdir = os.path.abspath(os.path.dirname(source)) + + output_dir = os.path.abspath(os.path.join(sip_builddir, 'output')) + toml_out_fname = os.path.join(sip_builddir, 'pyproject.toml') + with open(toml_out_fname, 'w') as fout: + fout.write(f''' +[build-system] +requires=["sip >=5.5.0, <7"] +build-backend="sipbuild.api" + +[tool.sip.metadata] +name="{modulename}" + +[tool.sip.bindings.{modulename}] +pep484-pyi=false +protected-is-public=false + +[tool.sip.project] +sip-include-dirs=["{pyqt5_include_dir}"] +abi-version="{abi_version}" +build-dir="{output_dir}" +sip-module="PyQt5.sip" +sip-files-dir="{srcdir}" +''') + + # generate the source files for the bindings + build_cmd = shutil.which('sip-build') + if not build_cmd: + raise RuntimeError('Could not find sip-build command on PATH') + subprocess.check_call([build_cmd, '--no-compile'], cwd=sip_builddir) + + # put sip header in correct location + shutil.copyfile( + os.path.join(output_dir, 'sip.h'), + os.path.join(output_dir, modulename, 'sip.h') + ) def build_extensions(self): # remove annoying flag which causes warning for c++ sources >From 74b557f28447f864edb82e2c277e367279ad3953 Mon Sep 17 00:00:00 2001 From: Jeremy Sanders <jer...@jeremysanders.net> Date: Wed, 17 Aug 2022 13:17:40 +0200 Subject: [PATCH] Write toml file via toml instead of as text Further patch for bug #595, to attempt to fix build under Windows --- pyqtdistutils.py | 54 +++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/pyqtdistutils.py b/pyqtdistutils.py index a4f8f37c..f8bd208c 100644 --- a/pyqtdistutils.py +++ b/pyqtdistutils.py @@ -237,28 +237,40 @@ def _sip_compile(self, source, sip_builddir): modulename = os.path.splitext(os.path.basename(source))[0] srcdir = os.path.abspath(os.path.dirname(source)) + # location of sip output files output_dir = os.path.abspath(os.path.join(sip_builddir, 'output')) - toml_out_fname = os.path.join(sip_builddir, 'pyproject.toml') - with open(toml_out_fname, 'w') as fout: - fout.write(f''' -[build-system] -requires=["sip >=5.5.0, <7"] -build-backend="sipbuild.api" - -[tool.sip.metadata] -name="{modulename}" - -[tool.sip.bindings.{modulename}] -pep484-pyi=false -protected-is-public=false - -[tool.sip.project] -sip-include-dirs=["{pyqt5_include_dir}"] -abi-version="{abi_version}" -build-dir="{output_dir}" -sip-module="PyQt5.sip" -sip-files-dir="{srcdir}" -''') + os.makedirs(output_dir) + + # generate a pyproject.toml to generate the sip source + pyproject_data = { + 'build-system': { + 'requires': ['sip >=5.5.0, <7'], + 'build-backend': 'sipbuild.api', + }, + 'tool': { + 'sip': { + 'metadata': { + 'name': modulename, + }, + 'bindings': { + modulename: { + 'pep484-pyi': False, + 'protected-is-public': False + } + }, + 'project': { + 'sip-include-dirs': [pyqt5_include_dir], + 'abi-version': abi_version, + 'build-dir': output_dir, + 'sip-module': 'PyQt5.sip', + 'sip-files-dir': srcdir, + } + } + } + } + pyproject_fname = os.path.join(sip_builddir, 'pyproject.toml') + with open(pyproject_fname, 'w') as fout: + toml.dump(pyproject_data, fout) # generate the source files for the bindings build_cmd = shutil.which('sip-build')