Skip to contentSkip to conversation

sanity: check for more bits of Python

PATCH In review Martin Jansa 2 participants 4 messages Mar 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sanity: check for more bits of Python

From: Ross Burton <[email protected]>

MJ: icu in master doesn't need distutils anymore, because icu 65.1 currently in dunfell/master doesn't depend on python3-distutils anymore since:
https://github.com/unicode-org/icu/commit/b4d41b0561b6e8de38b99850ce0e4be8ef536bb1

but the icu-64.2 in zeus and openembedded-core/meta/recipes-core/ovmf/ovmf_git.bb still need python3-distutils as described in:
http://lists.openembedded.org/pipermail/openembedded-core/2020-March/293984.html

---
 meta/classes/sanity.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes/sanity.bbclass +7 -5
index 936fe913b4..5c2f8f9d75 100644
@@ -625,13 +625,14 @@ def check_sanity_version_change(status, d):
     # In other words, these tests run once in a given build directory and then 
     # never again until the sanity version or host distrubution id/version changes.
 
-    # Check the python install is complete. glib-2.0-natives requries
-    # xml.parsers.expat
+    # Check the python install is complete. Examples that are often removed in
+    # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu
+    # requires distutils.sysconfig.
     try:
         import xml.parsers.expat
-    except ImportError:
-        status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
-    import stat
+        import distutils.sysconfig
+    except ImportError as e:
+        status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)
 
     status.addresult(check_make_version(d))
     status.addresult(check_patch_version(d))
@@ -667,6 +668,7 @@ def check_sanity_version_change(status, d):
         status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
 
     # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
+    import stat
     tmpdir = d.getVar('TMPDIR')
     status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
     tmpdirmode = os.stat(tmpdir).st_mode
Signature · 1 line
2.20.1
#1 lore raw
Quoted 21 lines · Martin Jansa

From: Ross Burton <[email protected]>

MJ: icu in master doesn't need distutils anymore, because icu 65.1 currently in dunfell/master doesn't depend on python3-distutils anymore since:
https://github.com/unicode-org/icu/commit/b4d41b0561b6e8de38b99850ce0e4be8ef536bb1

but the icu-64.2 in zeus and openembedded-core/meta/recipes-core/ovmf/ovmf_git.bb still need python3-distutils as described in:
http://lists.openembedded.org/pipermail/openembedded-core/2020-March/293984.html

---
 meta/classes/sanity.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes/sanity.bbclass +0 -0
index 936fe913b4..5c2f8f9d75 100644

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 626

Quoted 2 lines
meta/classes/sanity.bbclass +0 -0
@@ -625,13 +625,14 @@ def check_sanity_version_change(status, d):
     # In other words, these tests run once in a given build directory and then
     # never again until the sanity version or host distrubution id/version changes.

s/distrubution/distribution/ (not part of the original patch but maybe worth fixing in a v2).

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 629

Quoted 4 lines
meta/classes/sanity.bbclass +2 -2
-    # Check the python install is complete. glib-2.0-natives requries
-    # xml.parsers.expat
+    # Check the python install is complete. Examples that are often removed in
+    # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu

Stray # left over from reformatting the comment.

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 635

Quoted 9 lines
meta/classes/sanity.bbclass +4 -3
+    # requires distutils.sysconfig.
     try:
         import xml.parsers.expat
-    except ImportError:
-        status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
-    import stat
+        import distutils.sysconfig
+    except ImportError as e:
+        status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)

Should that be the Yocto Project Quick Start? Googling for "yocto getting started guide" doesn't come up with anything.

The version of Yocto Project Quick Start found by google doesn't mention anything about installing python3-distutils though, so maybe it's not the right document...

Quoted 18 lines
meta/classes/sanity.bbclass +1 -1
     status.addresult(check_make_version(d))
     status.addresult(check_patch_version(d))
@@ -667,6 +668,7 @@ def check_sanity_version_change(status, d):
         status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
 
     # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
+    import stat
     tmpdir = d.getVar('TMPDIR')
     status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
     tmpdirmode = os.stat(tmpdir).st_mode
--

2.20.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 45 lines · Andre McCurdy
Quoted 21 lines · Martin Jansa

From: Ross Burton <[email protected]>

MJ: icu in master doesn't need distutils anymore, because icu 65.1 currently in dunfell/master doesn't depend on python3-distutils anymore since:
https://github.com/unicode-org/icu/commit/b4d41b0561b6e8de38b99850ce0e4be8ef536bb1

but the icu-64.2 in zeus and openembedded-core/meta/recipes-core/ovmf/ovmf_git.bb still need python3-distutils as described in:
http://lists.openembedded.org/pipermail/openembedded-core/2020-March/293984.html

