Page MenuHomeFreeBSD

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

Authored by jkim on Sep 21 2019, 5:08 AM.

Details

Reviewers
koobs
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
Unit Tests Skipped

Event Timeline

jkim created this revision.Sep 21 2019, 5:08 AM
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 updated this revision to Diff 66461.Jan 7 2020, 9:30 PM
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–8

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

9

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

18–19

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

19

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

21

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)

25

This shouldnt be necessary after updating to use PyPI as MASTER_SITES

31

What is this block needed for?

This revision now requires changes to proceed.Jan 8 2020, 3:54 AM
jkim added inline comments.Jan 14 2020, 12:02 AM
devel/py-pythondialog/Makefile
6–8

Okay.

9

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.

18–19

Okay.

19

Oops, it was copied from an old port.

21

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.

25

Yes, you're right.

31

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

jkim updated this revision to Diff 66711.Jan 14 2020, 12:07 AM
koobs added inline comments.Jan 14 2020, 2:37 AM
devel/py-pythondialog/Makefile
9

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 ?

31

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

jkim added inline comments.Jan 14 2020, 8:15 PM
devel/py-pythondialog/Makefile
9

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)
jkim updated this revision to Diff 66755.Jan 14 2020, 8:56 PM
jkim added a comment.Thu, Jan 23, 9:08 PM

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

koobs requested changes to this revision.EditedFri, Jan 24, 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.Fri, Jan 24, 3:14 AM