Created attachment 192963 [details] py-afew-1.3.0_1.diff Once bug #227893 is addressed mail/py-afew can be built for both Python 2 and 3 as well.
This port installs ${PREFIX}/bin/afew. You probably want to add USE_PYTHON=concurrent to allow coexistence of py27 and py36 flavors.
Is there actually a use case for installing both flavors of the port at the same time? afew is an application not a library. From the user's perspective it shouldn't make much of a difference in which version of a programming language the application is implemented in. They can just pick the one which matches the rest of their system well. For example sysutils/py-ranger (a file manager) doesn't have USE_PYTHON=concurrent either. mail/py-afew is intended to be run from a hook of mail/notmuch or from a cronjob to automatically tag incoming e-mail. USE_PYTHON=concurrent would change the name of the executable and therefore break users' setups without them noticing immediately. As I don't see any advantages of USE_PYTHON=concurrent (you may convince me otherwise) I'd rather avoid that scenario.
USE_PYTHON=concurrent is used to solve the conflicting file(s) from different flavors. Since afew is an application, it's fine to keep "USE_PYTHON=noflavors".
> USE_PYTHON=concurrent is used to solve the conflicting file(s) from different flavors. I know. But the conflict is not a problem. The user just needs to make a decision which one they want to install. They don't need both. > Since afew is an application, it's fine to keep "USE_PYTHON=noflavors". Python 2's end of life is not too far off. I would like mail/py-afew to be available for Python 3 as well. So we don't have to convert all Python ports at the last minute.
I guess you got USES=python and USE_PYTHON=noflavors mixed. USES=python means you could build the port with your default python, 2 or 3. Assume you have DEFAULT_VERSIONS=python=3.6 in /etc/make.conf, you'll get py36-foo. USE_PYTHON=noflavors means we do not build the port with multiple flavors (py27 and py36 currently) but only the default flavor. Back to this port. If you want to support both python 2 and 3, it's done in bug #227893. You get py36-afew if you use python 3.6 as the default. BTW, before bug #227893 lands, this port should be marked as USES=python:2.7 because you cannot build this port with python 3.x due to nonexistent py3x-dkimpy. It wasn't a problem because USE_PYTHON=noflavors excluded the py36 flavor.
> If you want to support both python 2 and 3, it's done in bug #227893. > You get py36-afew if you use python 3.6 as the default. Maybe I didn't express myself well enough. I'd like for mail/py-afew not only to be buildable with Python 2 and 3 (which indeed was achieved by bug #227893), but also to be readily installable with pkg from the official repositories in Python 2 and 3 variants (which is the goal of this PR). For the latter the port needs to be built with multiple Python flavors, which is what the attached patch implements. Is not desirable to have?
Seems this was done in r466282, closing.
Oops, braino, sorry.
A commit references this bug: Author: swills Date: Thu Jul 26 22:43:41 UTC 2018 New revision: 475403 URL: https://svnweb.freebsd.org/changeset/ports/475403 Log: mail/py-afew: support both Python 2 and 3 PR: 227894 Submitted by: Sebastian Schwarz <seschwar@gmail.com> (maintainer) Changes: head/mail/py-afew/Makefile
Committed, thanks!