Bug 257436 - [NEW PORT] textproc/py-sphinxext-opengraph: Sphinx extension to generate OpenGraph metadata
Summary: [NEW PORT] textproc/py-sphinxext-opengraph: Sphinx extension to generate Open...
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: Fernando Apesteguía
URL:
Keywords: feature
Depends on:
Blocks: 257438
  Show dependency treegraph
 
Reported: 2021-07-26 15:35 UTC by Alexis Praga
Modified: 2021-08-24 00:56 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Patch file for creating the port (1.75 KB, patch)
2021-07-26 15:35 UTC, Alexis Praga
no flags Details | Diff
Corrected URL (1.76 KB, patch)
2021-07-26 17:25 UTC, Alexis Praga
no flags Details | Diff
LICENSE and tests files from github (1.81 KB, patch)
2021-08-01 14:51 UTC, Alexis Praga
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Praga 2021-07-26 15:35:20 UTC
Created attachment 226719 [details]
Patch file for creating the port

Tested with poudriere on : 11.4 amd64, 12.2 amd64, 13.0 aarch64, 13.0amd64
Checked with portlint.

I created this port as needed to update x11/kitty.
Thanks,
Comment 1 Alexis Praga 2021-07-26 17:25:21 UTC
Created attachment 226720 [details]
Corrected URL
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-27 05:20:14 UTC
Thanks for submitting a new port Alexis.

Some review items:

 - Upstream declares: install_requires=["sphinx>=2.0"], *_DEPENDS should match (3,1 doesnt match and looks odd)

 - Ask upstream to package a LICENSE file (and tests), so we can add LICENSE_FILE and test/qa support to the port. In the meantime add #LICENSE_FILE= Not packaged yet with sdist so its clear for our future selves. An alternative is to USE_GITHUB temporarily until they are packaged.

Bonus points: QA against non-default Python version, and Python versions even upstream doesn't test against (python 3.10 at least), and cap USE_PYTHON=<version-spec> accordingly (or not).

See Also: https://wiki.freebsd.org/Python/PortsPolicy
Comment 3 Alexis Praga 2021-08-01 14:51:41 UTC
Created attachment 226843 [details]
LICENSE and tests files from github

I've opened a request upstream for LICENSE and tests on github 
In the meantime, these can be get with github.
Comment 4 Fernando Apesteguía freebsd_committer 2021-08-05 16:40:41 UTC
I can work on this.

This builds in {11.4, 12.2}{amd64, i386}, 13amd64 and 14-current amd64.

x11/kitty which is blocked by this PR builds fine too and runs fine in 12.2 amd64.

