Opened 3 years ago

Closed 3 years ago

#62295 closed defect (fixed)

py37-dns-lexicon depends on py38 packages

Reported by: LucaFilipozzi (Luca Filipozzi) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: py-dns-lexicon

Description (last modified by mf2k (Frank Schima))

This py37 package depends on py38 packages: poetry and py38-lockfile.

--->  Computing dependencies for py37-dns-lexicon
The following dependencies will be installed:
 poetry
 py38-lockfile
Continue? [Y/n]:

Change History (17)

comment:1 Changed 3 years ago by LucaFilipozzi (Luca Filipozzi)

Summary: py37-dns-lexicon depends on p38 packagespy37-dns-lexicon depends on py38 packages

comment:2 Changed 3 years ago by reneeotten (Renee Otten)

Owner: set to Schamschula
Status: newassigned

this happens because these are dependencies of the build-dependency poetry, which uses Python 3.8. I don't think there is anything to change/fix here, but I'll leave it to Marius to close this ticket if he agrees.

comment:3 Changed 3 years ago by mf2k (Frank Schima)

Port: py-dns-lexicon added; py37-dns-lexicon removed

comment:4 Changed 3 years ago by mf2k (Frank Schima)

In the future, please use WikiFormatting.

comment:5 Changed 3 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:6 Changed 3 years ago by Schamschula (Marius Schamschula)

No, this shouldn't happen. I can reproduce this.

The active_variants PG should ask for the correct poetry variant.

comment:7 Changed 3 years ago by Schamschula (Marius Schamschula)

Last edited 3 years ago by Schamschula (Marius Schamschula) (previous) (diff)

comment:8 Changed 3 years ago by Schamschula (Marius Schamschula)

The problem is that the poetry variant has to be the same version as py-poetry-core. If there is a mismatch, the build fails.

One reason I hate that we install python binaries as a variant, rather than as pyXX-package. This would remove the need for the Port Group.

That said, I have poetry +python39 installed. If I try to install py38-dns-lexicon, I get

Error: Failed to configure py38-dns-lexicon: poetry must be installed with +python38.
Error: See /opt/local/var/macports/logs/_Users_marius_Development_MacPorts_ports_python_py-dns-lexicon/py38-dns-lexicon/main.log for details.

as expected.

comment:9 Changed 3 years ago by LucaFilipozzi (Luca Filipozzi)

When I opened this ticket, I opened ticket:62296 against poetry asking that it be installable as pyXX-package.

comment:10 Changed 3 years ago by Schamschula (Marius Schamschula)

That's unlikely to happen. MacPorts on uses pyXX-package for libraries, not Python executables. I've been through that with a couple packages I maintain.

comment:11 Changed 3 years ago by Schamschula (Marius Schamschula)

Of course there are other edge cases like pyXX-sphinx.

comment:12 Changed 3 years ago by jmroot (Joshua Root)

If it's a module that is imported by other things, it should be py-poetry. Whether it also installs executables is not really relevant.

comment:13 Changed 3 years ago by dgilman (David Gilman)

I'd argue that this is a packaging problem with dns-lexicon itself. The .tar.gz available on pypi has a setup.py that doesn't appear to use poetry, unless I am mistaken. Is it somehow inappropriate to use the distfile from pypi for building this?

comment:14 Changed 3 years ago by Schamschula (Marius Schamschula)

Unfortunately, that doesn't work! All you get is an unusable package with a handful of placeholder files.

This why there is an epoch set in this Portfile. The upgrade to version 3.4.x and above completely broke the default install method, as the package now requires pep517 (which was not supported by the python PG at the time), along with poetry. I temporarily reverted to version 3.3.28 that could be installed using the old method. See my commits for December 1st, 2020 and January 5th 2021. I had a lengthy discussion with the upstream maintainers about this issue.

comment:15 Changed 3 years ago by LucaFilipozzi (Luca Filipozzi)

Even if this were an issue with dns-lexicon (sure, contact upstream for possible resolution), poetry using variants rather than version-specific packages is problematic, in my view.

Last edited 3 years ago by LucaFilipozzi (Luca Filipozzi) (previous) (diff)

comment:16 Changed 3 years ago by Schamschula (Marius Schamschula)

For the record, here is the upstream issue https://github.com/AnalogJ/lexicon/issues/568

comment:17 Changed 3 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.