Currently, this doesn't work: %pyproject_save_files jaraco.path It errors with: ValueError: Attempted to use a namespaced package with dot in the glob: jaraco.path We could do something useful here instead or at least have an API for namespace packages. An idea I just had is: %pyproject_save_files -N jaraco Which would generate something like: %exclude %dir %{python3_site...}/jaraco %exclude %dir %{python3_site...}/jaraco/__pycache__ %pycached %exclude %{python3_site...}/jaraco/__init__.py %{python3_site...}/jaraco/* (actually expanded)
This is on hold now until the situation wrt the semantics of %exclude is sorted out. Relevant thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2W57QE7HFW5FEDAFMGUFOOL4JKE6N3F/#XOP2CNXLDNT5SRZ67DXPYRBXPLYCWUZ2 (search for my email with %exclude in it in case the anchor does nothing)
An idea how to solve the namespace packages problem. Use (or generate): %pycached %ghost %{python3_sitelib}/jaraco/__init__.py (if present) %dir %{python3_site...}/jaraco %dir %{python3_site...}/jaraco/__pycache__ That way, the individual packages don't conflict (%ghosts don't conflict and directories are co-owned) and don't need to manually require a filesystem package. And we can have __init__.py during %check. Obviously, this only works when the package works on runtime without __init__.py which should be the case for namespace package from this decade.
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/URH4A6JCZCYOFAFPDGCGOLO5YRGZLQYT/
(In reply to Miro Hrončok from comment #0) > Currently, this doesn't work: > > %pyproject_save_files jaraco.path > > It errors with: > > ValueError: Attempted to use a namespaced package with dot in the glob: > jaraco.path Not to self: `%pyproject_save_files jaraco/path` should fail with a similar message now.
As should `%pyproject_save_files jaraco!path`, I guess.
Does ! have any special meaning? Or do you mean any non-glob/non-identifier characters should do this? The idea with / is that I've seen people try it with slashes instead of dots, because the actual files are structured in that way and slash is a directory separator.
No special meaning; I meant all non-glob/non-identifier characters.
(In reply to Miro Hrončok from comment #4) > Not to self: `%pyproject_save_files jaraco/path` should fail with a similar > message now. pyproject-rpm-macros-0-47 added this.