HomeFreeBSD

devel/py-setuptools_scm: Do not run "git archive" on Ports tree

Description

devel/py-setuptools_scm: Do not run "git archive" on Ports tree

  • In build environments have git installed in conjunction with a git-based Ports tree and haven't WRKDIRPREFIX set, there will be significant delays when building devel/py-setuptools_scm or ports that depend on it.

    This is because the top-level directory of the git repository is determined during build via "git rev-parse --show-toplevel" which is issued inside the WRKSRC directory.

    Once the top-level directory (which is PORTSDIR) has been determined, an archive is created from this point using "git archive" which is then very time-consuming due the complexity of the Ports tree.

    In environments (e.g. poudriere) that have WRKDIRPREFIX set and also have git present during build, the issue doesn't appear because "git rev-parse --show-toplevel" fails silently with "not a git repo".

    Remedy the issue by returning only the actual path of WRKSRC, but only if it has "setup.py" in it (= devel/py-setuptools_scm is built) or a test session is performed.
  • Modernize the "do-test" target while I'm here and bump PORTREVISION due package change.

PR: 258891
Reported by: Robert Clausecker <fuz@fuz.su>
Obtained from: OpenIndiana
MFH: 2021Q4 (after 1 week)

Details

Provenance
kaiAuthored on Oct 24 2021, 10:43 AM
Parents
R11:2b84b7d4b60d: devel/renpy: update to 7.4.10
Branches
Unknown
Tags
Unknown