Bug 275770 - www/py-django-js-asset: Unable to determine which files to ship inside the wheel using the following heuristics
Summary: www/py-django-js-asset: Unable to determine which files to ship inside the wh...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kai Knoblich
URL: https://github.com/matthiask/django-j...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-15 07:48 UTC by Einar Bjarni Halldórsson
Modified: 2024-01-06 15:36 UTC (History)
0 users

See Also:
kai: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2023-12-15 07:48:26 UTC
py-dj42-django-js-asset stopped building in poudriere.

FreeBSD version: 14.0-RELEASE-p3
poudriere version: poudriere-git-3.4.99.20231113

===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for py39-dj42-django-js-asset-2.1.0
* Getting build dependencies for wheel...
* Building wheel...
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
  File "/usr/local/lib/python3.9/site-packages/hatchling/build.py", line 58, in build_wheel
    return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
    artifact = version_api[version](directory, **build_data)
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/wheel.py", line 412, in build_standard
    for included_file in self.recurse_included_files():
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 176, in recurse_included_files
    yield from self.recurse_selected_project_files()
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 180, in recurse_selected_project_files
    if self.config.only_include:
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/config.py", line 781, in only_include
    only_include = only_include_config.get('only-include', self.default_only_include()) or self.packages
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/wheel.py", line 231, in default_only_include
    return self.default_file_selection_options.only_include
  File "/usr/local/lib/python3.9/functools.py", line 993, in __get__
    val = self.func(instance)
  File "/usr/local/lib/python3.9/site-packages/hatchling/builders/wheel.py", line 219, in default_file_selection_options
    raise ValueError(message)
ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/

As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following:

[tool.hatch.build.targets.wheel]
packages = ["src/foo"]

ERROR Backend subprocess exited when trying to invoke build_wheel
*** Error code 1

Stop.
make: stopped in /usr/ports/www/py-dj42-django-js-asset
=>> Cleaning up wrkdir
===>  Cleaning for py39-dj42-django-js-asset-2.1.0
build of www/py-dj42-django-js-asset@py39 | py39-dj42-django-js-asset-2.1.0 ended at Fri Dec 15 07:05:39 GMT 2023
build time: 00:00:11
!!! build failure encountered !!!
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2023-12-15 10:37:58 UTC
(In reply to Einar Bjarni Halldórsson from comment #0)

Hi Einar, thanks for the report! The breakage was caused by ports 177a17506075 (= Update of devel/py-hatchling from 1.18 to 1.20( 

Upstream of py-{dj42-}django-js-asset has released 2.2.0 recently which contains a compatibility fix for py-hatchling >= 1.19. I'll commit it in a few minutes.
Comment 2 Einar Bjarni Halldórsson 2023-12-15 10:40:13 UTC
(In reply to Kai Knoblich from comment #1)

Thank you so much! I'm happy knowing a fix is incoming :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-12-15 10:46:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=30621b8df6db51e4211808cc9a240567ca45e2af

commit 30621b8df6db51e4211808cc9a240567ca45e2af
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-12-15 10:40:09 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2023-12-15 10:44:02 +0000

    www/py-dj42-django-js-asset: Update to 2.2.0

    * This update remedies build issues with devel/py-hatchling 1.19
      or later and should fix the build after 177a17506075 [1]

    Changelog:

    https://github.com/matthiask/django-js-asset/blob/2.2/CHANGELOG.rst

    PR:             275770 [1]
    Reported by:    Einar Bjarni Halldórsson [1]

 www/py-dj42-django-js-asset/Makefile | 2 +-
 www/py-dj42-django-js-asset/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-12-15 10:46:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6d299f79a53e15c4bcbd55d697f44b44e2e64f04

commit 6d299f79a53e15c4bcbd55d697f44b44e2e64f04
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-12-15 10:42:13 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2023-12-15 10:44:15 +0000

    www/py-django-js-asset: Update to 2.2.0

    * This update remedies build issues with devel/py-hatchling 1.19 or
      later and should fix the build after 177a17506075 [1]

    Changelog:

    https://github.com/matthiask/django-js-asset/blob/2.2/CHANGELOG.rst

    PR:             275770 (for py-dj42-django-js-asset) [1]
    Reported by:    Einar Bjarni Halldórsson [1]

 www/py-django-js-asset/Makefile | 2 +-
 www/py-django-js-asset/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 5 Kai Knoblich freebsd_committer freebsd_triage 2023-12-15 10:53:03 UTC
(In reply to Einar Bjarni Halldórsson from comment #2)

Committed, once again thanks for the swift report! :) 

I'll leave this bug report open for a few more days as a reference.
Comment 6 Einar Bjarni Halldórsson 2023-12-15 11:10:23 UTC
(In reply to Kai Knoblich from comment #5)

Confirmed, it's building without errors now.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-17 13:00:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fdebd61d66c071ba608a40e50a539b37a03aefd9

commit fdebd61d66c071ba608a40e50a539b37a03aefd9
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-12-17 12:41:13 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2023-12-17 12:41:13 +0000

    www/py-dj41-django-js-asset: Update to 2.2.0

    * This update remedies build issues with devel/py-hatchling 1.19 or
      later and should fix the build after 177a17506075 [1]

    Changelog:

    https://github.com/matthiask/django-js-asset/blob/2.2/CHANGELOG.rst

    PR:             275770 (for py-dj42-django-js-asset) [1]
    Reported by:    Einar Bjarni Halldórsson [1], pkg-fallout [1]

 www/py-dj41-django-js-asset/Makefile | 2 +-
 www/py-dj41-django-js-asset/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 8 Kai Knoblich freebsd_committer freebsd_triage 2024-01-06 15:36:01 UTC
(In reply to Einar Bjarni Halldórsson from comment #6)

Thanks for the confirmation, Einar. The reported problems no longer occurred, so this bug will now be closed.