[Distutils] Importable wheels using distlib/distil
Thomas Heller
theller at ctypes.org
Thu Mar 28 17:59:45 CET 2013
Am 28.03.2013 17:42, schrieb Paul Moore:
> On 28 March 2013 16:02, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
>> Return this directory. Note that the caller is responsible for
>> deleting this directory and its contents, which might not be
>> possible - e.g. in Windows, if a shared library has been
>> imported and is linked to the running Python process, there will be
>> an open handle to the shared library which will prevent its deletion.
>> """
>
> That's the big issue I have with *any* approach like this. It's
> entirely possible that the directory cannot be deleted, and as a
> result the user ends up with the problem of managing clutter caused by
> this mechanism. Even if the directory is in %TEMP% the user still has
> the issue of clearing up. Consider a buildslave that continually runs
> tests - temp directory clutter is a definite issue in a situation like
> that.
I made an experiment some time ago: It is possible to delete shared
libs containing extension modules imported by Python if the Python
process (after Py_Finalize()) calls FreeLibrary(hmod) in a loop for
every extension until FreeLibrary returns zero; then the shared lib file
can be deleted.
Thomas
More information about the Distutils-SIG
mailing list