RE: [Distutils] suggestions for distutil

I like distutils, it is a very good tools but I have some suggestions:
- data_files are copied directly to the python lib directory while python modules are copied in site-packages. I would find more logical to copy data file also in site-packages, so that all your product data is available in one place in the python directory.
Funny, I have a subclass in mxSetup.py (see e.g. egenix-mx-base) which does just that.
Would it be possible to contribute it to distutils ?
I imagine it is not possible to break the existing behaviour. But it is probably possible to specify in the doc that is is best to copy to 'Lib/site-packages/...'
I found the data_files handling pretty useless, which is why I wrote my own version. However, people are probably relying on the existing behaviour, so the only way to change defaults is by providing options which let you change them in e.g. setup.cfg.
- the documentation says how to install data file but not how to use
Indeed. them
from inside a python module. How do I fetch my data files ?
If you install them inside a Python package it's really easy to get at them, because the path to the package's root dir is listed in the module as attribute.
If I have a code sample in the documentation that explains how to do it, it will be even easier. :-) It is not that I am lazy (I am), but I would like a documented supported way. I am afraid any attempt I make to code this would not be portable.
- I would like my module to be compiled/installed with optimisation by default. Is it possible ?
The install command let's you pass in a parameter:
--optimize (-O) also compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]
Yes, but I want my installed module to be optimised by default. Is this possible without tweaking too much with setup.py ? I would have imagine that standard python install would optimise everything.
- how do I uninstall ? 'python setup.py uninstall' does not work.
That's true. See mxSetup.py for a way to implement that command.
Is mxSetup a complete rewrite, or just some improvement over setup.py ? Is it possible to contribute to distutils ? regards, Philippe ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/
participants (1)
-
Philippe FREMY