Skip to content

Conversation

@mschubert
Copy link
Contributor

No description provided.

@APN-Pucky
Copy link
Member

I am getting this error now:

>>> Compiling source in /var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2 ...
 * python3_11: running distutils-r1_run_phase distutils-r1_python_compile
 *   Building the wheel for session_info2-0.1.2 via hatchling.build
python3.11 -m gpep517 build-wheel --prefix=/usr --backend hatchling.build --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2-python3_11/wheel
2025-07-31 14:37:44,921 gpep517 INFO Building wheel via backend hatchling.build
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 242, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 238, in main
    return func(args)
           ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 45, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/build.py", line 180, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/build.py", line 58, in build_wheel
    return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
    self.metadata.validate_fields()
  File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 265, in validate_fields
    _ = self.version
        ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 149, in version
    self._version = self._get_version()
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 244, in _get_version
    core_metadata = self.core
                    ^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 187, in core
    metadata_hooks = self.hatch.metadata.hooks
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 1587, in hooks
    raise UnknownPluginError(message)
hatchling.plugin.exceptions.UnknownPluginError: Unknown metadata hook: docstring-description
 * ERROR: dev-python/session-info2-0.1.2::debugscience failed (compile phase):
 *   Wheel build failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3508:  Called distutils-r1_src_compile
 *   environment, line 1692:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  559:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 3151:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2655:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2653:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1030:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line 1674:  Called distutils-r1_python_compile
 *   environment, line 1569:  Called distutils_pep517_install '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2-python3_11/install'
 *   environment, line 2035:  Called die
 * The specific snippet of code:
 *       local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
 * 
 * If you need support, post the output of `emerge --info '=dev-python/session-info2-0.1.2::debugscience'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/session-info2-0.1.2::debugscience'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/session-info2-0.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/session-info2-0.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2'
 * S: '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2'

 * Messages for package dev-python/session-info2-0.1.2:

 * ERROR: dev-python/session-info2-0.1.2::debugscience failed (compile phase):
 *   Wheel build failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3508:  Called distutils-r1_src_compile
 *   environment, line 1692:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  559:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 3151:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2655:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2653:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1030:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line 1674:  Called distutils-r1_python_compile
 *   environment, line 1569:  Called distutils_pep517_install '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2-python3_11/install'
 *   environment, line 2035:  Called die
 * The specific snippet of code:
 *       local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
 * 
 * If you need support, post the output of `emerge --info '=dev-python/session-info2-0.1.2::debugscience'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/session-info2-0.1.2::debugscience'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/session-info2-0.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/session-info2-0.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2'
 * S: '/var/tmp/portage/dev-python/session-info2-0.1.2/work/session_info2-0.1.2'

@APN-Pucky
Copy link
Member

APN-Pucky commented Jul 31, 2025

Seems like dev-python/session-info2 depends on the new hatch-docstring-description? (Unless the error is caused by me parallel testing the ebuilds)

@APN-Pucky
Copy link
Member

APN-Pucky commented Jul 31, 2025

BTW, if you commit the ebuild with pkgdev commit the message should say "dev-python/session-info2: new package, add 0.1.2" instead of just "dev-python/session-info2: add ebuild".

Signed-off-by: Michael Schubert <[email protected]>
@APN-Pucky
Copy link
Member

All 82 errors are the same URLEror as the first listed below:

FAILED tests/test_scaling.py::test_clip[False] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_score_genes.py::test_score_with_reference - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED get/_aggregated.py::scanpy.get._aggregated.aggregate
FAILED plotting/_tools/scatterplots.py::scanpy.plotting._tools.scatterplots.spatial
======================================= 82 failed, 1411 passed, 162 skipped, 173 deselected, 55 xfailed, 300 warnings, 212 errors in 984.40s (0:16:24) ========================================
Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

