Skip to contentSkip to conversation

pycrypto: Add recipe to have support on python3

PATCH Superseded Ricardo Silva 2 participants 6 messages Jan 4, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pycrypto: Add recipe to have support on python3

The pycrypto module sources can be used for both python2 and python3, but a recipe for python3 was missing, so add it.

Recipe is basically the same as for python2 (python-pycrypto_2.6.1.bb), but using distutils3 instead.

---
 .../recipes-devtools/python/python3-pycrypto_2.6.1.bb       | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb new file +13 -0
new file mode 100644
index 000000000..2878c8599
@@ -0,0 +1,13 @@
+inherit distutils3
+require python-pycrypto.inc
+
+SRC_URI += "file://cross-compiling.patch \
+            file://CVE-2013-7459.patch \
+           "
+
+# We explicitly call distutils_do_install, since we want it to run, but
+# *don't* want the autotools install to run, since this package doesn't
+# provide a "make install" target.
+do_install() {
+       distutils3_do_install
+}
Signature · 1 line
2.15.1
#1 lore raw
Quoted 21 lines · Ricardo Silva

The pycrypto module sources can be used for both python2 and python3, but a recipe for python3 was missing, so add it.

Recipe is basically the same as for python2 (python-pycrypto_2.6.1.bb), but using distutils3 instead.

---
.../recipes-devtools/python/python3-pycrypto_2.6.1.bb | 13 +++++++++++++

1 file changed, 13 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb

meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb new file +0 -0
new file mode 100644
index 000000000..2878c8599

meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb line 6

Quoted 6 lines
meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb new file +6 -0
@@ -0,0 +1,13 @@
+inherit distutils3
+require python-pycrypto.inc
+
+SRC_URI += "file://cross-compiling.patch \
+            file://CVE-2013-7459.patch \
+

These will not be picked up as they are in "python-pycrypto" directory (not in “files” or “python3-pycrypto”, etc.). This will result in a fetcher failure.

Rather than duplicate the SRC_URI in both python2- and python3- recipes, we should add them to python-pycrypto.inc and add the following to python-pycrypto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Quoted 16 lines
meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb new file +7 -0
          "
+
+# We explicitly call distutils_do_install, since we want it to run, but
+# *don't* want the autotools install to run, since this package doesn't
+# provide a "make install" target.
+do_install() {
+       distutils3_do_install
+}
Signature · 7 lines
2.15.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#2 lore raw

Hi Tim,

Thanks for reviewing.

Quoted 15 lines · Tim Orling
Quoted 15 lines · Ricardo Silva

The pycrypto module sources can be used for both python2 and python3, but a recipe for python3 was missing, so add it.

Recipe is basically the same as for python2 (python-pycrypto_2.6.1.bb), but using distutils3 instead.

---
.../recipes-devtools/python/python3-pycrypto_2.6.1.bb | 13 +++++++++++++

1 file changed, 13 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb

Quoted 14 lines

meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb line 6

Quoted 12 lines
meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb new file +6 -0
new file mode 100644
index 000000000..2878c8599
@@ -0,0 +1,13 @@
+inherit distutils3
+require python-pycrypto.inc
+
+SRC_URI += "file://cross-compiling.patch \
+            file://CVE-2013-7459.patch \
+

These will not be picked up as they are in "python-pycrypto" directory (not in “files” or “python3-pycrypto”, etc.). This will result in a fetcher failure.

You're right.
I had a leftover files that made my tests pass. Should have tested with a clean tree.

Quoted 5 lines

Rather than duplicate the SRC_URI in both python2- and python3- recipes, we should add them to python-pycrypto.inc and add the following to python-pycrypto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Agree.
Shall I send a v2 with your suggested changes?

Regards,

Ricardo Silva

#3 lore raw
Quoted 12 lines · Ricardo Silva
Quoted 6 lines

Rather than duplicate the SRC_URI in both python2- and python3- recipes, we should add them to python-pycrypto.inc and add the following to python-pycrypto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Agree.
Shall I send a v2 with your suggested changes?

Yes, please. If you don’t mind (it will need to remove the extra SRC_URI lines from python2 recipe, add the SRC_URI lines and FILESEXTRAPATHS to .inc and then add the python3 recipe).

Quoted 3 lines

Regards,

Ricardo Silva

#4 lore raw

Hi Tim,

Quoted 6 lines · Tim Orling
Quoted 6 lines · Ricardo Silva
Quoted 4 lines

Rather than duplicate the SRC_URI in both python2- and python3- recipes, we should add them to python-pycrypto.inc and add the following to python-pycrypto.inc

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Agree.
Shall I send a v2 with your suggested changes?

Yes, please. If you don’t mind (it will need to remove the extra SRC_URI lines from python2 recipe, add the SRC_URI lines and FILESEXTRAPATHS to .inc and then add the python3 recipe).

Glad to. You mean the changes should be split over a patch series, or OK to have a single patch with all the changes?

Also note that the .inc file already had :

	FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
so I would just change that to:
	FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:"

Regards,

Ricardo Silva

#5 lore raw
Quoted 15 lines · Ricardo Silva

Hi Tim,

Quoted 9 lines · Tim Orling
Quoted 9 lines · Ricardo Silva
Quoted 6 lines

Rather than duplicate the SRC_URI in both python2- and python3- recipes, we should add them to python-pycrypto.inc and add the following to python-pycrypto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

Agree.
Shall I send a v2 with your suggested changes?

Yes, please. If you don’t mind (it will need to remove the extra SRC_URI lines from python2 recipe, add the SRC_URI lines and FILESEXTRAPATHS to .inc and then add the python3 recipe).

Glad to. You mean the changes should be split over a patch series, or OK to have a single patch with all the changes?

Single patch touching all three files is fine.

Quoted 5 lines

Also note that the .inc file already had :

	FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
so I would just change that to:
	FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycrypto:”

Correct. As ${PN} would resolve to python3-pycrypto and not work as intended :)

Quoted 3 lines

Regards,

Ricardo Silva