mock-chroot> find /usr/lib*/python*/site-packages/{hgext,mercurial} | xargs rpm -qf | grep " not " file /usr/lib64/python2.7/site-packages/hgext/highlight is not owned by any package file /usr/lib64/python2.7/site-packages/hgext/zeroconf is not owned by any package file /usr/lib64/python2.7/site-packages/hgext/convert is not owned by any package file /usr/lib64/python2.7/site-packages/hgext/inotify is not owned by any package file /usr/lib64/python2.7/site-packages/hgext/inotify/linux is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/hgweb is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/help is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/paper is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/raw is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/gitweb is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/coal is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/atom is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/static is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/monoblue is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/spartan is not owned by any package file /usr/lib64/python2.7/site-packages/mercurial/templates/rss is not owned by any package
Saw your note on the mailing list. You could also use the builtin recursion of directories in the %files section like this: %{python_sitearch}/mercurial/ %{python_sitearch}/hgext/ That will catch those two directories and all the files (and directories) inside of them.
No, this won't work. That's what I had done originally.
No, you didn't. For the directories, you had this: %dir %{python_sitearch}/mercurial %dir %{python_sitearch}/hgext %dir tells rpm to not recurse the directories.