Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918677 - dev-python/jsonschema-specifications-2023.7.1: ModuleNotFoundError: No module named jsonschema_specifications
Summary: dev-python/jsonschema-specifications-2023.7.1: ModuleNotFoundError: No module...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-27 23:48 UTC by Gentookh
Modified: 2023-12-06 22:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=dev-python/poetry-core-1.7.0::gentoo' (poetry-core-1.7.0.emerge.info.log,7.60 KB, text/plain)
2023-11-28 08:48 UTC, Gentookh
Details
/var/tmp/portage/dev-python/poetry-core-1.7.0/temp/build.log (poetry-core-1.7.0.build.log,5.07 KB, text/plain)
2023-11-28 08:51 UTC, Gentookh
Details
/var/tmp/portage/dev-python/jsonschema-specifications-2023.7.1/temp/build.log (jsonschema-specifications-2023.7.1.build.log,4.44 KB, text/plain)
2023-11-28 08:58 UTC, Gentookh
Details
emerge --info '=dev-python/jsonschema-specifications-2023.7.1' (jsonschema-specifications-2023.7.1.emerge-info.log,8.34 KB, text/plain)
2023-11-28 09:02 UTC, Gentookh
Details
git diff --no-index jsonschema-specifications-2023.7.1*/temp/environment (environment.diff,5.50 KB, text/plain)
2023-11-29 13:30 UTC, Gentookh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gentookh 2023-11-27 23:48:19 UTC
Package installs with only following files:
- METADATA
- RECORD
- WHEEL
- README.rst.bz2

And later on, while installing `dev-python/poetry-core-1.7.0`, I get this:
>ModuleNotFoundError: No module named jsonschema_specifications
Comment 1 Eli Schwartz 2023-11-28 07:19:51 UTC
Please post your `emerge --info` and your build.log from the faulty merge.
Comment 2 Gentookh 2023-11-28 08:38:38 UTC
AMD64 also affected.
Comment 3 Gentookh 2023-11-28 08:48:18 UTC
Created attachment 875861 [details]
emerge --info '=dev-python/poetry-core-1.7.0::gentoo'
Comment 4 Gentookh 2023-11-28 08:51:09 UTC
Created attachment 875862 [details]
/var/tmp/portage/dev-python/poetry-core-1.7.0/temp/build.log
Comment 5 Gentookh 2023-11-28 08:52:18 UTC
Comment on attachment 875861 [details]
emerge --info '=dev-python/poetry-core-1.7.0::gentoo'

Faulty build.
Comment 6 Gentookh 2023-11-28 08:53:50 UTC
Comment on attachment 875862 [details]
/var/tmp/portage/dev-python/poetry-core-1.7.0/temp/build.log

Faulty merge ^
Comment 7 Gentookh 2023-11-28 08:58:29 UTC
Created attachment 875863 [details]
/var/tmp/portage/dev-python/jsonschema-specifications-2023.7.1/temp/build.log

Suspected culprit merge log ^
Comment 8 Gentookh 2023-11-28 09:02:14 UTC
Created attachment 875864 [details]
emerge --info '=dev-python/jsonschema-specifications-2023.7.1'

Suspected culprit merge info ^
Comment 9 Eli Schwartz 2023-11-28 16:22:35 UTC
I cannot reproduce your merge results for jsonschema-specifications.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-28 16:32:29 UTC
1. Please share the output of `env`.
2. Please try extract a stage3 to e.g. /tmp/ or /opt and chroot in, then emerge dev-python/jsonschema-specifications. Does it work? If not, try emulate your existing setup until it breaks.
Comment 11 Gentookh 2023-11-29 13:30:32 UTC
Created attachment 875915 [details]
git diff --no-index jsonschema-specifications-2023.7.1*/temp/environment

I found this peculiarity in environment diff between the healthy system and my case.
Comment 12 Gentookh 2023-11-29 14:39:54 UTC
>I found this peculiarity ...

Updated both machines to have the same distutils-r1.eclass, but still issue happening only on one of them.
Comment 13 Gentookh 2023-11-30 11:43:53 UTC
So far what I've found is that `gpep517 build-wheel ...` produces different wheel archive on healthy and affected machines.

Is there a way to run it with verbose logging?

