New submission from Vinay Sajip <[email protected]>:
Some installation locations are platform-dependent and cannot be categorised
into a small but fixed number of categories. This is particularly true for the
Windows ecosystem - PowerShell, Office, SharePoint all have specific locations
where files need to be installed for interoperability with them.
This can be catered for by a pre-hook for install_data, but some very small
core changes are needed:
1. In the install_data constructor, initialise self.categories to an empty
dictionary.
2. In install_data.expand_categories, add a
"local_vars.update(self.categories)" after the "local_vars = get_paths()"
statement.
Just these small changes are sufficient to allow sufficient control over custom
installation locations. For projects that need custom categories, they just
need to do the necessary setup in an install_data pre-hook:
def pre_install_data(cmd):
cmd.categories['customcategory'] = '/path/for/my/custom/category'
I have this working in the pythonv branch, and if the feature request is
accepted I can work up a patch including changes to docs, tests etc.
----------
assignee: tarek
components: Distutils2, Library (Lib)
messages: 138895
nosy: alexis, eric.araujo, tarek, vinay.sajip
priority: normal
severity: normal
status: open
title: Packaging should provide support for extensible categories
type: feature request
versions: Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com