Skip to contentSkip to conversation

python-markupsafe: allow build as host package

PATCH Superseded Erico Nunes 3 participants 6 messages Jan 26, 2015 – Jan 28, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 python-markupsafe: allow build as host package

python-markupsafe is a dependency for python-jinja2, which can be used during build time as a host tool to generate code based on templates. This package is being added host package support mostly to allow host-python-jinja2 to build.
This has been tested to build and work correctly as a host tool as well.

---
 package/python-markupsafe/python-markupsafe.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-markupsafe/python-markupsafe.mk +1 -0
index 9c7eb14..c815728 100644
@@ -12,3 +12,4 @@ PYTHON_MARKUPSAFE_LICENSE = BSD-3c
 PYTHON_MARKUPSAFE_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 2/2 python-jinja2: allow build as host-package

Jinja2 is a general purpose templating language for python and can be required during build time for python scripts that generate code.

While currently there are no in-tree Buildroot packages which depend on host-python-jinja2, I'm currently having to deal with a proprietary software build system that requires it.

I have tested that it builds and works correctly as a host python package for a Buildroot host-python and someone else might require it, so I'm proposing its inclusion.

python-jinja2 for target builds fine without python-markupsafe as a build dependency, but when building host-python-jinja2 without host-python-markupsafe installed, the python package manager tries to download and install it.
To avoid that and install host-python-markupsafe properly through Buildroot, the host build dependency is needed. Host support for python-markupsafe was submitted in a previous patch from this patchset.

---
 package/python-jinja2/python-jinja2.mk | 2 ++
 1 file changed, 2 insertions(+)
package/python-jinja2/python-jinja2.mk +2 -0
index 49625e3..2105f3a 100644
@@ -10,5 +10,7 @@ PYTHON_JINJA2_SITE = http://pypi.python.org/packages/source/J/Jinja2
 PYTHON_JINJA2_SETUP_TYPE = setuptools
 PYTHON_JINJA2_LICENSE = BSD-3c
 PYTHON_JINJA2_LICENSE_FILES = LICENSE
+HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 python-jinja2: allow build as host-package

Quoted 6 lines · Erico Nunes

Jinja2 is a general purpose templating language for python and can be required during build time for python scripts that generate code.

While currently there are no in-tree Buildroot packages which depend on host-python-jinja2, I'm currently having to deal with a proprietary software build system that requires it.

Forgot to mention in my last review: in that case, you should also add a
Config.in.host for it (and update package/Config.in.host).

Quoted 8 lines

I have tested that it builds and works correctly as a host python package for a Buildroot host-python and someone else might require it, so I'm proposing its inclusion.

python-jinja2 for target builds fine without python-markupsafe as a build dependency, but when building host-python-jinja2 without host-python-markupsafe installed, the python package manager tries to download and install it.

Good explanation! :-)

However, this should probably be added as a comment in the .mk file as well -
perhaps a bit shorter, e.g.:

# In host build, setup.py tries to download markupsafe if it is not installed

Regards,
Arnout

Quoted 22 lines

To avoid that and install host-python-markupsafe properly through Buildroot, the host build dependency is needed. Host support for python-markupsafe was submitted in a previous patch from this patchset.

---
 package/python-jinja2/python-jinja2.mk | 2 ++
 1 file changed, 2 insertions(+)
package/python-jinja2/python-jinja2.mk +2 -0
index 49625e3..2105f3a 100644
@@ -10,5 +10,7 @@ PYTHON_JINJA2_SITE = http://pypi.python.org/packages/source/J/Jinja2
 PYTHON_JINJA2_SETUP_TYPE = setuptools
 PYTHON_JINJA2_LICENSE = BSD-3c
 PYTHON_JINJA2_LICENSE_FILES = LICENSE
+HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH v2 2/2 python-jinja2: allow build as host-package

Dear Arnout Vandecappelle,

Quoted 6 lines · Arnout Vandecappelle
Quoted 3 lines

While currently there are no in-tree Buildroot packages which depend on host-python-jinja2, I'm currently having to deal with a proprietary software build system that requires it.

Forgot to mention in my last review: in that case, you should also add a
Config.in.host for it (and update package/Config.in.host).

Why ? If it's merely used as a build dependency of another package, I don't see why we should have a menuconfig entry for it. Indeed, having a host-python-ninja2 package with no users in-tree is weird, but I don't think cluttering the "Host utilities" menu with such packages is the appropriate solution here.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 2/2 python-jinja2: allow build as host-package

Quoted 8 lines · Thomas Petazzoni

Dear Arnout Vandecappelle,

Quoted 4 lines · Arnout Vandecappelle
Quoted 3 lines

While currently there are no in-tree Buildroot packages which depend on host-python-jinja2, I'm currently having to deal with a proprietary software build system that requires it.

Quoted 8 lines
Quoted 2 lines

Forgot to mention in my last review: in that case, you should also add a
Config.in.host for it (and update package/Config.in.host).

Why ? If it's merely used as a build dependency of another package, I don't see why we should have a menuconfig entry for it. Indeed, having a host-python-ninja2 package with no users in-tree is weird, but I don't think cluttering the "Host utilities" menu with such packages is the appropriate solution here.

Hm I guess you're right. So Erico, forget I mentioned it.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

PATCH v2 2/2 python-jinja2: allow build as host-package

Hi Thomas and Arnout,

Quoted 18 lines · Arnout Vandecappelle
Quoted 8 lines · Thomas Petazzoni

Dear Arnout Vandecappelle,

Quoted 4 lines · Arnout Vandecappelle
Quoted 3 lines

While currently there are no in-tree Buildroot packages which depend on host-python-jinja2, I'm currently having to deal with a proprietary software build system that requires it.

Quoted 8 lines
Quoted 2 lines

Forgot to mention in my last review: in that case, you should also add a
Config.in.host for it (and update package/Config.in.host).

Why ? If it's merely used as a build dependency of another package, I don't see why we should have a menuconfig entry for it. Indeed, having a host-python-ninja2 package with no users in-tree is weird, but I don't think cluttering the "Host utilities" menu with such packages is the appropriate solution here.

Quoted 5 lines

Hm I guess you're right. So Erico, forget I mentioned it.

Regards,
Arnout

I'll just add the comment in the .mk file as suggested by Arnout in the other reply and resubmit then.

Thank you for your replies.

Erico