From c6b72853a6de8b71d1b5cd789a12aa934f7ce7c4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 6 Oct 2016 00:05:21 -0700 Subject: setup.py: enable libc bindings optionally (bug 594744) The libc bindings are optional, since ctypes is used as a fallback when they are not available. The libc bindings do not support cross- compilation, therefore it is useful to be able to build them conditionally. This patch adds an option to enable them conditionally, which the ebuild can use by adding the following code to the python_prepare_all function: if use native-extensions; then printf "[build_ext]\nportage-ext-modules=true" >> \ setup.cfg || die fi X-Gentoo-Bug: 594744 X-Gentoo-Bug-URL: https://bugs.gentoo.org/594744 Acked-by: Alexander Berntsen --- README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'README') diff --git a/README b/README index 5e78842c9..311d036f4 100644 --- a/README +++ b/README @@ -13,6 +13,25 @@ Dependencies Python and Bash should be the only hard dependencies. Python 2.7 is the minimum supported version. +Native Extensions +================= + +Portage includes some optional native extensions which can be built +in the source tree by running the following command: + + python setup.py build_ext --inplace --portage-ext-modules + +The following setup.cfg settings can be used to enable building of +native extensions for all invocations of the build_ext command (the +build_ext command is invoked automatically by other build commands): + + [build_ext] + portage-ext-modules=true + +Currently, the native extensions only include libc bindings which are +used to validate LC_CTYPE and LC_COLLATE behavior for EAPI 6. If the +native extensions have not been built, then portage will use ctypes +instead. Licensing and Legalese ======================= -- cgit v1.2.3-65-gdbad