Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyyaml < 6 requirement too strict #23

Closed
landmanbester opened this issue Jun 22, 2022 · 7 comments
Closed

pyyaml < 6 requirement too strict #23

landmanbester opened this issue Jun 22, 2022 · 7 comments

Comments

@landmanbester
Copy link
Collaborator

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?

@sjperkins
Copy link
Member

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?

@sjperkins
Copy link
Member

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.

@landmanbester
Copy link
Collaborator Author

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

@sjperkins
Copy link
Member

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.

@landmanbester
Copy link
Collaborator Author

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?

@sjperkins
Copy link
Member

sjperkins commented Jun 23, 2022

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

@landmanbester
Copy link
Collaborator Author

Thanks @sjperkins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants