diff mbox

[v3,2/5] Add python3 config directory simlink

Message ID 1360747237-30048-3-git-send-email-kpa_info@yahoo.fr
State Superseded
Headers show

Commit Message

kpa_info@yahoo.fr Feb. 13, 2013, 9:20 a.m. UTC
Add a simlink to alias the python3.3/config-3.3m directory to python3.3/config
in the staging directory

Signed-off-by: Patrick Gerber <kpa_info@yahoo.fr>
---
 package/python3/python3.mk |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Thomas Petazzoni Feb. 13, 2013, 9:33 a.m. UTC | #1
Dear Patrick Gerber,

On Wed, 13 Feb 2013 10:20:34 +0100, Patrick Gerber wrote:
> Add a simlink to alias the python3.3/config-3.3m directory to python3.3/config
> in the staging directory

This description doesn't match what the code is doing. The code creates
a symbolic link in $(HOST_DIR), not $(STAGING_DIR).

Also, this commit log doesn't explain *why* this is needed in the first
place. The commit log only explains what the patch is doing (which we
can easily find out by reading the code), but lacks an explanation of
the underlying reasons.

Thanks,

Thomas
kpa_info@yahoo.fr Feb. 13, 2013, 10:07 a.m. UTC | #2
On 02/13/2013 10:33 AM, Thomas Petazzoni wrote:
> Dear Patrick Gerber,
>
> On Wed, 13 Feb 2013 10:20:34 +0100, Patrick Gerber wrote:
>> Add a simlink to alias the python3.3/config-3.3m directory to python3.3/config
>> in the staging directory
>
> This description doesn't match what the code is doing. The code creates
> a symbolic link in $(HOST_DIR), not $(STAGING_DIR).
>
> Also, this commit log doesn't explain *why* this is needed in the first
> place. The commit log only explains what the patch is doing (which we
> can easily find out by reading the code), but lacks an explanation of
> the underlying reasons.
>
> Thanks,
>
> Thomas
>

When using host python to install an external module, the setup tools 
look for a python3.3/config/pyconfig.h file. With the python3 package 
from buildroot this directory is called config-3.3m. This is why we need 
to alias config to config-3.3m.

Patrick
Thomas Petazzoni Feb. 13, 2013, 10:13 a.m. UTC | #3
Dear Patrick,

On Wed, 13 Feb 2013 11:07:18 +0100, Patrick wrote:

> When using host python to install an external module, the setup tools 
> look for a python3.3/config/pyconfig.h file. With the python3 package 
> from buildroot this directory is called config-3.3m. This is why we need 
> to alias config to config-3.3m.

Thanks. This explanation should go in the commit log, and maybe even as
a comment in the code explaining why the symlink is needed.

Thanks,

Thomas
kpa_info@yahoo.fr Feb. 13, 2013, 10:20 a.m. UTC | #4
On 02/13/2013 11:13 AM, Thomas Petazzoni wrote:
> Dear Patrick,
>
> On Wed, 13 Feb 2013 11:07:18 +0100, Patrick wrote:
>
>> When using host python to install an external module, the setup tools
>> look for a python3.3/config/pyconfig.h file. With the python3 package
>> from buildroot this directory is called config-3.3m. This is why we need
>> to alias config to config-3.3m.
>
> Thanks. This explanation should go in the commit log, and maybe even as
> a comment in the code explaining why the symlink is needed.>

I'll do it.

> Thanks,
>
> Thomas
>
diff mbox

Patch

diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 7551a7b..8af4d50 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -160,6 +160,12 @@  ifneq ($(BR2_PACKAGE_PYTHON),y)
 PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
 endif
 
+define HOST_PYTHON3_INSTALL_SYMLINK
+	ln -fs config-3.3m $(HOST_DIR)/usr/lib/python3.3/config
+endef
+
+HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
+
 ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
 define PYTHON3_REMOVE_MODULES_FILES
 	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \