Skip to contentSkip to conversation

python-markupsafe: allow build as host package

PATCH New Erico Nunes 2 participants 3 messages Jan 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 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 v3 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.

---
Changes v2 -> v3:
- Add comment to .mk file as suggested by Arnout Vandecappelle

Changes v1 -> v2:
- Make markupsafe a dependency only for host-python-jinja2

---
 package/python-jinja2/python-jinja2.mk | 3 +++
 1 file changed, 3 insertions(+)
package/python-jinja2/python-jinja2.mk +3 -0
index 49625e3..8440b64 100644
@@ -10,5 +10,8 @@ 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
+# In host build, setup.py tries to download markupsafe if it is not installed
+HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
1.9.1
#2 lore raw

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

In reply to Erico Nunes
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Erico" == Erico Nunes <[email protected]> writes:

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.

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard