Sorry I had completely forgotten about this thing :-/
The setup.py variant is less ugly than the previous ones, but as you note the setup.py itself is flawed for the purposes of in-tree building. And the otherwise "clean" option of splitting rpm-python out of rpm itself would make rpm version upgrades absolutely hideous.
It'd be better to fix up setup.py to properly support in-tree building instead of hacking around it. Somebody more experienced with python distutils than me might have a better chance of getting it right.
Sorry I had completely forgotten about this thing :-/
The setup.py variant is less ugly than the previous ones, but as you note the setup.py itself is flawed for the purposes of in-tree building. And the otherwise "clean" option of splitting rpm-python out of rpm itself would make rpm version upgrades absolutely hideous.
It'd be better to fix up setup.py to properly support in-tree building instead of hacking around it. Somebody more experienced with python distutils than me might have a better chance of getting it right.