Skip to contentSkip to conversation

python3-tinydb: add version 3.13.0

PATCH In review Parthiban Nallathambi 2 participants 4 messages May 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-tinydb: add version 3.13.0

Note:
Installation expects _sysconfigdata.py in native python DIR, but python3 doesn't have copy for it. Adding the copy in python3 recipe breaks other python packages.

Patched locally in _prepend specific to tinydb

---
 .../recipes-devtools/python/python-tinydb.inc | 20 +++++++++++++++++++
 .../python/python3-tinydb_3.13.0.bb           |  2 ++
 2 files changed, 22 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-tinydb.inc
 create mode 100644 meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb
meta-python/recipes-devtools/python/python-tinydb.inc new file +20 -0
new file mode 100644
index 000000000..f79daa0f2
@@ -0,0 +1,20 @@
+SUMMARY = "TinyDB is a lightweight document oriented database"
+DESCRIPTION = "\
+TinyDB is a lightweight document oriented database optimized for \
+your happiness. It's written in pure Python and has no external \
+dependencies. The target are small apps that would be blown away \
+by a SQL-DB or an external database server."
+HOMEPAGE = "https://github.com/msiemens/tinydb"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c03ea0a450e50a3a05d5a746504cb2eb"
+
+SRC_URI[md5sum] = "2824877e9ecfd9db5b64fdf079819358"
+SRC_URI[sha256sum] = "a05c4c81e6e867c4f8a2e51c5236d0d897019aa5e9296f5947455b0bdd3c519d"
+
+PYPI_PACKAGE = "tinydb"
+inherit pypi python3-dir
+DEPENDS = "${PYTHON_PN}-pytest-runner-native"
+
+do_install_prepend() {
+	install -m 0644 ${WORKDIR}/recipe-sysroot-native/usr/lib/python-sysconfigdata/_sysconfigdata.py ${WORKDIR}/recipe-sysroot-native/usr/lib/${PYTHON_DIR}
+}
meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb new file +2 -0
new file mode 100644
index 000000000..8996b2d44
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-tinydb.inc
Signature · 1 line
2.21.0
#1 lore raw

Sorru but no. You should not copy native-specific configuration into target directories. The correct way is to depend on target python3, and fix resulting failures.

Alex

Quoted 59 lines · Parthiban Nallathambi

Note:
Installation expects _sysconfigdata.py in native python DIR, but python3 doesn't have copy for it. Adding the copy in python3 recipe breaks other python packages.

Patched locally in _prepend specific to tinydb

---
.../recipes-devtools/python/python-tinydb.inc | 20 +++++++++++++++++++
.../python/python3-tinydb_3.13.0.bb | 2 ++

2 files changed, 22 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python-tinydb.inc create mode 100644 meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb

meta-python/recipes-devtools/python/python-tinydb.inc new file +20 -0
new file mode 100644
index 000000000..f79daa0f2
@@ -0,0 +1,20 @@
+SUMMARY = "TinyDB is a lightweight document oriented database"
+DESCRIPTION = "\
+TinyDB is a lightweight document oriented database optimized for \
+your happiness. It's written in pure Python and has no external \
+dependencies. The target are small apps that would be blown away \
+by a SQL-DB or an external database server."
+HOMEPAGE = "https://github.com/msiemens/tinydb"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c03ea0a450e50a3a05d5a746504cb2eb"
+
+SRC_URI[md5sum] = "2824877e9ecfd9db5b64fdf079819358"
+SRC_URI[sha256sum] = "a05c4c81e6e867c4f8a2e51c5236d0d897019aa5e9296f5947455b0bdd3c519d"
+
+PYPI_PACKAGE = "tinydb"
+inherit pypi python3-dir
+DEPENDS = "${PYTHON_PN}-pytest-runner-native"
+
+do_install_prepend() {
+    install -m 0644 ${WORKDIR}/recipe-sysroot-native/usr/lib/python-sysconfigdata/_sysconfigdata.py ${WORKDIR}/recipe-sysroot-native/usr/lib/${PYTHON_DIR}
+}
meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb new file +2 -0
new file mode 100644
index 000000000..8996b2d44
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-tinydb.inc
Signature · 7 lines
2.21.0

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

Hello Alex,

Quoted 1 line · Alexander Kanavin

Sorru but no. You should not copy native-specific configuration into target directories. The correct way is to depend on target python3, and fix resulting failures.

It's not copying the file into recipes-sysroot, but into native just for the installation purpose.

Sure, I will add up into python3 and check the resulting failures.

Thanks,
Parthiban N

Quoted 62 lines

Alex

Quoted 59 lines · Parthiban Nallathambi

Note:
Installation expects _sysconfigdata.py in native python DIR, but python3 doesn't have copy for it. Adding the copy in python3 recipe breaks other python packages.

Patched locally in _prepend specific to tinydb

---
.../recipes-devtools/python/python-tinydb.inc | 20 +++++++++++++++++++
.../python/python3-tinydb_3.13.0.bb | 2 ++

2 files changed, 22 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python-tinydb.inc create mode 100644 meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb

meta-python/recipes-devtools/python/python-tinydb.inc new file +20 -0
new file mode 100644
index 000000000..f79daa0f2
@@ -0,0 +1,20 @@
+SUMMARY = "TinyDB is a lightweight document oriented database"
+DESCRIPTION = "\
+TinyDB is a lightweight document oriented database optimized for \
+your happiness. It's written in pure Python and has no external \
+dependencies. The target are small apps that would be blown away \
+by a SQL-DB or an external database server."
+HOMEPAGE = "https://github.com/msiemens/tinydb"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c03ea0a450e50a3a05d5a746504cb2eb"
+
+SRC_URI[md5sum] = "2824877e9ecfd9db5b64fdf079819358"
+SRC_URI[sha256sum] = "a05c4c81e6e867c4f8a2e51c5236d0d897019aa5e9296f5947455b0bdd3c519d"
+
+PYPI_PACKAGE = "tinydb"
+inherit pypi python3-dir
+DEPENDS = "${PYTHON_PN}-pytest-runner-native"
+
+do_install_prepend() {
+    install -m 0644 ${WORKDIR}/recipe-sysroot-native/usr/lib/python-sysconfigdata/_sysconfigdata.py ${WORKDIR}/recipe-sysroot-native/usr/lib/${PYTHON_DIR}
+}
meta-python/recipes-devtools/python/python3-tinydb_3.13.0.bb new file +2 -0
new file mode 100644
index 000000000..8996b2d44
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-tinydb.inc
Signature · 7 lines
2.21.0

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#3 lore raw
Quoted 2 lines · Parthiban Nallathambi

It's not copying the file into recipes-sysroot, but into native just for the installation purpose.

That was a bit hasty reply, yes.

Still, as we are installing a target package, we need the target sysconfigdata, not the native one. We specifically patch native python to pick it up:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch

Alex