Skip to content

Commit

Permalink
Merge pull request #79 from bnavigator/fix-subpackage-default
Browse files Browse the repository at this point in the history
Also rewrite subpackage_only default providers
  • Loading branch information
mcepl authored Nov 23, 2020
2 parents 6bb5f69 + c99847c commit b4a92b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ main headers section.

* __`%python_subpackage_only`__. Undefined by default. If you want to generate `<flavor>-modname`
subpackages for a non-python main package, make sure to `%define python_subpackage_only 1` before
`%python_subpackages` and use `-n %{python_flavor}-modname` for section headers.
`%python_subpackages` and use `-n python-modname` for section headers (except for `%files`, see below).

* __`%python_enable_dependency_generator`__ expands to a define to enable automatic requires generation
of Python module dependencies using egg-info/dist-info metadata. This should go above the
Expand Down
4 changes: 2 additions & 2 deletions macros.lua
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function python_subpackages()
current_flavor = python

-- rescan spec for each flavor
if not is_current_flavor then
if not is_current_flavor or subpackage_only then
local spec, err = io.open(specpath, "r")
if err then print ("could not find spec file at path: " .. specpath) return end

Expand Down Expand Up @@ -370,7 +370,7 @@ function python_subpackages()
if newsection == "files" then
subparam = param:match("%%{python_files%s+(.*)}")
else
subparam = param:match("^%-n%s+%%{python_flavor}%-(.*)$")
subparam = param:match("^%-n%s+python%-(.*)$")
end
if subparam then
local submodname, subsubparam = rpm.expand(subparam):match("^(%S+)%s*(.*)$")
Expand Down

0 comments on commit b4a92b7

Please sign in to comment.