Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC] Python 3 external packages support
@ 2013-02-11 14:54 Patrick
  2013-02-11 15:09 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick @ 2013-02-11 14:54 UTC (permalink / raw)
  To: buildroot

Dear all,

Buildroot as support for python 2 and python 3. Both could be enabled and installed in the same system. Python 2 is then called "python" and Python 3 "python3". This is working fine. 

Buildroot also had a sub menu with some external python packages. Currently buildroot support to enable them only if you use Python 2. When using Python 3 you could not enable any external package. This is, in my opinion, an issue as some of the proposed packages work fine with python 3.?

Adding the menu is easy to do, but then I have to edit each python packages .mk files to handle both version of python correctly, and here I need your advice:


For example the python-bottle package have the following:

define PYTHON_SERIAL_BUILD_CMDS
??? (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
endef

define PYTHON_SERIAL_INSTALL_TARGET_CMDS
??? (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
endef

To support python 3, I simply have to call "python3" instead of "python". But if I would like to support both version simultaneously I have to do something like this:
If python2 is enabled
??? define command for python2

end if

If python3 is enabled
??? define command for python3

end if

As "define" command are used it start to be tricky has I have to define 3 cases: python2 only, python3 only and both. This would be then repeated for each python package, becoming not clean at all !

So my question is how to make this cleaner ? Any idea or comment is welcome !


Patrick

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-11 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11 14:54 [Buildroot] [RFC] Python 3 external packages support Patrick
2013-02-11 15:09 ` Thomas Petazzoni
     [not found]   ` <1360595860.22602.YahooMailNeo@web171805.mail.ir2.yahoo.com>
     [not found]     ` <20130211162231.0ac06f9c@skate>
2013-02-11 15:40       ` Patrick
2013-02-11 15:42         ` Thomas Petazzoni
2013-02-11 15:45   ` Samuel Martin
2013-02-11 15:54     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox