[Distutils] 3.3 / packaging - support for Windows installation locations

Vinay Sajip vinay_sajip at yahoo.co.uk
Sat Jun 18 16:18:28 CEST 2011


Alexis Métaireau <alexis <at> notmyidea.org> writes:

> 
> On 06/18/2011 02:26 PM, Vinay Sajip wrote:
> > What's the best way of handling these sorts of situations with Python 3.3
> > packaging?
> Isn't it something that should be handled by the sysconfig module? 
> (http://docs.python.org/dev/library/sysconfig.html)
> 

Perhaps, but perhaps not. For example, the sysconfig.get_paths() returns a path
like this for the 'data' key:

C:\\Users\\Vinay\\AppData\\Roaming\\Python

This might be fine for many applications, but say you were to install some
Powershell scripts, those would need to live in

C:\\Users\\Vinay\\Documents\\WindowsPowershell

for Powershell to load them automatically. There's only one reference to the
special location path determining code - in PC\bdist_wininst\install.c - which
appears to be for executable installers only.

This could in theory be handled by a project-specific post-installation step
(which could e.g. be in Python code bundled with the project), which could be
declared in setup.cfg and invoked by pysetup3 after the installation actions. Is
there such a provision? If so, I couldn't find it, but perhaps I missed it and
someone could point it out to me.

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list