pytest-dev / pytest-runner

MIT License
56 stars 21 forks source link

Version 5.0 causes pkg_resources.DistributionNotFound #49

Closed dommorin closed 5 years ago

dommorin commented 5 years ago

Since release of 5.0, when installing our package on build machines, we get DistributionNotFound. I had to pin to "pytest-runner<5". Otherwise, using:

setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-cov', 'coverage', 'requests_mock'],
jaraco commented 5 years ago

That's good, and that's what's expected to happen. You have two options - pin to pytest-runner < 5 or upgrade to setuptools >= 30.4. I attempted to warn about this in the pytest-runner 4.4 release.

jaraco commented 5 years ago

I shouldn't say "that's good". What I mean to say is, that's expected and unfortunate... but I don't see any other way forward.

jaraco commented 5 years ago

Ugh. I do see that the changelog was not at all explicit about this change. I can definitely improve that.

jaraco commented 5 years ago

I know there are people hurting from this. The more I think about it, the less comfortable I am with this change. Perhaps there's a small shim I could add for compatibility that would allow the rest of these changes to be accepted without breaking all the workflows.

But before I embark on that possibility, can I get some feedback from those this affects - how difficult is it to adapt your work flow to adopt one of the proposed workarounds?

dommorin commented 5 years ago

Updating setuptools for py34 will not happen any time soon. I would stick to pytest-runner<5 everywhere until I need to update setuptools for py34 (or until devops does the upgrade on ubuntu agents). So the workaround is good for us as long as pytest-runner<5 is supported.

MightySCollins commented 5 years ago

The problem we faced is that it was one of our dependencies which did not pin the version. (Causing is some nice deployment fails) We can try and get this changed but it might take some time.

ianling commented 5 years ago

I am experiencing this during a CI build that attempts to install flake8-print (which requires pytest-runner). It is causing my builds to fail.

jaraco commented 5 years ago

I'm thinking that pytest-runner should just buck up and supply enough metadata in setup.py that it works on older setuptools versions.

jaraco commented 5 years ago

Okay. I believe 5.1 should surgically address the issue. Please let me know if it does not.