Page MenuHomeFreeBSD

Rename devel/py-dialog to devel/py-pythondialog and merge it with devel/py-dialog3
ClosedPublic

Authored by jkim on Sep 21 2019, 5:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 8:42 AM
Unknown Object (File)
Dec 23 2023, 3:24 AM
Unknown Object (File)
Nov 12 2023, 4:20 AM
Unknown Object (File)
Nov 6 2023, 10:01 PM
Unknown Object (File)
Nov 2 2023, 5:15 AM
Unknown Object (File)
Oct 30 2023, 8:36 PM
Unknown Object (File)
Oct 27 2023, 8:33 AM
Unknown Object (File)
Oct 11 2023, 3:49 AM
Subscribers

Details

Summary

This patch renames devel/py-dialog to devel/py-pythondialog and merges it with devel/py-dialog3. As a side effect, it updates devel/py-dialog to 3.5.1 and reassign the maintainer to me.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jkim retitled this revision from Rename devel/py-dialog to devel/py-pythondialog and merge with devel/py-dialog3 to Rename devel/py-dialog to devel/py-pythondialog and merge it with devel/py-dialog3.Sep 21 2019, 5:09 AM
jkim edited the summary of this revision. (Show Details)

Now the patch is updated to 3.5.1.

koobs requested changes to this revision.Jan 8 2020, 3:54 AM
koobs added inline comments.
devel/py-pythondialog/Makefile
6–7

Ports SHOULD use MASTER_SITES=CHEESESHOP if a Python package is registered on PyPI, unless there is a compelling (temporary) case not to. [1]

https://wiki.freebsd.org/Python/PortsPolicy#MASTER_SITES

7–8

This (likely) shouldnt be necessary after updating to use PyPI as MASTER_SITES

16–17

setup.py contains python_requires=">=3" which means it (apparently) only supports Python 3.x

"Python ports MUST declare USES=python :<version-spec> as completely and accurately as possible, without being incorrect, given existing syntax constraints." [1]

[1] https://wiki.freebsd.org/Python/PortsPolicy#USES.3Dpython

17

What is/was pythonprefix required for? The vast majority of ports don't require this, so it would be informative to know the reason

19

What port/package does this conflict refer to?

If there is indeed a conflicting port/package, it probably only CONFLICTS_INSTALL (CONFLICTS means conflicts at install *and* build time)

23

This shouldnt be necessary after updating to use PyPI as MASTER_SITES

28

What is this block needed for?

This revision now requires changes to proceed.Jan 8 2020, 3:54 AM
devel/py-pythondialog/Makefile
6–7

Okay.

7–8

Well, pythondialog has two projects unfortunately.

https://pypi.org/project/pythondialog
https://pypi.org/project/python2-pythondialog

Unless you prefer two separate projects, it is necessary.

16–17

Okay.

17

Oops, it was copied from an old port.

19

Basically, this port replaces devel/py-dialog and devel/py-dialog3. Don't we have to check the old packages? Anyway, you're right. CONFLICTS_INSTALL is better.

23

Yes, you're right.

28

This port uses cdialog from devel/cdialog instead of dialog(1) because our fork is incompatible.

devel/py-pythondialog/Makefile
7–8

Hmm. Still a little confused

I can see:

  • python2-pythondialog package, which is Python >=3, and
  • pythondialog (Python >=2.6, <3 )

I can't see a package for python3-pythondialog, so how will/does this port work for Python 3 ?

28

Ahh thanks, would be great to have a comment above this block for our future selves

devel/py-pythondialog/Makefile
7–8

Actually, it's the opposite.

https://pypi.org/project/pythondialog/

Requirements

  • As of version 2.12, the reference implementation of pythondialog (which this file belongs to) requires Python 3.0 or later in the 3.x series. pythondialog 3.5.1 has been tested with Python 3.8.
  • Versions of pythondialog up to and including 3.5.1 had a backport to Python 2, however this outdated Python dialect isn’t supported anymore. You may find pointers to the old packages with Python 2 support on the pythondialog home page.

https://pypi.org/project/python2-pythondialog/

Requirements

  • This now unsupported backport of pythondialog requires Python 2.6 or later in the 2.x series. It has been tested with Python 2.7.

In other words,

  • pythondialog package, which is Python >=3, and
  • python2-pythondialog (Python >=2.6, <3)

Ping... @koobs, do you have any more comment?

koobs requested changes to this revision.EditedJan 24 2020, 3:14 AM

@jkim

Note: First half of this comment were my thoughts/review before I realised the ports 'dual-named' nature. I left it in to show work/rationale ...

TLDR: I think this port should be 3.x only per its upstream configuration/document, and we create py-python2-dialog if we want it now, or when its required, separately.

I just took a look at each projects setup.py to verify/confirm actual requirements (not just classifiers), and yes you are right (i think i got them backwards in my earlier reply):

  • pythondialog: setup.py: python_requires=">=3")
  • python2-dialog: setup.py: python_requires=">=2.6, <3")

What this would mean then is:

  1. This ports (py-pythondialog) USES=python:<version-spec> *must* be set to 3.5+ (2.7 not supported), otherwise it will runtime (if not build) error when built/installed with python 2.7 (which the current 2.7+ value declares is supported, when in fact it is not)
  2. For any ports that need/want the 2.x supporting version, create the python2-dialog port with USES=python:2.7. A quick look on freshports shows no dependents on py-dialog, so maybe there are no python 2.x supporting ports that would want python2-dialog at this time

It's worth grepping the tree however to look for optional/conditional *_depends that might be hiding

So tldr:

  • Update this ports to USES=python:3.5+ (only 3.x is supported, per setup.py)
  • Since py-dialog and py3-dialog are being removed in favour of this port, remove CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}dialog${PYTHON_MAJOR_VER:S/^2//}

OH WAIT ... I just realised this port in its proposed form is structured to support being *both* package names.

Thinking about this, though it is rather clever and somewhat elegant, it is likely to not be so obvious/explicit for port creators/maintainers that need to depend on python2-dialog, which dependent upstream packages will have declared explicitly as the name of the dependency.

They will have to know apriori that the pythondialog port in fact has a second name (python2-dialog) in order to do something like:

RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}python2-dialog:devel/py-python-dialog@${PY_FLAVOUR}

Additionally, I think that given these ports have no current dependents, that its:

a) better to be explicit, and have this port match the upstream package exactly, and only support 3.x, which is and will be consistent with the upstreams documentation and consistent with the expectations of users that install py-pythondialog

b) better to create a separate py-python2-dialog port, either now or later if/when its required, that people can find by its exact upstream name, again, consistent with *that* projects upstream documentation on which python versions *it* supports.

This revision now requires changes to proceed.Jan 24 2020, 3:14 AM
This revision was not accepted when it landed; it landed in state Needs Revision.Aug 31 2020, 8:03 PM
Closed by commit rP527139: - Update to 3.5.1. (authored by jkim). · Explain Why
This revision was automatically updated to reflect the committed changes.