Re: Why does it take so long to build some Python ports

From: Piotr Smyrak <ps.ports_at_smyrak.com>
Date: Fri, 03 Jan 2025 12:02:41 UTC
On Fri, 3 Jan 2025 08:41:08 +0100
Xavier Humbert <xavier@groumpf.org> wrote:

> Some, but not all python ports spend a long time in building eggs
> 
> Ex :
> 
> running egg_info
> writing src/charset_normalizer.egg-info/PKG-INFO
> writing dependency_links to 
> src/charset_normalizer.egg-info/dependency_links.txt
> writing entry points to
> src/charset_normalizer.egg-info/entry_points.txt writing requirements
> to src/charset_normalizer.egg-info/requires.txt writing top-level
> names to src/charset_normalizer.egg-info/top_level.txt
> 
> *pstree -w *shows :
> 
> | |               \-+- 64353 root /usr/local/bin/python3.11 -m build 
> --no-isolation --wheel
> | |                 \-+- 64468 root /usr/local/bin/python3.11 
> /usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py 
> build_wheel /tmp/tmptnbyl41r
> | |                   \--- 64471 root git archive --prefix
> /usr/ports/ HEAD
> 
> What is the purpose of *git archive* ?

There is no invocation of "git archive" in /usr/ports/Mk/Uses/py*
Python port mechanism, in fact neither in the whole subtree of
/usr/ports/Mk. Which means this is not ports that make use of it, but
rather upstream tooling.

I suspect what you are observing is actually a code if the
py-setuptools-scm package:

Name           : py311-setuptools-scm
Version        : 8.0.4
Origin         : devel/py-setuptools-scm
WWW            : https://github.com/pypa/setuptools_scm
Comment        : Setuptools plugin to manage your versions by scm tags
Description    :
Handles managing your python package versions in scm metadata instead of
declaring them as the version argument or in a scm managed file.

HTH,
-- 
 Piotr Smyrak