[Distutils] Creating a new installation layout
tim at gfxmonk.net
Sun Apr 8 13:47:07 CEST 2012
I'm curious, how would one create a new layout? (as in a --layout=deb
alternative). I'd very much like to have a layout that doesn't include
any version information in the path, which both "deb" and "unix" do.
Ideally, output would look pretty much like:
Something simple, without the unnecessary layers of "usr", "local",
"site-packages", "python2.7" etc. The purpose is to be put into a
self-contained archive, so it's completely unnecessary to include such
namespacing (it will never be mixed in with any other files).
Is this possible? not worth it?
Right now to achieve at least version independence on the paths I'm running :
python setup.py install --root="$DISTDIR"
--single-version-externally-managed --install-layout=deb && \
mv "$DISTDIR/usr/lib/"python* "$DISTDIR/usr/lib/python"
which is hacky, but works. And you end up with paths like
"usr/lib/python/dist-packages" inside the archive, which is just
unnecessarily nested for a standalone archive.
More information about the Distutils-SIG