<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/python, branch 2017.02</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2017.02</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2017.02'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2017-02-23T22:03:19+00:00</updated>
<entry>
<title>package/python: apply unicode config to host build</title>
<updated>2017-02-23T22:03:19+00:00</updated>
<author>
<name>Chris Smart</name>
<email>mail@csmart.io</email>
</author>
<published>2017-02-22T03:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=01464f56bd8a61b461fce4c108be299a47a6a405'/>
<id>urn:sha1:01464f56bd8a61b461fce4c108be299a47a6a405</id>
<content type='text'>
Currently the host build of Python 2 defaults to narrow unicode (UCS2),
ignoring the BR2_PACKAGE_PYTHON_UCS4 configuration option which may be
set to wide (UCS4).

This results in host and target Python packages which are incompatible
in subtle ways.

For example, installing wheels into the target fails when they are made
with the host python, citing incompatibility (as can be seen by the
package tags which may be "cp27u-manylinux1" instead of
"cp27mu-manylinux1").

Compiling the host Python 2 with the same UCS configuration as the
target ensures that the packages are compatible (and the tags match).

This does not affect Python 3 as support for narrow unicode was
deprecated in version 3.3, see https://www.python.org/dev/peps/pep-0393/

Thanks to Tony Breeds &lt;tony@bakeyournoodle.com&gt; for reporting this.

