zuzukin / whl2conda

Generate conda package from pure python wheel
https://zuzukin.github.io/whl2conda/
Apache License 2.0
6 stars 2 forks source link

Translate version specifiers #84

Closed analog-cbarber closed 10 months ago

analog-cbarber commented 1 year ago

Version specifiers in dependencies are simply copied from the wheel without modification. This works for many cases, but since the version comparison operators for pip and conda are slightly different, some version specifiers will not work properly in conda. Specifically,

(There are other operations supported by conda but not pip, but the are not a concern when translating from pip specifiers.)

As a workaround, users can switch to compatible specifier syntax when possible and otherwise can remove the offending package and add it back with compatible specifier syntax, e.g.:

whl2conda mywheel-1.2.3-py3-none-any.whl -D foo -A 'foo >=1.2.3,1.2.*'