[Distutils] Extending distutils with a package in site-packages?

Akira Kitada akitada at gmail.com
Thu Jan 22 00:35:40 CET 2009


Hi Tarek,

I asked that how can I write 'mydistutils' package pythonic way.
The 'mydistutils' is distutils with only two additional things:
- MyDistribution (Based on Distribution
- bdist_mycmd (Based on Command)

If I copied whole distutils/ package into site-packages/mydistutils,
it should work, but I'm sure this is ugly and a serious kludge.
importing everything of distutils in mydistutils __init__.py might also work,
but I think this is not the way to go.

At the other place, I was suggested to use __path__ to workaround this.
It seems to me a much better than other solutions,
but I would like to know there're any other recommendations before
diving into __path__ solution...


> Do you mean, how to distribute your distutils extension ?
>
> if so, you have to create a package with its own setup.py, and use
> full paths in your import directives.


More information about the Distutils-SIG mailing list