Packaging py-keyring

David Gilman davidgilman1 at
Sat Feb 1 21:14:59 UTC 2020

I've been taking a stab at packaging poetry, a package manager for
Python.  It has a dependency on the py-keyring port which is
maintained by reneeotten.

The recent release of keyring v21 dropped support for Python before
version 3.6.  Renee came up with a clever trick in the portfile: if
the py35-keyring is being requested, install v20, the last compatible
version instead:

However, the maintainers of poetry want to keep backwards
compatibility with old versions of Python.  They've explicitly pinned
their dependency on v20 releases of keyring in order to keep poetry
running on old Pythons.  If I want poetry to use the existing v20
keyring I'll have to explicitly depend on python35 for everything
which is a non-goal.

Does anyone have any suggestions on how the py-keyring package can be
changed to support all of this?  I can copy the entire Portfile and
rename it py-keyring20 and depend on that but I wonder if there's a
way to extend the existing Portfile.

The good news is that once this issue is fixed the poetry portfile is
ready for release.

David Gilman

More information about the macports-dev mailing list