Bug 256872 - devel/py-zipp: Build issue when devel/py-setuptools_scm has its TOML option disabled
Summary: devel/py-zipp: Build issue when devel/py-setuptools_scm has its TOML option d...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-28 13:06 UTC by Philipp Engel
Modified: 2021-08-20 11:56 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (swills)
dbaio: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Engel 2021-06-28 13:06:29 UTC
Trying to build devel/py-zipp with Poudriere has failed in the last weeks:

=>> Building devel/py-zipp
build started at Sat Jun 26 00:51:30 CEST 2021
port directory: /usr/ports/devel/py-zipp
package name: py39-zipp-3.4.0
building for: FreeBSD 12-amd64-local-job-03 12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 amd64
maintained by: swills@FreeBSD.org
Makefile ident: 
Poudriere version: 3.3.6
Host OSVERSION: 1202000
Jail OSVERSION: 1202000
Job Id: 03
[...]
=======================<phase: configure      >============================
===>  Configuring for py39-zipp-3.4.0
WARNING: The wheel package is not available.
/usr/local/bin/python3.9: No module named pip
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python3.9', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpxik70adk', '--quiet', 'toml']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 6, in <module>
    setuptools.setup()
  File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 779, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/usr/local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 838, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/usr/local/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/local/bin/python3.9', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpxik70adk', '--quiet', 'toml']' returned non-zero exit status 1.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-zipp
=>> Cleaning up wrkdir
===>  Cleaning for py39-zipp-3.4.0
build of devel/py-zipp | py39-zipp-3.4.0 ended at Sat Jun 26 00:52:19 CEST 2021
build time: 00:00:49
!!! build failure encountered !!!
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-29 03:07:29 UTC
@Philipp Was this a regression against a previous version? If so, what was the last version that successfully built?

The last update was October 2020 in ports r553729
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-29 03:10:10 UTC
zipp declares toml (via setuptools_scm[toml]) as a setup_requires [1][2], which is not included as a BUILD_DEPENDS in the port

[1] setup.cfg: setup_requires = setuptools_scm[toml] >= 3.4.1
[2] https://github.com/jaraco/zipp/blob/main/setup.cfg#L23
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-29 09:19:20 UTC
(In reply to Kubilay Kocak from comment #2)

I missed this in the review, but Kai (via IRC) notes that 'toml' should be satisfied via the TOML option in setuptools_scm, which is enabled by default, so this is likely a case of that option being disabled.

Is that the case Philipp?

Nevertheless, ports (like this one) must depend explicitly on their dependencies optional dependencies (transitively), and not rely on their presence (which, is... optional).
Comment 4 Philipp Engel 2021-06-29 11:02:02 UTC
Kubilay: Thank you. As you said, the disabled TOML option in devel/py-setuptools_scm caused the issue.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-29 11:04:41 UTC
(In reply to Philipp Engel from comment #4)

Thank you for the confirmation Philipp. We'll take care of the issue in the port.
Comment 6 commit-hook freebsd_committer 2021-08-20 11:50:41 UTC
A commit in branch main references this bug:

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

commit 8c08a2edf09b17f5fd1da63dc4c25f7eec8620b7
Author:     Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2021-08-20 11:45:04 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-08-20 11:45:04 +0000

    devel/py-zipp: Add missing toml build dependency

    A build issue occurs when devel/py-setuptools_scm has its TOML option
    disabled.

    PR:             256872
    Reported by:    Philipp Engel <kidon@posteo.de>
    Approved by:    portmgr (blanket)
    MFH:            2021Q3

 devel/py-zipp/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 7 commit-hook freebsd_committer 2021-08-20 11:54:43 UTC
A commit in branch 2021Q3 references this bug:

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

commit 99e517d0de483a7649a3361355d2e4aad16a23e5
Author:     Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2021-08-20 11:45:04 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-08-20 11:53:01 +0000

    devel/py-zipp: Add missing toml build dependency

    A build issue occurs when devel/py-setuptools_scm has its TOML option
    disabled.

    PR:             256872
    Reported by:    Philipp Engel <kidon@posteo.de>
    Approved by:    portmgr (blanket)

    (cherry picked from commit 8c08a2edf09b17f5fd1da63dc4c25f7eec8620b7)

 devel/py-zipp/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 8 Danilo G. Baio freebsd_committer 2021-08-20 11:56:07 UTC
Committed, thanks!