[PATCH 1 of 3 RFC] setup: don't override install_data for package data
Martin Geisler
mg at lazybytes.net
Sun Nov 22 15:46:37 CST 2009
Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:
> # HG changeset patch
> # User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
> # Date 1257425478 -3600
> # Node ID 40a9bb89ffbff69a966089dccd2c8ddeef415eb6
> # Parent 144befb7b585cd9813f82f7edd14bac1791b21bd
> setup: don't override install_data for package data.
>
> Currently, the 'install_data' option is overridden and set from the
> 'install_lib' option.
Yeah, now that you mention it... what's that about? :-)
I don't really understand what this patch does without understanding
that part.
> This prevents installing anything other than package data; use a
> separate 'package_data_files' field on the distribution instead.
>
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -167,10 +167,23 @@ except ImportError:
>
> class install_package_data(install_data):
> def finalize_options(self):
> + self.install_lib = None
> self.set_undefined_options('install',
> - ('install_lib', 'install_dir'))
> + ('install_lib', 'install_lib'))
> install_data.finalize_options(self)
>
> + datafiles = getattr(self.distribution, 'package_data_files', [])
Is this package_data_files a new attribute you've come up with?
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091122/8c81e748/attachment.pgp>
More information about the Mercurial-devel
mailing list