ratt-ru/packratt

pyyaml < 6 requirement too strict

Closed this issue · 7 comments

I'm running into issues trying to get pfb-clean and QuartiCal running in the same stimela2 recipe. At least part of the problem stems from the pyyaml requirement here. Is there a good reason for this or can I relax it?

Packratt's configuration is managed by python poetry technically and the setup.py is auto-generated when poetry builds a wheel.

In fact, setup.py shouldn't even really exist, I added it because poetry didn't support development installs (at that stage).

If you modify the requirement, does packratt play nicely with other packages?

At least part of the problem stems from the pyyaml requirement here. Is there a good reason for this or can I relax it?

The strictness is probably due to how Poetry specifies dependencies, rather than due to any specific reason.

I have removed the < 6 requirement in the pyyaml branch and haven't run into any issues yet

The change to correctly fix this would be to remove

  1. Remove setup.py
  2. Update the pyyaml version in pyproject.toml

In fact, setup.py shouldn't even really exist, I added it because poetry didn't support development installs (at that stage).

This isn't necessary any longer due to python-poetry/poetry#34 (comment)

Installing a Poetry project in editable mode via pip wasn't possible for a long time, because pip doesn't know how to do this. This have changed with PEP-660. The neccessary hooks were implemented in Poetry's master branch already for a long time and were now backported to the poetry-core 1.0 branch. pip supports editable installs according to PEP-660 since 21.3.

It looks like there might be a bit more to it. I get

ERROR: Project file:///home/landman/software/packratt has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.

So I guess I need to change build-backend = "poetry.masonry.api" in the pyproject.toml. I'm not sure to what though. Any ideas?

#24 and #25 should resolve this, but your pip needs to be up to date. Please reopen if you run into further issues.