Signed-off-by: Chris Smart &lt;mail@csmart.io&gt;
[Thomas: add comment in the code.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>package/python: security bump version to 2.7.13</title>
<updated>2016-12-22T09:27:31+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2016-12-22T06:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=5df0bfa9a0f36c6533e95621363d004bd36785fa'/>
<id>urn:sha1:5df0bfa9a0f36c6533e95621363d004bd36785fa</id>
<content type='text'>
Rebased patches 004 &amp; 010.

Changelog:
https://hg.python.org/cpython/raw-file/v2.7.13/Misc/NEWS

Fixes CVE-2016-2183 &amp; CVE-2016-1000110.

This bump also fixes the host build with openssl 1.1.0,
http://patchwork.ozlabs.org/patch/696139/ is not needed anymore.

Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>python: fix double format detection</title>
<updated>2016-11-09T20:57:18+00:00</updated>
<author>
<name>Jérôme Pouiller</name>
<email>jezz@sysmic.org</email>
</author>
<published>2016-11-09T09:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2a6001f17aba3f405f1aa95b3d95a553761d9b03'/>
<id>urn:sha1:2a6001f17aba3f405f1aa95b3d95a553761d9b03</id>
<content type='text'>
Python is not able to detect if compiler double representation is
compliant with IEE754:

  checking whether C doubles are little-endian IEEE 754 binary64... no
  checking whether C doubles are big-endian IEEE 754 binary64... no
  checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no

Accordingly 'legacy' mode isused. It is possible to check this at
runtime by check if 'sys.float_repr_style' contains 'short' or
'legacy'. Calculus correctness is not garanteed with 'legacy'.

Problem is better described here:

  http://stackoverflow.com/questions/29920294/what-causes-pythons-float-repr-style-to-use-legacy
  https://bugs.python.org/issue7117

However, all gcc architecture use a representation compliant with
IEE754. So, we can enable it unconditionnaly.

Signed-off-by: Jérôme Pouiller &lt;jezz@sysmic.org&gt;
[Thomas: adjust condition to avoid usage of qstrip, suggested by Baruch.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python: do not use hg or svn when available</title>
<updated>2016-09-18T15:11:38+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-08-31T20:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=d0d9ba275a89cf3c71eda822d5ebf30c348ec6c7'/>
<id>urn:sha1:d0d9ba275a89cf3c71eda822d5ebf30c348ec6c7</id>
<content type='text'>
During the execution of its configure script, Python tries to find an
available "hg" and "svn" installation, and if available, will try to use
them to get information from the version control system. To do this, it
tries to communicate over the network, potentially over ports that are
blocked, causing the build to halt. This was reported by a user as part
of bug #7802.

To solve this, we simply make the Python script use /bin/false as the
"hg" and "svn" programs.

Fixes bug #7802 for the python package.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>packages: use the &lt;PKG&gt;_TARGET_FINALIZE_HOOKS</title>
<updated>2016-07-05T13:53:05+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-06-22T19:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=50adab522c0fbf1c99b904b8513200b114eb4a0b'/>
<id>urn:sha1:50adab522c0fbf1c99b904b8513200b114eb4a0b</id>
<content type='text'>
Register package-specific target-finalize hooks with the
newly-introduced &lt;PKG&gt;_TARGET_FINALIZE_HOOKS.

This incidentally fixes luarocks, which was registering target-finalize
hooks even when it was not enabled.

To be noted, the skeleton package is not converted, because it is not
optional, we always have it; so its hooks would always be registered
anyway. Besides, the followup patches would render this conversion moot
anyway, since those hooks would be spread across the various skeleton
packages.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: Romain Naour &lt;romain.naour@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>package/python: Fix rebased patch 011-remove-python-symlink.patch</title>
<updated>2016-06-30T10:22:38+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2016-06-30T04:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4e1b3235c2fc480414c4a2ad59d9db1cafd9d2ae'/>
<id>urn:sha1:4e1b3235c2fc480414c4a2ad59d9db1cafd9d2ae</id>
<content type='text'>
While rebasing one line was accidently not removed, this patch fixes

http://autobuild.buildroot.net/results/018/018303a5d551aaa6c91013ab0352437e9a2c28bc/
Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>package/python: bump version to 2.7.12</title>
<updated>2016-06-29T20:09:51+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2016-06-29T18:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=d779e82840e3c9d58d86957d412fa6098e2a7157'/>
<id>urn:sha1:d779e82840e3c9d58d86957d412fa6098e2a7157</id>
<content type='text'>
Rebased 011-remove-python-symlink.patch

[Peter: correct .hash file comment as pointed out by Baruch]
Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>python/python3: globalize *.pyc files compilation</title>
<updated>2016-05-26T20:07:35+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2016-05-17T21:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=549bbba67f5c1656f566b08911aa553e57dc3f59'/>
<id>urn:sha1:549bbba67f5c1656f566b08911aa553e57dc3f59</id>
<content type='text'>
Currently, each python package (be it the python interpreter package
itself or external python modules) is responsible for compiling its
.py into .pyc files. Unfortunately, this is not ideal as some packages
only install .py files without compiling them into .pyc files. In this
case, if the Buildroot configuration specifies to keep only the .pyc
files, the .py files are removed and lost.

To address this, this commit changes the logic by making the
compilation of .pyc files a global operation: the python interpreter
packages register a target finalize hook that is in charge of
compiling all installed .py files.

The *.pyc generation on a per package basis is disabled in the
python-package infrastructure by passing the "--no-compile" option to
setup.py.

The *.pyc generation for the Python interpreter internal modules is
disabled through --disable-pyc-build configure option.

A small helper script is used to perform the compilation, the purpose
of this script is to abort the compilation process if one of the .py
file cannot be compiled. It has been provided by Samuel Martin and
integrated into this commit.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Cc: Samuel Martin &lt;s.martin49@gmail.com&gt;
[Thomas:
 - rework for python 3.5
 - integrate Samuel proposal that allows to detect compilation
   failures.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python/python3: use --no-run-if-empty xargs option</title>
<updated>2016-05-26T20:07:11+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-05-17T21:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=f06f58f8fd443968942e100e3c70a29248b2f368'/>
<id>urn:sha1:f06f58f8fd443968942e100e3c70a29248b2f368</id>
<content type='text'>
As suggested by Samuel Martin, this commit adds the option
--no-run-if-empty xargs option to the "find ... | xargs ..." logic used
in the python and python3 target-finalize hooks to remove py/pyc/pyo
files. This ensures that the command doesn't fail if there are no files
matching the pattern.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python: remove *.pyo files</title>
<updated>2016-05-17T20:47:33+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-05-01T20:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=59972daa39fe90de7c353eaa79834571efb4cd08'/>
<id>urn:sha1:59972daa39fe90de7c353eaa79834571efb4cd08</id>
<content type='text'>
Even though we disable the build of .pyo files in the interpreter,
nothing prevents other packages to install them. Since we only want to
keep either .py or .pyc or both, let's add a target finalize hooks
that removes all .pyo files.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
[Thomas: add --no-run-if-empty option to xargs, as suggested by Samuel.]
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
</content>
</entry>
</feed>
