Bug 285219 - devel/py-Automat: fix build error because of casing
Summary: devel/py-Automat: fix build error because of casing
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-07 09:40 UTC by Samuel Lim
Modified: 2025-12-03 18:56 UTC (History)
1 user (show)

See Also:
john: maintainer-feedback-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Lim 2025-03-07 09:40:20 UTC
I've submitted a PR:
https://github.com/freebsd/freebsd-ports/pull/356

Use lowercase 'automat' name according to https://wiki.freebsd.org/Python/PortsPolicy#Naming

This PR fixes the build error (look at lowercase wheel name and Uppercase FileNotFoundError path):

Successfully built automat-24.8.1-py3-none-any.whl
=======================<phase: run-depends >============================
=====
env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===> py311-Automat-24.8.1 depends on file: /usr/local/bin/python3.11 - found
=======================<phase: stage >============================
===== env: NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
===> Staging for py311-Automat-24.8.1
===> Generating temporary packing list
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/local/lib/python3.11/site-packages/installer/main.py", line 98, in
_main(sys.argv[1:], "python -m installer")
File "/usr/local/lib/python3.11/site-packages/installer/main.py", line 86, in _main
with WheelFile.open(args.wheel) as source:
File "/usr/local/lib/python3.11/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/installer/sources.py", line 162, in open
with zipfile.ZipFile(path) as f:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/zipfile.py", line 1295, in init
self.fp = io.open(file, filemode)
^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/wrkdirs/usr/ports/devel/py-Automat/work-py311/automat-24.8.1/dist/Automat-24.8.1*.whl'
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-03-07 16:25:04 UTC
^Triage: since there is already a Pull Request, I don't see any reason to have an
additional Problem Report in Bugzilla.
Comment 2 Samuel Lim 2025-03-07 16:32:20 UTC
(In reply to Mark Linimon from comment #1)

Hi Mark,

No problem.

I just followed a suggestion from lswhsu

```
lwhsu left a comment 
(freebsd/freebsd-ports#356)
Thanks for the patch. Please consider file a ticket at https://bugs.freebsd.org/ so it's easier to keep tracking discussion with the maintainer.
```
Comment 3 John W. O'Brien 2025-11-30 08:05:40 UTC
The proposed patch:

-   Makes no change to the directory, devel/py-Automat
-   Changes PORTNAME from Automat to automat

This is exactly backward according to the published policy, which states (emphasis mine):

-   Port *directory* name MUST be lowercase(py-PORTNAME)
-   If the package is registered on PyPI
    *PORTNAME* MUST exactly match the registered PyPI package name, including casing.
Comment 4 Samuel Lim 2025-12-02 09:12:29 UTC
Agreed. Please do.
Comment 5 John W. O'Brien 2025-12-03 18:56:19 UTC
devel/py-Automat currently builds cleanly without modification against all versions of Python in the tree (310, 311, 312, 313, 313t, 314) on my Poudriere builder. If you are still able to reproduce the build error, I will need help to figure out what the salient difference is.