<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/python3/python3.mk, branch 2016.02</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2016.02</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2016.02'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2015-11-17T22:13:28+00:00</updated>
<entry>
<title>python3: add patch to fix PEP 3147 issue with automake built packages</title>
<updated>2015-11-17T22:13:28+00:00</updated>
<author>
<name>Christophe Vu-Brugier</name>
<email>cvubrugier@fastmail.fm</email>
</author>
<published>2015-11-14T15:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=c3d65a4dad707db83122ac082202f3e8dc70e60f'/>
<id>urn:sha1:c3d65a4dad707db83122ac082202f3e8dc70e60f</id>
<content type='text'>
Packages built with automake use a `py-compile` helper to byte-compile
Python source files. This script uses the "py_compile" module from the
standard library. In turn, the compile() function in the "py_compile"
module invokes the cache_from_source() function provided by importlib.

This commit adds a new patch named "020-importlib-no-pep3147.patch"
that changes cache_from_source() and source_from_cache() in importlib
to get rid of the "__pycache__" directory.

This commit fixes the following import error in kmod when the module
is built for Python 3:

  &gt;&gt;&gt; from kmod import Kmod
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: cannot import name 'Kmod'

Moreover, this commit removes two patches that are no longer necessary
since modifying cache_from_source() and source_from_cache() disables
PEP 3147 for the standard library and distutils / setuptools.

 * 004-old-stdlib-cache.patch
 * 016-distutils-no-pep3147.patch

Signed-off-by: Christophe Vu-Brugier &lt;cvubrugier@fastmail.fm&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Tested-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: bump to version 3.4.3</title>
<updated>2015-04-27T22:26:46+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2015-04-26T12:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=6afba01e5dc5ed536e33a46d40fd970cfd40f243'/>
<id>urn:sha1:6afba01e5dc5ed536e33a46d40fd970cfd40f243</id>
<content type='text'>
All patches are simply refreshed, except
002-properly-detect-if-python-build.patch which is removed because an
identical fix has been merged upstream:

  https://github.com/python/cpython/commit/e128ea78e5964929ca902bebc07c242d58609dfc

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>python3: make the ossaudiodev module optional</title>
<updated>2015-01-10T15:32:48+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2015-01-10T15:32:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=be6798ace7594eeef8a45d9a2c9e64cf6e3cb5b2'/>
<id>urn:sha1:be6798ace7594eeef8a45d9a2c9e64cf6e3cb5b2</id>
<content type='text'>
Like was done for the 'python' package, also make the ossaudiodev
module optional for 'python3'. ossaudiodev is always disabled for
host-python3, and a new option is added to enable it for the target
python3.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: bump to 3.4.2</title>
<updated>2015-01-02T18:29:53+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-12-28T20:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=144e21f203cf88c1768488d08e201e9579db857e'/>
<id>urn:sha1:144e21f203cf88c1768488d08e201e9579db857e</id>
<content type='text'>
This commit bumps python3 to Python 3.4.2. Two patches had to be
changed slightly to fix some minor conflicts.

PYTHON3_LIBTOOL_PATH = NO was added to prevent Buildroot from trying
to patch a version of libtool for which we don't have matching
patches, which isn't a problem since we're anyway not using the part
of the Python sources that uses libtool (it's the built-in copy of
libffi, and we use the external libffi).

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Tested-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>python3: don't use wcsftime() on uClibc</title>
<updated>2014-11-13T22:40:50+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-11-13T21:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=5ad4ac083276b3504889c39351a56d947f172b5f'/>
<id>urn:sha1:5ad4ac083276b3504889c39351a56d947f172b5f</id>
<content type='text'>
As investigated in bug #7646, wcsftime() doesn't work properly with
uClibc. Until it gets fixed in uClibc, let's tell Python 3 to not use
it. Python 3 will fall back to strftime(), which works properly.

[Peter: fix typo in comment]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Beyonlo &lt;beyonlo@gmail.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>.mk files: bulk aligment and whitespace cleanup of assignments</title>
<updated>2014-10-07T13:00:28+00:00</updated>
<author>
<name>Thomas De Schampheleire</name>
<email>thomas.de.schampheleire@gmail.com</email>
</author>
<published>2014-10-07T07:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=f268f7131b9e0ef90f1135461a719d9f5292853e'/>
<id>urn:sha1:f268f7131b9e0ef90f1135461a719d9f5292853e</id>
<content type='text'>
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire &lt;thomas.de.schampheleire@gmail.com&gt;
Cc: Yann E. Morin &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>python, python3: convert py/pyc removal to TARGET_FINALIZE_HOOKS</title>
<updated>2014-10-05T12:32:41+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-09-30T21:39:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=899d2af16d3a4345a4966e9eb3f552847b57a116'/>
<id>urn:sha1:899d2af16d3a4345a4966e9eb3f552847b57a116</id>
<content type='text'>
Since the removal of py/pyc files is Python-specific, this commit
moves the logic removing those files to python.mk and python3.mk
respectively.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: remove unneeded __pycache__ directories</title>
<updated>2014-10-05T12:32:41+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-09-30T21:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=ce0f19e5f64364125448e91590e4843bb2f79570'/>
<id>urn:sha1:ce0f19e5f64364125448e91590e4843bb2f79570</id>
<content type='text'>
The __pycache__ directories are only needed on PEP3147-enabled
installations, which is not the choice Buildroot has made. However,
during the build process of the target Python, the separation between
the target and host Python is not entirely complete, and starting the
host Python to byte-compile the target Python modules triggers the
compilation of a bunch of __pycache__ directories by the host Python,
which uses a PEP 3147 installation.

For now, simply get rid of those useless directories after the
installation of Python is completed. In the long term, it would be
good to achieve a better isolation between the host and target build
to avoid this issue.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>packages: rename FOO_CONF_OPT into FOO_CONF_OPTS</title>
<updated>2014-10-04T16:54:16+00:00</updated>
<author>
<name>Thomas De Schampheleire</name>
<email>patrickdepinguin@gmail.com</email>
</author>
<published>2014-09-27T19:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=aaffd209fae91a733fe0becb72268f87bf4ea369'/>
<id>urn:sha1:aaffd209fae91a733fe0becb72268f87bf4ea369</id>
<content type='text'>
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\&gt;#&amp;S#g'

Signed-off-by: Thomas De Schampheleire &lt;thomas.de.schampheleire@gmail.com&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: define license and license files</title>
<updated>2014-07-27T12:36:05+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2014-07-23T18:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=d8ba42df87b08b661ba906b8ab906fef65491509'/>
<id>urn:sha1:d8ba42df87b08b661ba906b8ab906fef65491509</id>
<content type='text'>
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
