summaryrefslogtreecommitdiff
path: root/pythonname.attr
blob: bce0ac058a9382cd030224e7f78f09d82a7cf736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%__pythonname_provides() %{lua:
    local python = require 'openEuler.srpm.python'
    local name = rpm.expand('%{name}')
    local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')
    local provides = python.python_altprovides_once(name, evr)
    -- provides is either an array/table or nil
    -- nil means the function was already called with the same arguments:
    --   either with another file in %1 or manually via %py_provides
    if provides then
      for i, provide in ipairs(provides) do
          print(provide .. ' ')
        end
    end
}

%__pythonname_obsoletes() %{nil}

%__pythonname_path ^/