zuzukin / whl2conda

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

Support generic python package with pinned OS #51

Open analog-cbarber opened 1 year ago

analog-cbarber commented 1 year ago

This should apply the appropriate OS keys to the environment markers in dependencies.

jjhelmus commented 1 year ago

I'd particularly interested in the feature and can work on this.

Would using the environment markers from the running interpreter while providing an option to override the markers be a reasonable path forward? This would create a conda package that could be immediately installed into the environment that created it.

A few other items that should be considered when making generic python packages:

analog-cbarber commented 1 year ago

I think using the current interpreter's markers makes sense as a default, but we would definitely want to support command line arguments to build package for other platforms.

You should take a look at the conda install implementation to understand what it does for python packages. For python noarch packages at least it will move the site-packages directory to the appropriate place at install time. My thought was that we could basically generate a python noarch package but with the platform metadata pinned and encoded in the file name for disambiguation.

This issue is specifically for the case of a pinned OS but NOT a pinned python, so it would not be appropriate to ihclude byte compiled files. And I also don't want to generate packages that contain multiple site packages either. We just want to take advantage of the python support already inherent in conda install.