Bug 271230 - net-mgmt/py-pysmi: Update to 1.1.13
Summary: net-mgmt/py-pysmi: Update to 1.1.13
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://github.com/lextudio/pysmi/blo...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-03 16:22 UTC by John W. O'Brien
Modified: 2023-05-11 23:28 UTC (History)
2 users (show)

See Also:


Attachments
net-mgmt/py-pysmi: Update to 1.1.13 (2.61 KB, text/plain)
2023-05-03 16:22 UTC, John W. O'Brien
john: maintainer-approval+
Details
net-mgmt/py-pysmi: Update to 1.1.13 (2.80 KB, patch)
2023-05-10 00:06 UTC, John W. O'Brien
john: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2023-05-03 16:22:18 UTC
Created attachment 241957 [details]
net-mgmt/py-pysmi: Update to 1.1.13

Changelog
=========

*   Update to 1.1.13
*   Follow upstream author/maintainer transition to LexStudio
*   Obtain source from GitHub
*   Convert to use PEP-517
*   Freshen pkg-descr

QA
==

portlint: OK
poudriere: OK -- testport on 13.1-RELEASE-p2 amd64 w/py37, py38, py39, py310 (default), and py311
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-05-03 18:09:20 UTC
Thank you for your submission.  Here are some things to check:

 - we usually prefer downloading python packages from PYPI for consistency,
   though using other master sites is permitted.
 - please use DISTVERSION over PORTVERSION if possible
 - instead of setting GH_TAGNAME, just set DISTVERSIONPREFIX=v
 - we don't ship Python 3.6 anymore, so you can leave out the lower version limit
   for USES=python
 - is devel/py-poetry-core truly only needed at build time?  If it is also
   required at runtime, please also add it to RUN_DEPENDS.

Rest looks good.  Please check and resubmit if needed.
Comment 2 John W. O'Brien 2023-05-10 00:06:19 UTC
Created attachment 242088 [details]
net-mgmt/py-pysmi: Update to 1.1.13

Thank you for your review.


 > - we usually prefer downloading python packages from PYPI for consistency,
 >   though using other master sites is permitted.

Changed from GITHUB to PYPI, converting from GH_ACCOUNT to DISTNAME to follow temporary name change while PEP-541 request is in-progress [0]. Also, removed CHANGES.rst, THANKS.txt, and TODO.txt docs, because they are not published in the sdist.

On this topic, the Python Ports Policy needs to be updated for consistency.

"Ports SHOULD use MASTER_SITES=CHEESESHOP if a Python package is registered on PyPI"

% find /usr/ports/ -depth 3 -name "Makefile*" \
    | xargs grep -Eo "PYPI|CHEESESHOP" -h \
    | sort \
    | uniq -c
   7 CHEESESHOP
3541 PYPI


> - please use DISTVERSION over PORTVERSION if possible

This is quite an esoteric nit to pick. A reasonably close reading of all three applicable document collections (the Porter's Handbook, /usr/ports/Mk/*, and the Python Ports Policy) leads me to the conclusion that DISTVERSION and PORTVERSION are totally interchangeable under the circumstances, and that the tie-breaker in favor of DISTVERSION is pretty far down the decision tree. Established precedent supports my initial patch.

% find /usr/ports/ -depth 3 -name "Makefile*" \
    | xargs grep -Eho "^(PORTVERSION|DISTVERSION)" \
    | sort \
    | uniq -c
11441 DISTVERSION
22980 PORTVERSION

Changed from PORTVERSION to DISTVERSION because I need to appeal to the widest possible set of people with commit bits.


> - instead of setting GH_TAGNAME, just set DISTVERSIONPREFIX=v

OBE


> - we don't ship Python 3.6 anymore, so you can leave out the lower
>   version limit for USES=python

The specification of supported Python versions is taken directly from upstream along with those of the build system [1] and other dependencies [2].

No change.


> - is devel/py-poetry-core truly only needed at build time?  If it is
>   also required at runtime, please also add it to RUN_DEPENDS.

Why do you ask?


[0] https://github.com/etingof/pysnmp/issues/429
[1] https://github.com/lextudio/pysmi/blob/v1.1.13/pyproject.toml#L43
[2] https://github.com/lextudio/pysmi/blob/v1.1.13/pyproject.toml#L27-L30
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2023-05-10 11:33:08 UTC
(In reply to John W. O'Brien from comment #2)

Hi John.  Thank you for your update.

> the tie-breaker in favor of DISTVERSION is pretty far down the decision tree.

DISTVERSION was only introduced a few years ago, so many old ports still use PORTVERSION.  These are converted sporadically whenever a port is updated and the maintainer remembers to do it.  The decision tree is:

 * Does the Ports infrastructure mangle DISTVERSION into PORTVERSION correctly?
   If yes, use DISTVERSION, else use PORTVERSION.

I agree that it's fairly down the tree in the sense that it's a leaf node, but it's also fairly up the tree in the sense that it's the root node.

> On this topic, the Python Ports Policy needs to be updated for consistency.

I apologise for this inconsistency.  CHEESESHOP was only recently renamed to PYPI.

> Why do you ask?

I ask because it's a common error to make.  Build-time dependencies are not installed when the user downloads a binary package, so their presence must not be relied on for executing the ported application.  As most people do their runtime testing on machines that also have build dependencies installed, this sort of issue is easy to miss.

***

Note that now that you have only one documentation file, you could avoid the ${BASEDOCS:S,^,${WRKSRC}/,} spiel.  It is however not required that you change it.

Will likely commit without further changes once you give an affirmative answer to my question about BUILD_DEPENDS.
Comment 4 John W. O'Brien 2023-05-10 12:58:01 UTC
(In reply to Robert Clausecker from comment #3)

poetry is the PEP 517 build backend that pysmi uses.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-05-10 13:29:38 UTC
Thanks.  Will commit with my next batch.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-05-11 23:27:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=718622a56caf647e137c7896197e0d6b17dedddb

commit 718622a56caf647e137c7896197e0d6b17dedddb
Author:     John W. O'Brien <john@saltant.com>
AuthorDate: 2023-05-10 13:35:46 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-05-11 23:23:26 +0000

    net-mgmt/py-pysmi: update to 1.1.13

    Changelog: https://github.com/lextudio/pysmi/blob/v1.1.13/CHANGES.rst

    PR:             271230

 net-mgmt/py-pysmi/Makefile                         | 19 ++++++++++---------
 net-mgmt/py-pysmi/distinfo                         |  6 +++---
 net-mgmt/py-pysmi/files/patch-pyproject.toml (new) |  9 +++++++++
 net-mgmt/py-pysmi/pkg-descr                        |  4 +++-
 4 files changed, 25 insertions(+), 13 deletions(-)
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2023-05-11 23:28:14 UTC
Thank you for your contribution.