Bug 272581 - sysutils/py-filelock setuptools and RUN_DEPENDS in Mk/Uses/python.mk
Summary: sysutils/py-filelock setuptools and RUN_DEPENDS in Mk/Uses/python.mk
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 270510
  Show dependency treegraph
 
Reported: 2023-07-18 22:57 UTC by Alastair Hogge
Modified: 2023-07-19 02:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
Fix build for upcoming work on Python infrastructure (740 bytes, patch)
2023-07-18 22:57 UTC, Alastair Hogge
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Hogge 2023-07-18 22:57:03 UTC
Created attachment 243469 [details]
Fix build for upcoming work on Python infrastructure

Context in bug #270510
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2023-07-19 00:02:54 UTC
(In reply to Alastair Hogge from comment #0)

Hi Alastair,

You propose to add setuptools in BUILD_DEPENDS, but pyproject.toml doesn't contain such dependency. When its is really needed - setuptools does appear in pyproject.toml, but not in this case.

bug #270510 is about removing setuptools from RUN_DEPENDS. I don't understand the context and the reasons of this patch.

Why do you want to add it? Did upstream forget to add setuptools to pyproject.toml by mistake?


Thanks,
Yuri
Comment 2 Alastair Hogge 2023-07-19 00:28:57 UTC
(In reply to Yuri Victorovich from comment #1)

Hi Yuri,

I have ${PORTS}/Mk/Uses/python.mk patched locally per the review D39303 in bug #270510. I am well out of my league with regards to Python, I only have an interest in this work because, I would like to get a recent version of Gajim working—I know, I know, I am entering a world of pain, but it slightly less pain then using Dino, for whatever definition of "using" might be.

I am unsure on how to proceed with the whole affair, apart from having a fair shake of the sauce bottle, I am sorry if this creates (it probably does) extra load, for example providing triage, or even basics, feedback, and not to forget the cognitive load, and burden to be distracted from your current activities.

Attempting to build sysutils/py-filelock locally results in the build failing with:
===========================================================================
=======================<phase: build          >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for py39-filelock-3.12.2
* Getting build dependencies for wheel...

ERROR Missing dependencies:
        hatch-vcs>=0.3
        setuptools-scm>=6.4.0 -> setuptools
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/py-filelock
build of sysutils/py-filelock | py39-filelock-3.12.2 ended at Wed Jul 19 00:19:22 UTC 2023
build time: 00:00:02

That happens with the patch from the review D39303 and without adding ${PY_SETUPTOOLS} to ${BUILD_DEPENDS}. Adding "${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR}" to the ${BUILD_DEPENDS} results in the same error. I am developing using poudriere-testport (poudriere-devel-3.3.99.20230512)

Thanks.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2023-07-19 00:47:34 UTC
(In reply to Alastair Hogge from comment #2)

It looks like some dependency is missing somewhere, but it doesn't look like it is missing in sysutils/py-filelock.


The failure message is:
> ERROR Missing dependencies:
> 	hatch-vcs>=0.3
> 	setuptools-scm>=6.4.0 -> setuptools
> *** Error code 1

I don't quite understand why does it want setuptools-scm, and why does it say that hatch-vcs>=0.3 is missing, because it is present.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2023-07-19 01:33:59 UTC
(In reply to Alastair Hogge from comment #2)

Alastair,

Any work on any ports should not be mixed with bug #270510. You can use the ports tree as it is. 270510 is a general improvement of the python framework, and it is orthogonal to Gajim or any other particular ports.

You can just remove the 270510 patch and proceed.


Yuri
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2023-07-19 01:35:52 UTC
I am closing this because the problem is elsewhere.

The dependency problem should be identified and solved as part of the bug #270510 work.
Comment 6 Alastair Hogge 2023-07-19 01:55:39 UTC
(In reply to Yuri Victorovich from comment #5)

Egads! OK, will try and look into the dependencies, thank you.
Comment 7 Charlie Li freebsd_committer freebsd_triage 2023-07-19 02:12:20 UTC
(In reply to Yuri Victorovich from comment #3)
The error message sucks, as only setuptools is missing from the environment. hatch-vcs depends on setuptools-scm, whose Python package metadata specifies setuptools as a runtime dependency. Since bug 270510 removes setuptools from RUN_DEPENDS in non-leaf ports, this will result in a runtime error on setuptools-scm and its consumer chain, hence adding setuptools to BUILD_DEPENDS directly to those ports. But we can handle all that over in the other bug.