<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/python3, branch 2016.11</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2016.11</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2016.11'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2016-11-25T22:13:00+00:00</updated>
<entry>
<title>python3: do not use the system OpenSSL in the host variant</title>
<updated>2016-11-25T22:13:00+00:00</updated>
<author>
<name>Nicolas Cavallari</name>
<email>nicolas.cavallari@green-communications.fr</email>
</author>
<published>2016-11-22T13:11:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=fa627738266e5c5c45f6250657ac113cc99df5a3'/>
<id>urn:sha1:fa627738266e5c5c45f6250657ac113cc99df5a3</id>
<content type='text'>
host-python3 currently detect if there is an usable OpenSSL installation
and conditionnaly compiles the 'ssl', '_ssl' and '_hashlib' modules.
This may break compilation if the system's OpenSSL has been updated to
1.1.0 because of a bug in python, see https://bugs.python.org/issue26470
for details.

Unlike Python 2.7, Python 3 unconditionnaly compiles fallbacks for
common hash algorithm, so disabling OpenSSL will still leave Python 3
with implementations of common hash algorithm.

This adds a patch to configure.ac patch to implement a --disable-openssl
option.

Signed-off-by: Nicolas Cavallari &lt;nicolas.cavallari@green-communications.fr&gt;
Tested-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: fix double format detection</title>
<updated>2016-11-09T21:03:54+00:00</updated>
<author>
<name>Jérôme Pouiller</name>
<email>jezz@sysmic.org</email>
</author>
<published>2016-11-09T09:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=7be691623a27087cc89c169e21466a0e66a75eb4'/>
<id>urn:sha1:7be691623a27087cc89c169e21466a0e66a75eb4</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: rework condition to not use strip, as suggested by Baruch.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: move "select" after "bool" in Config.in</title>
<updated>2016-10-09T20:49:31+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-10-09T20:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=01b8d67c50f7adcc78d8afd1b30547812326dd0d'/>
<id>urn:sha1:01b8d67c50f7adcc78d8afd1b30547812326dd0d</id>
<content type='text'>
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>package/python3: add optional support for lzma</title>
<updated>2016-10-09T20:48:42+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2016-10-09T12:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=5d4bdb272644675a54ac4a3e7621273ce72db6b8'/>
<id>urn:sha1:5d4bdb272644675a54ac4a3e7621273ce72db6b8</id>
<content type='text'>
Needed by the upcoming python-mwscrape2slob package.

Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
[Thomas: move "select" after "bool".]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>python3: do not use hg when available</title>
<updated>2016-09-18T15:11:49+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-08-31T20:38:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4f76d86d998e7a13e7bfa32238bcd217fbc96a42'/>
<id>urn:sha1:4f76d86d998e7a13e7bfa32238bcd217fbc96a42</id>
<content type='text'>
During the execution of its configure script, Python 3 tries to find an
available "hg" installation, and if available, will try to use it 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" program.

Fixes bug #7802 for the python3 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/python3: bump to version 3.5.2</title>
<updated>2016-06-29T20:10:39+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2016-06-29T18:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=aa34198824fd4576621af68efd0da4aca32991e1'/>
<id>urn:sha1:aa34198824fd4576621af68efd0da4aca32991e1</id>
<content type='text'>
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>python3: bump to 3.5.1</title>
<updated>2016-05-17T20:46:17+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2016-05-01T20:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=476f5fc8f6eba6ee44ce2e0812a1492609331f7d'/>
<id>urn:sha1:476f5fc8f6eba6ee44ce2e0812a1492609331f7d</id>
<content type='text'>
The major changes in terms of Buildroot packaging are:

 - Due to PEP488, Python no longer generates .pyc (unoptimized) and
   .pyo (optimized) byte-code files. Instead, it generates &lt;foo&gt;.pyc,
   &lt;foo&gt;.opt-1.pyc and &lt;foo&gt;.opt-2.pyc. Therefore, we removed the
   --disable-pyo-build option and kept only the --disable-pyc-build
   option, which completely disables building all .pyc files. In
   addition, since the optimized .opt-X.pyc files don't work if the
   corresponding un-optimized .pyc file is not present, we are for the
   moment unconditionally removing the optimized ones (keeping both
   the unoptimized and optimized ones doubles the required filesystem
   size!). So basically we preserve the behavior we had before this
   commit:

     BR2_PACKAGE_PYTHON3_PY_ONLY -&gt; only *.py
     BR2_PACKAGE_PYTHON3_PYC_ONLY -&gt; only non-optimized *.pyc
     BR2_PACKAGE_PYTHON3_PY_PYC -&gt; both the *.py and non-optimized *.pyc

   To achieve this, the TARGET_FINALIZE_HOOKS are reworked:

    PYTHON3_REMOVE_PY_FILES is responsible for removing *.py files in
    the BR2_PACKAGE_PYTHON3_PYC_ONLY case.

    PYTHON3_REMOVE_PYC_FILES is responsible for removing *.pyc files
    in the BR2_PACKAGE_PYTHON3_PY_ONLY case.

    PYTHON3_REMOVE_OPTIMIZED_PYC_FILES is responsible for removing the
    optimized *.opt-1.pyc and *.opt-2.pyc files, which is done
    unconditionally.

 - The PEP3147 disabling patch had to be significantly reworked due to
   the code having changed heavily. The code was moved into a
   _bootstrap_external.py, which is a "frozen" Python module, i.e a
   module generated into a .h file at compile time using the
   _freeze_importlib program.

 - Due to the above, we now need to regenerate importlib.h at build
   time. Unfortunately, for the target Python _freeze_importlib is
   built for the target, so we can't run it on the build machine. To
   fix this, we copy the _freeze_importlib program from the
   host-python in $(HOST_DIR), and then patch the target python to use
   it. Since the same solution can be used for 'pgen', we do it, and
   avoid having to touch the graminit.{c,h} files.

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>
</feed>
