sanity-check fails with namespace packages

  • Open
  • quality assurance status badge
Details
2 participants
  • Hartmut Goebel
  • Lars-Dominik Braun
Owner
unassigned
Submitted by
Hartmut Goebel
Severity
normal
H
H
Hartmut Goebel wrote on 27 Dec 2021 21:49
(name . bug-guix)(address . bug-guix@gnu.org)(name . Lars-Dominik Braun)(address . lars@6xq.net)
1df628db-1c7b-dd86-0b77-cd767fea593d@crazy-compilers.com
Hi,

I just investigated some failing python packages
"python2-zppe-*" packages fail. (Most due to a dependency failing ,
though. Actually failing are python2-zope-testing and python2-zope-event).

These fail due to sanity-check not being able to import "zope" - which
is a namespace package. Both use the "src directory layout" (source is
contained in a sub-directory "src").

This could be solved by fetching a list og namespace-packages and
checking whether a fails import is a namespace-package. Maybe there are
other solution.

try:

     nspkgs = set(dist.get_metadata_lines('namespace_packages.txt'))

except:

    nspkgs = set()

Anyhow, since Python2 is EOL since long, I'm not sure whether it's worth
the effort.

WDYT?

--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
L
L
Lars-Dominik Braun wrote on 28 Dec 2021 15:03
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 52834@debbugs.gnu.org)
YcsZOs7tyfWRRYts@noor.fritz.box
Hi Hartmut,

Toggle quote (3 lines)
> These fail due to sanity-check not being able to import "zope" - which
> is a namespace package. Both use the "src directory layout" (source is
> contained in a sub-directory "src").
As far as I see PEP 420 (implicit namespace packages) is supported by
Python >=3.3 only, so I’m not sure the packages would work even if we
disabled 'sanity-check, do they? Either way, I’m in favor of removing
broken Python 2 packages.

Toggle quote (5 lines)
> This could be solved by fetching a list og namespace-packages and
> checking whether a fails import is a namespace-package. Maybe there are
> other solution.
> […]
>      nspkgs = set(dist.get_metadata_lines('namespace_packages.txt'))
Depending on undocumented setuptools behavior should imo be avoided and
– for top_level.txt – phased out if possible.

Cheers,
Lars
?