scrapy_rss
scrapy_rss copied to clipboard
Wrong dependencies in Pypi package
Hi.
I just wanted to try out this package for a personal project, tried to install it with poetry (Python 3.8.2, poetry 1.0.3, pip 20.1), and go all kinds of dependency conflicts. It wanted to downgrade scrapy to version 1.4, use some old cryptography version, ...
I did some digging. If you extract the wheel package from Pypi, and look at the file metadata.json, you can see the requirements.
"run_requires": [{"requires": ["cryptography (<2.0)",
"pyOpenSSL (<17.3.0)",
"python-dateutil",
"scrapy (<1.5.0)",
"six"]}]
My guess is, that you created the wheel with Python 3.3. The trick that you did in the setup.py file doesn't work, if you package it into a wheel :
install_requires=['python-dateutil',
'scrapy<1.5.0' if sys.version_info[:2] == (3, 3)
else 'scrapy>=1.1,<1.8.0' if sys.version_info[:2] == (3, 4)
else 'scrapy>=1.1' if sys.version_info[:2] == (3, 5)
else 'scrapy>=1.3.1',
'six']
Not sure if it is possible to create on wheel that chooses different dependencies depending on the Python version. Maybe you need to create multiple wheels, one for each version.
As a fix for me, I'll just install the package directly via git.
Thank you for responding. I've replaced the universal wheel with interpreter specific wheels. Please check it.
:heavy_check_mark: First of, if I download the correct wheel file, and install it manually poetry add ./scrapy_rss-0.1.9-py38-none-any.whl, then it installs correctly.
:heavy_check_mark: Installing it with pip also works. E.g. in a new virtualenv, running pip install scrpy-rss will fetch the correct version and install scrapy 2.1.0, and not scrapy 1.4.0.
:heavy_multiplication_x: However, installing it with poetry add scrapy-rss will fail. It still demands scrapy 1.4.0.
I'm not sure why. Maybe it's a bug in poetry itself?
I think the reason is, that the 3.3 wheel, still specifies that it will run on all python versions. And poetry just picks it.
I think the reason is, that the 3.3 wheel, still specifies that it will run on all python versions. And poetry just picks it.
Py27 wheel has same classifiers and it's the first wheel in the list, but poetry picks the second py33 wheel. https://github.com/python-poetry/poetry/issues/2401