---
 meta/classes/sanity.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes/sanity.bbclass +0 -0
index 936fe913b4..5c2f8f9d75 100644

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 626

Quoted 2 lines
meta/classes/sanity.bbclass +0 -0
@@ -625,13 +625,14 @@ def check_sanity_version_change(status, d):
     # In other words, these tests run once in a given build directory and then
     # never again until the sanity version or host distrubution id/version changes.

s/distrubution/distribution/ (not part of the original patch but maybe worth fixing in a v2).

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 629

Quoted 4 lines
meta/classes/sanity.bbclass +2 -2
-    # Check the python install is complete. glib-2.0-natives requries
-    # xml.parsers.expat
+    # Check the python install is complete. Examples that are often removed in
+    # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu

Stray # left over from reformatting the comment.

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 635

Quoted 9 lines
meta/classes/sanity.bbclass +4 -3
+    # requires distutils.sysconfig.
     try:
         import xml.parsers.expat
-    except ImportError:
-        status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
-    import stat
+        import distutils.sysconfig
+    except ImportError as e:
+        status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)
Quoted 6 lines

Should that be the Yocto Project Quick Start? Googling for "yocto getting started guide" doesn't come up with anything.

The version of Yocto Project Quick Start found by google doesn't mention anything about installing python3-distutils though, so maybe it's not the right document...

This is just cherry-pick from master to zeus (I've only updated the commit message).

If you want these issues fixed, then it should be fixed first in master and then backported to zeus.

Quoted 19 lines
Quoted 19 lines
meta/classes/sanity.bbclass +1 -1
     status.addresult(check_make_version(d))
     status.addresult(check_patch_version(d))
@@ -667,6 +668,7 @@ def check_sanity_version_change(status, d):
         status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
 
     # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
+    import stat
     tmpdir = d.getVar('TMPDIR')
     status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
     tmpdirmode = os.stat(tmpdir).st_mode
--

2.20.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 54 lines · Martin Jansa
Quoted 45 lines · Andre McCurdy
Quoted 21 lines · Martin Jansa

From: Ross Burton <[email protected]>

MJ: icu in master doesn't need distutils anymore, because icu 65.1 currently in dunfell/master doesn't depend on python3-distutils anymore since:
https://github.com/unicode-org/icu/commit/b4d41b0561b6e8de38b99850ce0e4be8ef536bb1

but the icu-64.2 in zeus and openembedded-core/meta/recipes-core/ovmf/ovmf_git.bb still need python3-distutils as described in:
http://lists.openembedded.org/pipermail/openembedded-core/2020-March/293984.html

---
 meta/classes/sanity.bbclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/classes/sanity.bbclass +0 -0
index 936fe913b4..5c2f8f9d75 100644

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 626

Quoted 2 lines
meta/classes/sanity.bbclass +0 -0
@@ -625,13 +625,14 @@ def check_sanity_version_change(status, d):
     # In other words, these tests run once in a given build directory and then
     # never again until the sanity version or host distrubution id/version changes.

s/distrubution/distribution/ (not part of the original patch but maybe worth fixing in a v2).

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 629

Quoted 4 lines
meta/classes/sanity.bbclass +2 -2
-    # Check the python install is complete. glib-2.0-natives requries
-    # xml.parsers.expat
+    # Check the python install is complete. Examples that are often removed in
+    # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu

Stray # left over from reformatting the comment.

meta/classes/sanity.bbclass def check_sanity_version_change(status, d): · line 635

Quoted 9 lines
meta/classes/sanity.bbclass +4 -3
+    # requires distutils.sysconfig.
     try:
         import xml.parsers.expat
-    except ImportError:
-        status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
-    import stat
+        import distutils.sysconfig
+    except ImportError as e:
+        status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name)
Quoted 6 lines

Should that be the Yocto Project Quick Start? Googling for "yocto getting started guide" doesn't come up with anything.

The version of Yocto Project Quick Start found by google doesn't mention anything about installing python3-distutils though, so maybe it's not the right document...

Quoted 5 lines

This is just cherry-pick from master to zeus (I've only updated the commit message).

If you want these issues fixed, then it should be fixed first in master and then backported to zeus.

Oh yes, didn't notice it's a backport to zeus. Sorry!

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
meta/classes/sanity.bbclass +1 -1
     status.addresult(check_make_version(d))
     status.addresult(check_patch_version(d))
@@ -667,6 +668,7 @@ def check_sanity_version_change(status, d):
         status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
 
     # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
+    import stat
     tmpdir = d.getVar('TMPDIR')
     status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
     tmpdirmode = os.stat(tmpdir).st_mode
--

2.20.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core