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

Incompatibility Pip 20.1 and poetry #1315

Closed
albop opened this issue May 12, 2020 · 12 comments
Closed

Incompatibility Pip 20.1 and poetry #1315

albop opened this issue May 12, 2020 · 12 comments

Comments

@albop
Copy link

albop commented May 12, 2020

Issue: poetry packages do not build anymore with pip=20.1

I've been writing conda recipes for python packages that are managed using poetry and a pyproject.toml (for instance https://github.com/conda-forge/dolang-feedstock). Provided poetry is installed it is possible to pip install them. In my conda recipe I just had to add poetry as a build dependency.

This now fails as the build environment uses pip=20.1 by default. It looks like the resulting package does not contain an importable python module. For instance, this is the full log of t the error I get with Dolang: https://dev.azure.com/conda-forge/84710dde-1620-425b-80d0-4cf5baca359d/_apis/build/builds/152578/logs/7 . This can be reproduced with the following recipe (https://github.com/conda-forge/dolang-feedstock) by changing the pip version in the meta.yaml and running ./build-locally. I've also demonstrated it in this intentionally buggy pr: conda-forge/dolang-feedstock#2

A simple workaround is to add pip=20.0.2 to the build requirement in the meta.yaml file. So I'm using it but I thought I would still file a bug.

Appart from running the build-locally routine, I tried to create a conda environment with pip=20.1 to see if I could reproduce the bug but I couldn't. Here is what I did on my machine (and what I imagine conda is doing):

  • conda install pip==20.1
  • wget https://files.pythonhosted.org/packages/86/cb/8e5a39bfe6c4bd89d4701005092e2a9f3e5b6029b163f92b2bdc0c445b14/dolang-0.0.8.tar.gz
  • pip wheel dolang-0.0.8.tar.gz
  • pip install dolang-0.0.8-py3-none-any.whl
  • python -c "import dolang" (no problem).

Since I couldn't find a minimal failing image out of the conda-forge workflow, I am not sure it is a Pip, a poetry or a conda bug.

@beckermr
Copy link
Member

This issue doesn't seem like it belongs here. Maybe send this to the poetry or pip repos?

@albop
Copy link
Author

albop commented May 12, 2020 via email

@beckermr
Copy link
Member

Which bot?

@albop
Copy link
Author

albop commented May 12, 2020 via email

@beckermr
Copy link
Member

Right. I'd set a pip constraint in the recipe. It should be in host, not build. We very likely will not pin pip in the global build scripts.

@albop
Copy link
Author

albop commented May 12, 2020

Actually it"s what I have done (https://github.com/conda-forge/dolang-feedstock/blob/master/recipe/meta.yaml). But it's a workaround and I thought I would still file an issue so the bug get tracked.

@beckermr
Copy link
Member

OK. I am closing this issue since the bug is in another package and the suggested way to use conda to specify host deps for building is working as it should.

@albop
Copy link
Author

albop commented May 12, 2020

Ok. To help reproduce the bug could you tell me whether the following commands are supposed to reproduce what happens in the container or if there is another step involved ?
conda install pip==20.1
wget https://files.pythonhosted.org/packages/86/cb/8e5a39bfe6c4bd89d4701005092e2a9f3e5b6029b163f92b2bdc0c445b14/dolang-0.0.8.tar.gz
pip wheel dolang-0.0.8.tar.gz
pip install dolang-0.0.8-py3-none-any.whl
python -c "import dolang" (no problem).

@isuruf
Copy link
Member

isuruf commented May 12, 2020

@albop
Copy link
Author

albop commented May 12, 2020

This helps. I'll see whether I can reproduce the problem with them.

@albop
Copy link
Author

albop commented May 12, 2020

For the record, here is what I've just tried on my laptop. It still works.

export PIP_NO_BUILD_ISOLATION=False
export PIP_NO_DEPENDENCIES=True
export PIP_IGNORE_INSTALLED=True
export PIP_CACHE_DIR=True
export PIP_CACHE_DIR=doesnotexist
export PIP_NO_INDEX=True
export PYTHONDONTWRITEBYTECODE=True # because noarch=python
wget https://files.pythonhosted.org/packages/86/cb/8e5a39bfe6c4bd89d4701005092e2a9f3e5b6029b163f92b2bdc0c445b14/dolang-0.0.8.tar.gz
pip wheel dolang-0.0.8.tar.gz 
rm dolang-0.0.8-py3-none-any.whl 
pip wheel dolang-0.0.8.tar.gz 
pip install dolang-0.0.8-py3-none-any.whl 
python -c "import dolang" # (no problem).

@albop
Copy link
Author

albop commented May 12, 2020

Actually I'm not sure it is the wheel which is built incorrectly, or the conda package only. Eventually, only the conda package is saved in 'build_artifacts/broken'. Is there a way to save the wheel ?

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

3 participants