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

Not possible to install backoff from source distribution #67

Closed
garbas opened this issue Dec 23, 2018 · 15 comments
Closed

Not possible to install backoff from source distribution #67

garbas opened this issue Dec 23, 2018 · 15 comments

Comments

@garbas
Copy link

garbas commented Dec 23, 2018

Hi,

with a switch to poetry it is not possible to install backoff using pip from source distribution.

$ pip install backoff --no-binary :all:

I reported the issue to poetry (python-poetry/poetry#760), but I thought it would make also sense to report it here. Read issue on poetry for longer version of the problem.

Would it be possible to switch back to setup.py? For now I'm pinning to older version of backoff. In any case thank you for your work and time.

@bgreen-litl
Copy link
Member

Ugh.

I followed a trail of comments and issues from python-poetry/poetry#760 and it sounds like the issue might possibly be fixed by a forthcoming version of pip? pypa/pip#5739

I also read that flit had a similar issue with circular build dependencies but ended up working around it even without an updated pip. I would rather try to stick to the PEP 517 route rather than convert back to setuptools if I can help it. That could mean either waiting for a pip or poetry update or maybe we could look into using flit if that is immune from this issue.

@garbas
Copy link
Author

garbas commented Dec 25, 2018

@bgreen-litl I tested with current pip from master and the problem still persists. pep 517 (as expected) doesn't solve the problem of circular dependencies within build dependencies.

I would rather see poetry being fixed, so maybe lets wait for a resolution from that discussion.

Maybe a quick resolution would be to generate setup.py using https://pypi.org/project/poetry-setup, as part of the release process. I never tried it, but I guess that should work.

bgreen-litl pushed a commit to bgreen-litl/backoff that referenced this issue Dec 27, 2018
@bgreen-litl
Copy link
Member

Do you think this will work around your problem? #68

I simply ran poetry-setup and checked in the generated requirements.txt and setup.py

@garbas
Copy link
Author

garbas commented Dec 28, 2018

in short: Still doesn't work, but if remove pyproject.toml then it works.

Here is what is did to test:

  1. install pip from master
% cd /tmp
% git clone https://github.com/pypa/pip
% cd pip
% virtualenv env
% ./env/bin/pip install -e .
  1. Install backoff via url
% ./env/bin/pip install --no-binary :all: https://github.com/bgreen-litl/backoff/archive/e9a43c09d7155c8ad5e00af529c46450a08568d4.zip
...
LookupError: https://files.pythonhosted.org/packages/f7/f7/bbd9213bfe76cb7821c897f9ed74877fd74993b4ca2fe9513eb5a31030f9/tomlkit-0.5.3.tar.gz#sha256=d6506342615d051bc961f70bfcfa3d29b6616cc08a3ddfd4bc24196f16fd4ec2 (from https://pypi.org/simple/tomlkit/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) is already being built: tomlkit<0.6.0,>=0.5.1 from https://files.pythonhosted.org/packages/f7/f7/bbd9213bfe76cb7821c897f9ed74877fd74993b4ca2fe9513eb5a31030f9/tomlkit-0.5.3.tar.gz#sha256=d6506342615d051bc961f70bfcfa3d29b6616cc08a3ddfd4bc24196f16fd4ec2 (from poetry>=0.12)
  1. Install backoff from path without pyproject.toml
% cd /tmp
% git clone https://github.com/bgreen-litl/backoff
% cd backoff
% git checkout poetry-setup
% rm pyproject.toml
% cd ../pip
% ./env/bin/pip install --no-binary :all: ../backoff
Processing /tmp/backoff
Skipping bdist_wheel for backoff, due to binaries being disabled for it.
Installing collected packages: backoff
  Running setup.py install for backoff ... done
Successfully installed backoff-1.8.0

@bgreen-litl
Copy link
Member

I'm still poking into this upsteam, but does pip install --no-use-pep517 . allow you to do the setup.py build without removing pyproject.toml?

@cawilliamson
Copy link

@garbas Is there any flags I can pass to pypi2nix so that I can test the question above?

I'm itching to package up the latest Apache Airflow build for NixOS but I can't using pypi2nix until this is resolved.

@tsplude
Copy link

tsplude commented Jan 13, 2020

Are there any plans to address this? My team as well as others at the company are pinning to 1.6.0 as our build process requires installing dependencies from source

@zgoda
Copy link

zgoda commented Jan 22, 2020

I have pip at 20.0.1 and this still fails.

It makes not possible to use backoff as AWS Lambda dependency.

@bgreen-litl
Copy link
Member

This is frustrating because the only way I'm sure how to fix this is to go back to setuptools. I can try to take another stab at finding a workaround.

@albertomurillo
Copy link

albertomurillo commented Mar 21, 2020

@bgreen-litl
Don't let your fans down because of somebody else (poetry) problem.

@wooyek
Copy link

wooyek commented Sep 30, 2020

Is there a plan to release a fix for this?

@bgreen-litl
Copy link
Member

It appears that poetry might have a fix for this now?

python-poetry/poetry#760 (comment)

Would someone be willing to test this?

@bgreen-litl
Copy link
Member

This seems fixed? I didn't do anything on the backoff side, but it seems this was fixed upstream...

$ pip install backoff --no-binary :all:
Collecting backoff
  Downloading backoff-1.10.0.tar.gz (13 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: backoff
  Building wheel for backoff (PEP 517) ... done
  Created wheel for backoff: filename=backoff-1.10.0-py2.py3-none-any.whl size=12843 sha256=38a4acc7ba434397bc4f8922be6d530be710c9d275a853ad75cdd82fef55d994
  Stored in directory: /Users/rgreen/Library/Caches/pip/wheels/25/a9/aa/07a70ee055ad3e343004e668a35520446862dae7611c115da0
Successfully built backoff
Installing collected packages: backoff
Successfully installed backoff-1.10.0

Am I missing anything?

@zgoda
Copy link

zgoda commented Dec 31, 2020

Works fine now.

@bgreen-litl
Copy link
Member

Closing, as this seems to work fine now.

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

7 participants