<div dir="ltr">Take this setup.py that implements setup requirements (requirements needed for setup.py itself to run) <a href="https://bitbucket.org/dholth/setup-requires/src/tip/setup.py" target="_blank">https://bitbucket.org/dholth/setup-requires/src/tip/setup.py</a><div><br></div><div>Require your new build system using that mechanism, by mentioning it in setup.cfg<br><div><br></div><div>Then instead of calling setup() from setuptools at the bottom, emulate the setup.py build system interface documented at <a href="http://pip.readthedocs.org/en/stable/reference/pip_install/#build-system-interface" target="_blank">http://pip.readthedocs.org/en/stable/reference/pip_install/#build-system-interface</a> to invoke new build system. Check to make sure whether pip accepts .dist-info when calling the egg_info command.</div></div><div><br></div><div>Then write a command for new build system that adds the shim setup.py to an sdist.</div><div><br></div><div>Now you have a setup.py that can download and install new-build-system and interoperate with pip, without having to change pip at all.</div></div>