koobs@, how can I easily test with python3.9 and python3.10 as you suggested?
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-06 02:40:40 UTC
(In reply to Fernando Apesteguía from comment #4)

Set/Override DEFAULT_VERSIONS=python= in poudriere make.conf either globally, or a zet (-z) specific make.conf filename like py39-make.conf where py39 is the -z set name to use
Comment 6 Fernando Apesteguía freebsd_committer 2021-08-06 07:08:23 UTC
(In reply to Kubilay Kocak from comment #5)
Thanks.

Build tests with python3.9 were OK in the mentioned versions. For some reason, I can not test with python3.10 despite having BUILD_ALL_PYTHON_FLAVORS in make.conf as suggested by the framework.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-07 02:56:07 UTC
(In reply to Fernando Apesteguía from comment #6)

What issue/error/symptoms do you see when attempting to test again 3.10 ?
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-07 02:58:49 UTC
Note: BUILD_ALL_PYTHON_FLAVORS is poorly named, opposite to the implementation we needed (packaging infrastructure specific design), and not necessary to switch/change Python versions in poudriere. 

DEFAULT_VERSIONS=python=x.y should be all that's necessary.

If that doesn't work, something is wrong with lang/python310 or framework support/code for that version that we should isolate.
Comment 9 Fernando Apesteguía freebsd_committer 2021-08-07 09:13:04 UTC
(In reply to Kubilay Kocak from comment #8)

I get many warnings like this:

PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT,
if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf

And the port seems to build for python 3.9:

...
===>  License BSD3CLAUSE accepted by the user
===>   py39-sphinxext-opengraph-0.4.2 depends on file: /usr/local/sbin/pkg - found
...
===>  Deinstalling for py39-sphinxext-opengraph
===>   Deinstalling py39-sphinxext-opengraph-0.4.2
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        py39-sphinxext-opengraph: 0.4.2

Number of packages to be removed: 1

In poudriere's make.conf I have:

DEFAULT_VERSIONS=python=3.10
Comment 10 Alexis Praga 2021-08-20 20:56:54 UTC
Using "DEFAULT_VERSIONS=python=3.10" in "/usr/local/etc/poudriere.d/py310-make.conf" and adding "-z py310" to "poudriere testport", I can build this port.
I have the same warnings as Fernando, though.

There are no issue with python=3.9, except the warning.

Fernando, if you can build with 3.10, would it be possible to close this PR ? This would unlock an upgrade for x11/kitty.

Thanks !
Comment 11 Fernando Apesteguía freebsd_committer 2021-08-22 17:35:34 UTC
(In reply to Alexis Praga from comment #10)
I think koobs@ knows more about py ports than me, so I think it is wise to hear his opinion :-)
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-23 00:27:45 UTC
(In reply to Fernando Apesteguía from comment #9)

Is there a warning/behaviour difference when testing 3.8 and 3.9, vs 3.9 and 3.10 ?

My current feeling is that the warning is spurious and only emitted given some combination of (current) defaults in the framework (default_versions=python=x.y) and what version the port is tested with.

The bottom line is:

- BUILD_ALL_PYTHON_FLAVORS was created to that the package builders (via poudriere), could produce multiple python versions of a port in a single run

- BUILD_ALL_PYTHON_FLAVORS was for use for python ports where multiple versions of packages were *required* to be build, such as setuptools, and CPython optional modules (tkinter, sqlite, etc)

If this port successfully builds, packages and passes tests with all Python versions it supports (based on USES=python:<versions-spec>), then it can be landed.
Comment 13 Fernando Apesteguía freebsd_committer 2021-08-23 16:19:12 UTC
(In reply to Kubilay Kocak from comment #12)
Apart from the warning mentioned above I don't see any other differences.

The port builds and packages fine at least in 3.8 and 3.9 and also 3.10 as reported by Alexis.

I will commit this soon (for some valid value of "soon").
Comment 14 commit-hook freebsd_committer 2021-08-23 17:33:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1946f8224cbf10898d3fc0599e6e2ac6c2537c16

commit 1946f8224cbf10898d3fc0599e6e2ac6c2537c16
Author:     Alexis Praga <alexis.praga@free.fr>
AuthorDate: 2021-08-23 16:30:22 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2021-08-23 17:27:57 +0000

    textproc/py-sphinxext-opengraph: new port

    Sphinx extension to generate OpenGraph metadata

    The Open Graph protocol enables any web page to become a rich object
    in a social graph

    This port is a dependency of the new version of x11/kitty (PR 257438)

    PR:     257436
    Reported by:    alexis.praga@free.fr
    Reviewed by:    koobs@

 textproc/Makefile                               |  1 +
 textproc/py-sphinxext-opengraph/Makefile (new)  | 28 +++++++++++++++++++++++++
 textproc/py-sphinxext-opengraph/distinfo (new)  |  3 +++
 textproc/py-sphinxext-opengraph/pkg-descr (new) |  6 ++++++
 4 files changed, 38 insertions(+)
Comment 15 Fernando Apesteguía freebsd_committer 2021-08-23 17:34:37 UTC
Committed,

Thanks!
Comment 16 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-24 00:56:28 UTC
Thanks Fernando