Skip to contentSkip to conversation

python-toml: add host variant of the package

PATCH New Andrey Smirnov 3 participants 7 messages Jul 25, 2017 – Jul 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-toml: add host variant of the package

Add host variant of the package to make it availible to custom host tools that might want to use it.

---
 package/python-toml/python-toml.mk | 2 ++
 1 file changed, 2 insertions(+)
package/python-toml/python-toml.mk +2 -0
index fec113e1c..cd449761b 100644
@@ -11,3 +11,5 @@ PYTHON_TOML_LICENSE = MIT
 PYTHON_TOML_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
+
Signature · 1 line
2.13.3
#1 lore raw

PATCH 1/1 python-toml: add host variant of the package

Hello,

Quoted 4 lines · Andrey Smirnov

Add host variant of the package to make it availible to custom host tools that might want to use it.

Since we still don't have Config.in options for all host packages, I continue to be reluctant to add such patches, because host packages like this are never tested by the autobuilders: there are no target packages that use them.

Best regards,

Thomas

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

PATCH 1/1 python-toml: add host variant of the package

Quoted 6 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Andrey Smirnov

Add host variant of the package to make it availible to custom host tools that might want to use it.

Quoted 6 lines
Quoted 1 line

Since we still don't have Config.in options for all host packages, I continue to be reluctant to add such patches, because host packages like this are never tested by the autobuilders: there are no target packages that use them.

Just to make sure I understand you correctly: are you saying that this patch would be acceptable if, besides the change to .mk file, it also add a dedicated Config.in.host code (e.g. what python-lxml does)? Or is it a hard NO?

Thanks,
Andrey Smirnov

#3 lore raw

PATCH 1/1 python-toml: add host variant of the package

In reply to Thomas Petazzoni
Quoted 6 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Andrey Smirnov

Add host variant of the package to make it availible to custom host tools that might want to use it.

Quoted 6 lines
Quoted 1 line

Since we still don't have Config.in options for all host packages, I continue to be reluctant to add such patches, because host packages like this are never tested by the autobuilders: there are no target packages that use them.

We decided in the BR meeting after FOSDEM this year that host-packages would
only be added if there is either an in-tree user or a user-selectable Config.in.host entry. And that we would be a little more receptive to packages with a Config.in.host entry.

However, these python packages are a bit a special situation. I think usually
it would be OK to expect such packages to be present on the system if they are used by custom host tools. However, when you install python on the target, host-python will be built and any system-installed packages will no longer be used. And I guess that this is the reason why you need this package, right, Andrey?

We recently had this patch that adds host-python as a dependency to libglib2
that runs in the same vein: libglib2 will run a python that it finds in PATH, which sometimes is system-python, sometimes host-python...

So I think we should consider looking for a more fundamental solution. For
example, install host-python{,3} somewhere else than in HOST_DIR/bin, and in the packages that really need it extend PATH=$HOST_PYTHON_DIR:$PATH. That could potentially solve a lot of issues...

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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#4 lore raw

PATCH 1/1 python-toml: add host variant of the package

Quoted 16 lines · Arnout Vandecappelle
Quoted 6 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Andrey Smirnov

Add host variant of the package to make it availible to custom host tools that might want to use it.

Quoted 6 lines
Quoted 1 line

Since we still don't have Config.in options for all host packages, I continue to be reluctant to add such patches, because host packages like this are never tested by the autobuilders: there are no target packages that use them.

Quoted 5 lines

We decided in the BR meeting after FOSDEM this year that host-packages would
only be added if there is either an in-tree user or a user-selectable Config.in.host entry. And that we would be a little more receptive to packages with a Config.in.host entry.

OK, good to know.

Quoted 6 lines

However, these python packages are a bit a special situation. I think usually
it would be OK to expect such packages to be present on the system if they are used by custom host tools. However, when you install python on the target, host-python will be built and any system-installed packages will no longer be used. And I guess that this is the reason why you need this package, right, Andrey?

No, it's actually sort of the opposite problem, for better or worse, the Python code of that custom tool is written to utilize the latest and greatest language so it needs Python 3.6+. I use host-python3 as a way to satisfy that requirement since BR's version is 3.6.1.

Quoted 4 lines

We recently had this patch that adds host-python as a dependency to libglib2
that runs in the same vein: libglib2 will run a python that it finds in PATH, which sometimes is system-python, sometimes host-python...

Heh, I was the submitter of that patch, so yeah, I remember that case :-)

Quoted 5 lines

So I think we should consider looking for a more fundamental solution. For
example, install host-python{,3} somewhere else than in HOST_DIR/bin, and in the packages that really need it extend PATH=$HOST_PYTHON_DIR:$PATH. That could potentially solve a lot of issues...

As I mentioned before, not really my case, but yeah, I think that would solve a bunch of problems with packages like glib2.

Anyway, this is a trivial patch for me to carry around, so it's no big deal, but if it can be acceptable upstream in any shape or form I'd love to get it there.

Thanks,
Andrey Smirnov

#5 lore raw

PATCH 1/1 python-toml: add host variant of the package

On 26-07-17 01:13, Andrey Smirnov wrote:
[snip]

Quoted 3 lines

Anyway, this is a trivial patch for me to carry around, so it's no big deal, but if it can be acceptable upstream in any shape or form I'd love to get it there.

In fact, you can even keep this particular one in your BR2_EXTERNAL. Just
create a file package/python-toml/python-toml.mk with just the eval line and it should work. And of course make sure that that file gets included.

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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#6 lore raw

PATCH 1/1 python-toml: add host variant of the package

Quoted 4 lines · Arnout Vandecappelle

On 26-07-17 01:13, Andrey Smirnov wrote:
[snip]

Quoted 8 lines
Quoted 3 lines

Anyway, this is a trivial patch for me to carry around, so it's no big deal, but if it can be acceptable upstream in any shape or form I'd love to get it there.

In fact, you can even keep this particular one in your BR2_EXTERNAL. Just
create a file package/python-toml/python-toml.mk with just the eval line and it should work. And of course make sure that that file gets included.

Yeah, I was thinking about that as well. Sounds like the best option.

Thanks
Andrey Smirnov