Closed smithara closed 6 days ago
@dstansby Sorry it looks like the new cdflib conda package can also fail pip check
because pip reports the version as 0.0.0
:
+ pip check
viresclient 0.11.0 has requirement cdflib>=0.3.9, but you have cdflib 0.0.0.
In a new environment (from mamba create --name cdflib python=3.10 cdflib
):
$ mamba list | grep cdflib
cdflib 0.4.8 pyhd8ed1ab_0 conda-forge
$ pip list | grep cdflib
cdflib 0.0.0
It might be something to do with setuptools_scm
? Installing from the pip package reports 0.4.8 correctly in pip list
, but in both cases the __version__
string gives 'unknown'
Thanks for (re-)reporting. I think I've fixed it at https://github.com/MAVENSDC/cdflib/pull/173, and I've done a release of 0.4.9 on PyPI. Would you be able to re-open your PR to add pip check to the tests here to make sure this doesn't break again?
This should be fixed now.
Hmm it still seems to be wrong. The __version__
string now reports correctly but pip list
(with the conda package) still reports as 0.0.0
.
I realised that the pip check
added to the recipe here will just check that dependencies are okay so it doesn't catch that error here. i.e. that will only find it if I run pip check for a user of cdflib:
$ pip check cdflib
viresclient 0.11.1 has requirement cdflib>=0.3.9, but you have cdflib 0.0.0.
as in https://github.com/conda-forge/viresclient-feedstock/pull/4
Might be a solution? https://conda-forge.org/docs/maintainer/knowledge_base.html#using-setuptools-scm
Hi @smithara I don't suppose you know if this is still an issue? the pip check
command in the CI passes: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1010716&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=986b1512-c876-5f92-0d81-ba851554a0a3&l=1026
@Cadair sorry I confused the issues here. pip check
passes in an environment with just cdflib installed (so passes in the cdflib feedstock build), but can fail when a conda package depending on cdflib is installed, because the cdflib conda package is reported as version 0.0.0
by pip
I can get this to show the right version if I change it to install from the wheel instead of the source
i.e. in meta.yaml
changing
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
to
url: https://pypi.io/packages/py3/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}-py3-none-any.whl
but I haven't figured out why that works.
It is possibly because dynamic = ["version"]
is not set in the pyproject.toml
?
@smithara Do you want to see if #38 has fixed the issue? I am not convinced it has, but maybe?
I think it is fixed now, thanks!
Solution to issue cannot be found in the documentation.
Issue
Found when creating feedstock for viresclient (https://github.com/conda-forge/staged-recipes/pull/20918) which depends on cdflib
In an environment without
attrs
, runningpip check
with cdflib fails becauseattrs
is not included in the conda recipe but it is in the pip dependenciesInstalled packages
Environment info