You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using conda-lock for a while now and I am experiencing issues since the update to the new major version.
Issue
If I run conda-lock to create a lockfile based on a conda-build recipe, I can no longer use the full package specification syntax as defined by conda. If I use a specifier, which is not PEP508/PEP440 compliant, but is a valid conda package specification (single =), the process crashes with pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'=3'": Expected stringEnd (see details section)
Environment
conda-lock version: 1.0.2=pyhd8ed1ab_0 python version: 3.8.10
System used: Windows 10 Enterprise 20H2
Details
The issue can be reproduced with a minimal meta.yaml as following:
The invocation is equivalent to: conda lock -p win-64 --file C:Temp\meta.yaml
The issue lies in conda_lock\src_parser\pyproject_toml.py, line 239, in the function parse_python_requirement. It uses pkg_resources.Requirement. As conda does not support the ~= version specifier and is giving a pending deprecation warning if using the asterisk together with the == specifier (e.g. python==3.*), I see no immediate and convenient solution to this problem.
Contrary to the issue while using the build recipe as source, the exact same version specifier used in an environment.yml file is working as expected.
All 1.x.x versions show this behavior, whereas the last prior version 0.13.2 is working as expected.
The text was updated successfully, but these errors were encountered:
Hi there
I am using
conda-lock
for a while now and I am experiencing issues since the update to the new major version.Issue
If I run
conda-lock
to create a lockfile based on aconda-build
recipe, I can no longer use the full package specification syntax as defined byconda
. If I use a specifier, which is not PEP508/PEP440 compliant, but is a valid conda package specification (single=
), the process crashes withpkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'=3'": Expected stringEnd
(see details section)Environment
conda-lock
version:1.0.2=pyhd8ed1ab_0
python
version:3.8.10
System used: Windows 10 Enterprise 20H2
Details
The issue can be reproduced with a minimal
meta.yaml
as following:The invocation is equivalent to:
conda lock -p win-64 --file C:Temp\meta.yaml
The issue lies in conda_lock\src_parser\pyproject_toml.py, line 239, in the function
parse_python_requirement
. It usespkg_resources.Requirement
. As conda does not support the~=
version specifier and is giving a pending deprecation warning if using the asterisk together with the==
specifier (e.g.python==3.*
), I see no immediate and convenient solution to this problem.Contrary to the issue while using the build recipe as source, the exact same version specifier used in an
environment.yml
file is working as expected.All
1.x.x
versions show this behavior, whereas the last prior version0.13.2
is working as expected.The text was updated successfully, but these errors were encountered: