Bug 251126 - Resurrect databases/py-rrdtool_lgpl
Summary: Resurrect databases/py-rrdtool_lgpl
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: Rainer Hurling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 04:28 UTC by Daniel O'Connor
Modified: 2021-01-08 14:56 UTC (History)
3 users (show)

See Also:


Attachments
Port files (911 bytes, application/x-gzip)
2020-11-14 04:28 UTC, Daniel O'Connor
no flags Details
patch with new, not resurrected port (3.93 KB, patch)
2020-12-06 14:05 UTC, Rainer Hurling
no flags Details | Diff
patch with new, not resurrected port, without pkg-plist (3.01 KB, patch)
2020-12-06 15:36 UTC, Rainer Hurling
no flags Details | Diff
patch with new, not resurrected port, without pkg-plist (2.92 KB, patch)
2020-12-07 15:34 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel O'Connor 2020-11-14 04:28:48 UTC
Created attachment 219669 [details]
Port files

Resurrect py-rrdtool_lgpl based on https://github.com/commx/python-rrdtool and take maintainership.
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2020-11-14 08:16:05 UTC
Hi Darius,

The reason this port was removed was, that it uses EOLed python27.

Did you try if it works with Python >= 3.6?
Comment 2 Daniel O'Connor 2020-11-14 11:03:52 UTC
Yes, I tested this with Python 3.7 and it work for my use case (a Python script to log stats from my VDSL modem)
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2020-11-14 22:27:39 UTC
Please rework the Makefile, use portlint and see below.
As far as I can tell this falls under https://wiki.freebsd.org/Python/PortsPolicy and all of its recommendations.
Please submit patches as .patch of .diff files, not compressed.
Comment 4 Rainer Hurling freebsd_committer freebsd_triage 2020-11-15 06:28:47 UTC
After looking at it a bit longer, I'm not sure if it's right to revive a port in this case. The new port comes from completely different sources, but has the same function.

Also, I think that in case of a new port a naming scheme like py-python-rrdtool or maybe py-rrdtool would be more appropriate.
Comment 5 Daniel O'Connor 2020-11-15 06:41:59 UTC
Is it possible to create some kind of 'sub port' to rrdtool that just compiles the Python extensions?
That way non-Python users are not lumbered with them but they are available via pkg.
I can do the work but if you are aware of a port I can crib the idea from that would be very helpful.
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2020-11-15 08:54:35 UTC
(In reply to darius from comment #5)
> Is it possible to create some kind of 'sub port' to rrdtool that just compiles the Python extensions?

I don't see anything else besides the python extension, actually.

Anyways, the port should leverage usual USES=python infrastructure and get distribution files from PyPI (CHEESESHOP).

The port would look much like devel/py-hg-evolve that rhurlin@ ported recently.
Comment 7 Rainer Hurling freebsd_committer freebsd_triage 2020-12-06 14:05:35 UTC
Created attachment 220310 [details]
patch with new, not resurrected port

Hi Daniel,

Inspired by comment #6 I created a port that should work as expected.

Some decisions had to be made:

- The port should not be a further development of the former port databases/py-rrdtool-lgpl, because the naming does not fit well and the former port was based on other sources

- Um zukünftige Updates zu erleichtern, soll der Sourcecode von Pypi bezogen werden

- While the original source on Github is called python-rrdtool [1], the project page on Pypi [2] and the tarball there are only named rrdtool. The port should be fully named as on Github, plus the prefix depending on the Python version. So that CHEESESHOP can find the source, a part of PORTNAME had to be moved to PKGNAMEPREFIX

- I have extended the text in pkg-descr with information from the github page. Also the URL now points to the original source


[1] https://github.com/commx/python-rrdtool
[2] https://pypi.org/project/rrdtool/


IMPORTANT: 
I think it would be useful if the port would additionally inform that the Python bindings can also be installed by enabling the OpTION PYTHON in the main port databases/rrdtool. But this should not be done if the Python bindings are to be installed via databases/py-python-rrdtools.


What do you think about all this? If you agree in principle, it would be nice to test this proposal for the port. If the port builds, installs, and if it works as expected with rrdtool ...
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2020-12-06 15:10:20 UTC
LGTM except why do we have pkg-plist if autoplist is set?
Comment 9 Rainer Hurling freebsd_committer freebsd_triage 2020-12-06 15:36:45 UTC
Created attachment 220315 [details]
patch with new, not resurrected port, without pkg-plist

Of course, you are right. Wrong failure ;)

Thanks for the hint.
Comment 10 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-12-06 17:52:08 UTC
(In reply to Rainer Hurling from comment #7)

> - While the original source on Github is called python-rrdtool [1], the project page on Pypi [2] and the tarball there are only named rrdtool. The port should be fully named as on Github, plus the prefix depending on the Python version.

The port name should follow the name on PyPI, not GitHub. Two python libraries/packages may have same project name on GitHub but they'll have different names on PyPI.
Comment 11 Rainer Hurling freebsd_committer freebsd_triage 2020-12-07 15:34:49 UTC
Created attachment 220348 [details]
patch with new, not resurrected port, without pkg-plist

(In reply to  Sunpoet Po-Chuan Hsieh from comment #10)

> The port name should follow the name on PyPI, not GitHub. Two python
> libraries/packages may have same project name on GitHub but they'll 
> have different names on PyPI.
As I have learned now from tcberner (thanks!) in [1], "PORTNAME MUST exactly match the registered PyPI package name, if the package is registered on PyPI."

[1] https://wiki.freebsd.org/Python/PortsPolicy#Prefixing_.28py-.2A.29

Many thanks, Sunpoet, for the hint! There is a corrected patch in the attachments area now :)
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-01-08 14:55:16 UTC
A commit references this bug:

Author: rhurlin
Date: Fri Jan  8 14:55:01 UTC 2021
New revision: 560778
URL: https://svnweb.freebsd.org/changeset/ports/560778

Log:
  databases/py-rrdtool: New port, version 0.1.15

  As the successor to the deprecated port databases/py-rrdtool_lgpl [1],
  this port is intended to inherit its functionality, but comes from a
  different source [2][3] and is also named differently.

  [1] https://sourceforge.net/projects/py-rrdtool/files/
  [2] http://www.nongnu.org/py-rrdtool/
  [3] https://github.com/commx/python-rrdtool

  PR:		251126
  Submitted by:	darius@dons.net.au (new maintainer)
  Approved by:	arrowd (mentor)
  Differential Revision:	https://reviews.freebsd.org/D28038

Changes:
  head/databases/Makefile
  head/databases/py-rrdtool/
  head/databases/py-rrdtool/Makefile
  head/databases/py-rrdtool/distinfo
  head/databases/py-rrdtool/pkg-descr
Comment 13 Rainer Hurling freebsd_committer freebsd_triage 2021-01-08 14:56:33 UTC
Committed, thanks!

Sorry for the long delay. Have fun :)