Blame SOURCES/pythonname.attr

5cdac4
%__pythonname_provides() %{lua:
5cdac4
    local python = require 'fedora.srpm.python'
5cdac4
    -- this macro is called for each file in a package, the path being in %1
5cdac4
    -- but we don't need to know the path, so we would get for each file: Macro %1 defined but not used within scope
5cdac4
    -- in here, we expand %name conditionally on %1 to suppress the warning
5cdac4
    local name = rpm.expand('%{?1:%{name}}')
5cdac4
    local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')
5cdac4
    local provides = python.python_altprovides_once(name, evr)
5cdac4
    -- provides is either an array/table or nil
5cdac4
    -- nil means the function was already called with the same arguments:
5cdac4
    --   either with another file in %1 or manually via %py_provide
5cdac4
    if provides then
5cdac4
      for i, provide in ipairs(provides) do
5cdac4
          print(provide .. ' ')
5cdac4
        end
5cdac4
    end
5cdac4
}
5cdac4
5cdac4
%__pythonname_path ^/