[Buildroot] [PATCH v2] package/python-pycrypto: fix python3.8 compatibility

Romain Naour romain.naour at gmail.com
Tue Apr 21 17:56:07 UTC 2020


Hi James, All,

Le 20/04/2020 à 20:59, James Hilliard a écrit :
> On Mon, Apr 20, 2020 at 8:07 AM Romain Naour <romain.naour at gmail.com> wrote:
>>
>> Apply the patch from Fedora 31 [1][2] to replace the user-space RNG with a
>> thin wrapper to os.urandom. This allow to fixes compatibility with
>> Python 3.8 since the code containing time.clock() is removed.
> I wonder if it would be better to just replace pycrypto with pycryptodome
> which is supposed to be a drop in pycrypto replacement. It should essentially
> be a maintained pycrypto compatible version of pycryptodomex.
> See here for details:
> https://pycryptodome.readthedocs.io/en/latest/src/installation.html#installation

The only python-pycrypto user is crda package (python-pycrypto target and host
variant).
It would be great to switch to python-pycryptodomex and drop this package.
But before that, we have to add a python-pycryptodomex host variant for crda.

>>
>> time.clock() was deprecated in Python 3.3 and removed in Python 3.8.
>>
>> [1] https://src.fedoraproject.org/rpms/python-crypto/c/a5fd7148fb0e9d5526f24feb1bb708bf203480b9?branch=f31
>> [2] https://src.fedoraproject.org/rpms/python-crypto/blob/f31/f/pycrypto-2.6.1-use-os-random.patch
>>
>> Fixes:
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/498144209
>>
>> Signed-off-by: Romain Naour <romain.naour at gmail.com>
>> ---
>> This patch would allow to use python2 and python3.
>> To be backported to Buildroot 2020.02 to fixes the qemu-arm-vexpress-tz defconfig.

But this kind of changes is probably not suitable for 2020.02.x.

Best regards,
Romain



More information about the buildroot mailing list