```
# pwd
/var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1

# gpep517 build-wheel --prefix=/usr --backend hatchling.build --output-fd 0 --wheel-dir /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel
2023-11-30 13:41:53,140 gpep517 INFO Building wheel via backend hatchling.build
2023-11-30 13:41:53,219 gpep517 INFO The backend produced /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl
jsonschema_specifications-2023.11.1-py3-none-any.whl

# unzip -l /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl
Archive:  /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     2800  02-02-2020 00:00   jsonschema_specifications-2023.11.1.dist-info/METADATA
       87  02-02-2020 00:00   jsonschema_specifications-2023.11.1.dist-info/WHEEL
     1057  02-02-2020 00:00   jsonschema_specifications-2023.11.1.dist-info/licenses/COPYING
      391  02-02-2020 00:00   jsonschema_specifications-2023.11.1.dist-info/RECORD
---------                     -------
     4335                     4 files
```
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-11-30 12:44:32 UTC
Could you try running `gpep517 build-wheel` with `--allow-compressed`?

Is your /var/tmp/portage inside a git repository by any chance?

Could you try upgrading hatch-vcs?  Rebuilding hatchling, perhaps?
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-30 13:23:20 UTC
Please also answer my above questions.
Comment 16 Gentookh 2023-11-30 14:40:49 UTC
>Could you try running `gpep517 build-wheel` with `--allow-compressed`?

Nothing changes.

>Is your /var/tmp/portage inside a git repository by any chance?

I have following in root:
```
# ls -a | rg git
_git
.gitignore
```

Which I sometimes use with `GIT_DIR="_git" git ...`
Comment 17 Gentookh 2023-11-30 14:43:06 UTC
(In reply to Sam James from comment #10)
> 1. Please share the output of `env`.

```
# env
COLORTERM=truecolor
DISPLAY=:0
LANG=en_US.utf8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/16/bin
TERM=alacritty
PS1=%B%F{red}%1~ %(!.#.$)%b%f
MAIL=/var/mail/root
LOGNAME=root
USER=root
HOME=/root
SHELL=/bin/zsh
SUDO_COMMAND=/bin/su
SUDO_USER=user
SUDO_UID=1000
SUDO_GID=1000
SHLVL=1
PWD=/var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1
OLDPWD=/
GIT_DISCOVERY_ACROSS_FILESYSTEM=1
EDITOR=vim
LESS=-iSXFR
NUMCPUS=16
NUMCPUSPLUSONE=17
MAKEOPTS=-j17 -l16
EMERGE_DEFAULT_OPTS=--jobs=17 --load-average=16
_=/usr/bin/env
```

> 2. Please try extract a stage3 to e.g. /tmp/ or /opt and chroot in, then
> emerge dev-python/jsonschema-specifications. Does it work? If not, try
> emulate your existing setup until it breaks.

Too cumbersome :)

I have a machine which was built from recent (couple of weeks) stage3 and everything is fine there.
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-11-30 14:45:52 UTC
Could you try "hiding" (renaming/moving away) /.gitignore?
Comment 19 Gentookh 2023-11-30 14:57:46 UTC
(In reply to Michał Górny from comment #18)
> Could you try "hiding" (renaming/moving away) /.gitignore?

Lol, thank you, man!

```
# mv {.,_}gitignore

# pushd /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1/
/var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1 /

# gpep517 build-wheel --prefix=/usr --backend hatchling.build --output-fd 0 --wheel-dir /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel --allow-compressed
2023-11-30 16:55:27,917 gpep517 INFO Building wheel via backend hatchling.build
2023-11-30 16:55:27,996 gpep517 INFO The backend produced /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl

# unzip -l /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl
Archive:  /var/tmp/portage/dev-python/jsonschema-specifications-2023.11.1/work/jsonschema_specifications-2023.11.1-python3_11/wheel/jsonschema_specifications-2023.11.1-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      375  02-02-2020 00:00   jsonschema_specifications/__init__.py
      958  02-02-2020 00:00   jsonschema_specifications/_core.py
     1785  02-02-2020 00:00   jsonschema_specifications/schemas/draft201909/metaschema.json
```
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-11-30 15:54:06 UTC
I've filed an issue for hatch upstream but I can't promise they won't claim it "unsupported".  In either case, I think this is not something we ought to "solve".
Comment 21 Eli Schwartz 2023-12-06 22:35:23 UTC
Sigh... yet again hatchling is broken beyond repair. .gitignore files even for a regular repo are supposed to list the files you *want* to distribute in built installations, but don't want to commit to git. This is totally backwards, but hatchling (by design) won't change.