commit python-rpm-macros for openSUSE:Factory
Hello community, here is the log from the commit of package python-rpm-macros for openSUSE:Factory checked in at 2017-02-27 18:41:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old) and /work/SRC/openSUSE:Factory/.python-rpm-macros.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-rpm-macros" Changes: -------- --- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes 2017-02-21 13:31:03.971508606 +0100 +++ /work/SRC/openSUSE:Factory/.python-rpm-macros.new/python-rpm-macros.changes 2017-02-27 18:41:30.479485838 +0100 @@ -1,0 +2,20 @@ +Fri Feb 24 13:50:03 UTC 2017 - jmatejek@suse.com + +- let %python_module expand *all* its arguments, not just the first + (so that %{python_module x >= 1.0} works as intended) + +------------------------------------------------------------------- +Wed Feb 22 14:38:28 UTC 2017 - jmatejek@suse.com + +- copy BuildArch to subpackages +- on requires/provides etc., perform macro expansion *after* replacing + 'python' name, to allow for tricking the rewriter to not replace + +------------------------------------------------------------------- +Tue Feb 21 14:55:08 UTC 2017 - jmatejek@suse.com + +- add BuildRoot to make SLE11 happy +- check presence of %python_files even on new-style distros +- better visibility of the %python_files error + +------------------------------------------------------------------- Old: ---- python-rpm-macros-1.0.git.1486997542.e9fcc29.tar.bz2 New: ---- python-rpm-macros-1.0.git.1487869271.c6e9bfc.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rpm-macros.spec ++++++ --- /var/tmp/diff_new_pack.KbP3LX/_old 2017-02-27 18:41:30.915424256 +0100 +++ /var/tmp/diff_new_pack.KbP3LX/_new 2017-02-27 18:41:30.919423692 +0100 @@ -17,7 +17,7 @@ Name: python-rpm-macros -Version: 1.0.git.1486997542.e9fcc29 +Version: 1.0.git.1487869271.c6e9bfc Release: 0 Summary: RPM macros for building of Python modules License: WTFPL @@ -29,6 +29,7 @@ Provides: python3-rpm-macros #!BuildIgnore: python-rpm-macros BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package contains SUSE RPM macros for Python build automation. ++++++ python-rpm-macros-1.0.git.1486997542.e9fcc29.tar.bz2 -> python-rpm-macros-1.0.git.1487869271.c6e9bfc.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-1.0.git.1486997542.e9fcc29/macros.in new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/macros.in --- old/python-rpm-macros-1.0.git.1486997542.e9fcc29/macros.in 2017-02-13 15:52:22.000000000 +0100 +++ new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/macros.in 2017-02-23 18:01:11.000000000 +0100 @@ -1,7 +1,7 @@ # order is important! if builds install the same binary, the last one is preferred %pythons %{?have_python2:python2} %{?have_pypy3:pypy3} %{?have_python3:python3} -%python_module() %{expand: %{?have_python2:%{python2_prefix}-%1} %{?have_python3:python3-%1} %{?have_pypy3:pypy3-%1}} +%python_module() %{expand: %{?have_python2:%{python2_prefix}-%{**}} %{?have_python3:python3-%{**}} %{?have_pypy3:pypy3-%{**}}} %if_python_kind() %if %{_python_scan_spec} %{lua: if current_flavor == rpm.expand("%1") then print("1") else print("0") end} %if_not_python_kind() %if %{_python_scan_spec} %{lua: if current_flavor == rpm.expand("%1") then print("0") else print("1") end} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-1.0.git.1486997542.e9fcc29/macros.lua new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/macros.lua --- old/python-rpm-macros-1.0.git.1486997542.e9fcc29/macros.lua 2017-02-13 15:52:22.000000000 +0100 +++ new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/macros.lua 2017-02-23 18:01:11.000000000 +0100 @@ -165,7 +165,7 @@ local function ignore_line(line) end - local PROPERTY_COPY_UNMODIFIED = lookup_table { "Summary", "Version" } + local PROPERTY_COPY_UNMODIFIED = lookup_table { "Summary", "Version", "BuildArch" } local PROPERTY_COPY_MODIFIED = lookup_table { "Requires", "Provides", "Recommends", "Suggests", @@ -178,13 +178,13 @@ if PROPERTY_COPY_UNMODIFIED[property] then print_altered(line) elseif PROPERTY_COPY_MODIFIED[property] then - local expanded = rpm.expand(value) - if expanded == "python" or expanded == flavor then - expanded = current_flavor + if value == "python" or value == flavor then + value = current_flavor else - expanded = expanded:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1") - expanded = expanded:gsub("^python(%W)", current_flavor .. "%1") + value = value:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1") + value = value:gsub("^python(%W)", current_flavor .. "%1") end + local expanded = rpm.expand(value) print_altered(string.format("%s: %s", property, expanded)) end end @@ -205,10 +205,13 @@ local subpkg = param:match("%%{python_files%s*(.-)}") if subpkg then python_files = true end - if old_python2 and is_called_python and not python_files then + if is_called_python and not python_files then -- kingly hack. but RPM's native %error does not work. - io.stderr:write('error: Package with "python-" prefix must not contain unmarked "%files" sections.\n') - io.stderr:write('error: Use "%files %python_files" or "%files %{python_files foo} instead.\n') + local errmsg = + 'error: Package with "python-" prefix must not contain unmarked "%files" sections.\n' .. + 'error: Use "%files %python_files" or "%files %{python_files foo} instead.\n' + io.stderr:write(errmsg) + print(errmsg) error('Invalid spec file') end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-1.0.git.1486997542.e9fcc29/process-spec.pl new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/process-spec.pl --- old/python-rpm-macros-1.0.git.1486997542.e9fcc29/process-spec.pl 2017-02-13 15:52:22.000000000 +0100 +++ new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/process-spec.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,99 +0,0 @@ -#!/usr/bin/perl - -use strict; -use utf8; -use warnings; - -my $SOURCE = $ARGV[0]; -$SOURCE or die "Please specify source spec file."; -my $DEST = $ARGV[1] // ($SOURCE =~ s/\.spec$/.converted.spec/r); -$SOURCE eq $DEST and $DEST .= ".converted"; - -open (SOURCE, "<$SOURCE"); -open (DEST, ">$DEST"); - -my $oldsuse = 0; -my $pysub_found = 0; -my $pymodule_inserted = 0; -my $macros_inserted = 0; - -my @known_backports = qw/singledispatch futures/; -my %backports = map { $_ => 1 } @known_backports; - -while (<SOURCE>) { - if ($oldsuse == 1) { - if (/^%else$/) { - $oldsuse = 2; - } elsif (/^%endif$/) { - $oldsuse = 0; - } - # else nothing - } elsif ($oldsuse == 2 && /^%endif$/) { - $oldsuse = 0; - } elsif ($oldsuse == 2 && /^%else$/) { - $oldsuse = 1; - } elsif (/^%\{\?!python_module/) { - $pymodule_inserted = 1; - print DEST $_; - } elsif (!$pymodule_inserted && /^[a-zA-Z]+:/) { - print DEST "%{?!python_module:%define python_module() python-%1 python3-%1}\n"; - print DEST $_; - $pymodule_inserted = 1; - } elsif (/^BuildRequires:(\s+)python-(.*)$/) { - if ($2 eq "rpm-macros") { - print DEST $_ unless $macros_inserted; - $macros_inserted = 1; - } elsif ($2 =~ /^backports/ || exists($backports{$2})) { - # skip known backports that won't be available for new pythons - print DEST $_; - } else { - if (!$macros_inserted) { - print DEST "BuildRequires:$1python-rpm-macros\n"; - $macros_inserted = 1; - } - print DEST "BuildRequires:$1%{python_module $2}\n"; - } - } elsif (!$macros_inserted && /^BuildRequires:(\s+)(.*)$/) { - print DEST "BuildRequires:$1python-rpm-macros\n"; - print DEST $_; - $macros_inserted = 1; - } elsif (/^%description/ && !$pysub_found) { - print DEST "%python_subpackages\n\n"; - print DEST $_; - $pysub_found = 1; - } elsif (/^python setup\.py build/) { - print DEST "%python_build\n"; - } elsif (/^(CFLAGS="%\{optflags\}") python setup\.py build/) { - print DEST "export $1\n"; - print DEST "%python_build\n"; - } elsif (/^python setup\.py install.*/) { - print DEST "%python_install\n"; - } elsif (/^python (.*)$/) { - print DEST "%python_exec $1\n"; - } elsif (/^%files(.*)$/) { - if ($1 =~ /%\{?python_files/) { - print DEST $_; - } else { - print DEST "%files %{python_files$1}\n"; - } - } elsif (/%\{!\?python_site/) { - # pass - } elsif (/^%if 0%\{\?suse_version\} && 0%\{\?suse_version\} <= 1110$/) { - $oldsuse = 1; - } elsif (/^%if 0%\{\?suse_version\} > 1110$/) { - $oldsuse = 2; - } elsif (/^%python_subpackages/) { - print DEST $_ unless $pysub_found; - $pysub_found = 1; - } else { - $_ =~ s/py_ver/python_version/; - $_ =~ s/py3_ver/python3_version/; - $_ =~ s/py([23]?)_(build|install)/python$1_$2/; - print DEST $_; - } -} - -close DEST; -close SOURCE; - -defined $ARGV[1] or rename $DEST, $SOURCE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-1.0.git.1486997542.e9fcc29/python-rpm-macros.spec new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/python-rpm-macros.spec --- old/python-rpm-macros-1.0.git.1486997542.e9fcc29/python-rpm-macros.spec 2017-02-13 15:52:22.000000000 +0100 +++ new/python-rpm-macros-1.0.git.1487869271.c6e9bfc/python-rpm-macros.spec 2017-02-23 18:01:11.000000000 +0100 @@ -29,6 +29,7 @@ Provides: python3-rpm-macros #!BuildIgnore: python-rpm-macros BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package contains SUSE RPM macros for Python build automation.
participants (1)
-
root@hilbertn.suse.de