Unable to join threads to shut down before fork(). This can break multithreading in child processes.

 * ERROR: dev-python/scanpy-1.11.3::debugscience failed (test phase):
 *   pytest failed with python3.11
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_test
 *   environment, line 3536:  Called distutils-r1_src_test
 *   environment, line 1763:  Called _distutils-r1_run_foreach_impl 'python_test'
 *   environment, line  562:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_test'
 *   environment, line 3163:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2667:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2665:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test'
 *   environment, line 1042:  Called distutils-r1_run_phase 'python_test'
 *   environment, line 1686:  Called python_test
 *   environment, line 3423:  Called distutils-r1_python_test
 *   environment, line 1651:  Called epytest
 *   environment, line 2228:  Called die
 * The specific snippet of code:
 *       [[ ${ret} -ne 0 ]] && die -n "pytest failed with ${EPYTHON}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/scanpy-1.11.3::debugscience'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/scanpy-1.11.3::debugscience'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/scanpy-1.11.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/scanpy-1.11.3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/scanpy-1.11.3/work/scanpy-1.11.3'
 * S: '/var/tmp/portage/dev-python/scanpy-1.11.3/work/scanpy-1.11.3'

 * Messages for package dev-python/scanpy-1.11.3:

 * ERROR: dev-python/scanpy-1.11.3::debugscience failed (test phase):
 *   pytest failed with python3.11
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_test
 *   environment, line 3536:  Called distutils-r1_src_test
 *   environment, line 1763:  Called _distutils-r1_run_foreach_impl 'python_test'
 *   environment, line  562:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_test'
 *   environment, line 3163:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2667:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2665:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test'
 *   environment, line 1042:  Called distutils-r1_run_phase 'python_test'
 *   environment, line 1686:  Called python_test
 *   environment, line 3423:  Called distutils-r1_python_test
 *   environment, line 1651:  Called epytest
 *   environment, line 2228:  Called die
 * The specific snippet of code:
 *       [[ ${ret} -ne 0 ]] && die -n "pytest failed with ${EPYTHON}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/scanpy-1.11.3::debugscience'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/scanpy-1.11.3::debugscience'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/scanpy-1.11.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/scanpy-1.11.3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/scanpy-1.11.3/work/scanpy-1.11.3'
 * S: '/var/tmp/portage/dev-python/scanpy-1.11.3/work/scanpy-1.11.3'

@APN-Pucky
Copy link
Member

I guess #1323 (comment) is related to the network-sandboxing.

@mschubert
Copy link
Contributor Author

Thanks for testing so quickly!

Yes, unfortunately sandboxing on Prefix does not work, and I never see these errors. They have been occurring a lot lately, and I should address them before sending the PR to avoid causing you unnecessary work. So I guess I'll move my ebuild development fully to a VM instead of Prefix.

Two questions here:

  1. Should we RESTRICT="test" here, or deselect the tests?
  2. Is dev-python or sci-biology more appropriate for scanpy?

@Nowa-Ammerlaan
Copy link
Member

  1. Should we RESTRICT="test" here, or deselect the tests?

Yes, and also add PROPERTIES="test_network". This allows overriding the network sandboxing and test restriction with ALLOW_TEST.

@APN-Pucky
Copy link
Member

APN-Pucky commented Aug 2, 2025

  1. Is dev-python or sci-biology more appropriate for scanpy?

I don't think there is a strict rule. I put the pypi/pure-python codes that have only a physics application in sci-physics, since I asked in the science IRC and the reply was sort of, where one would rather expect it to be. Otherwise, dev-python for pypi packages.

~/git/gentoo/gentoo $ grep -rl "pypi" | xargs grep "inherit" | awk -F/ '{dirs[$1]++} END {for (d in dirs) print d, dirs[d]}' | sort
app-admin 54
app-antivirus 1
app-arch 14
app-backup 7
app-containers 1
app-crypt 20
app-editors 10
app-emulation 15
app-misc 16
app-portage 20
app-text 15
dev-build 4
dev-db 9
dev-debug 2
dev-gap 1
dev-lang 6
dev-libs 1
dev-python 2101
dev-tex 10
dev-util 115
dev-vcs 21
eclass 26
games-misc 1
mail-filter 5
media-gfx 7
media-libs 1
media-sound 12
media-video 4
net-analyzer 10
net-dns 1
net-im 9
net-mail 5
net-misc 4
net-nds 1
net-proxy 6
sci-biology 4
sci-chemistry 1
sci-libs 2
sci-ml 13
sys-apps 10
sys-auth 1
sys-fs 1
sys-kernel 1
sys-process 1
www-apps 5
www-misc 2
www-servers 1
x11-misc 3
x11-wm 24

~/git/gentoo/sci $ grep -rl "pypi" | xargs grep "inherit" | awk -F/ '{dirs[$1]++} END {for (d in dirs) print d, dirs[d]}' | sort
dev-python 140
dev-vcs 4
sci-biology 8
sci-electronics 2
sci-libs 4
sci-physics 41
sys-cluster 28

Here you see while most pypi are in dev-python there are some in other categories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants