distro-packages/python-rpm-macros: update binary Requires generated for centos
--- a/functions.lua 2017-12-07 11:46:04.000000000 -0800
-+++ b/functions.lua 2018-01-26 12:20:28.000000000 -0800
-@@ -56,10 +56,27 @@
++++ b/functions.lua 2018-01-29 12:17:01.000000000 -0800
+@@ -21,6 +21,10 @@
+ return result
+ end
+
++function is_centos()
++ local s = rpm.expand("%_host_vendor")
++ return s == 'redhat'
++end
+ -- macro replacements
+ SHORT_FLAVORS = {
+ -- ??
+@@ -56,10 +60,23 @@
end
function package_name(flavor, modname, subpkg, append)
+ local compiler_family = rpm.expand("%compiler_family")
+ local mpi_family = rpm.expand("%mpi_family")
+ local ohpc_suffix = rpm.expand("%PROJ_DELIM")
-+ local function is_centos()
-+ local s = rpm.expand("%_host_vendor")
-+ return s == 'redhat'
-+ end
+
+ if string.match(rpm.expand("%name"), mpi_family) then
+ ohpc_suffix = "-" .. mpi_family .. ohpc_suffix
if subpkg and subpkg ~= "" then
name = name .. "-" .. subpkg
end
---- a/macros.lua 2017-12-07 11:46:04.402000000 -0800
-+++ b/macros.lua 2017-12-18 20:26:28.303000000 -0800
+--- a/macros.lua 2017-12-07 11:46:04.000000000 -0800
++++ b/macros.lua 2018-01-29 12:18:15.000000000 -0800
function _python_scan_spec()
+ local compiler_family = rpm.expand("%compiler_family")
end
function python_subpackages()
-@@ -281,7 +285,7 @@
+@@ -118,7 +122,11 @@
+ local function rename_package(package, flavor)
+ if package == "python" or package == flavor then
+ -- specialcase plain "python"
+- package = current_flavor
++ if current_flavor == "python3" and is_centos() then
++ package = "python34"
++ else
++ package = current_flavor
++ end
+ else
+ package = package:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1")
+ package = package:gsub("^python(%W)", current_flavor .. "%1")
+@@ -281,7 +289,7 @@
-- before we start, print Provides: python2-modname
if is_called_python and old_python2 then
