On 06/18/2015 12:45 PM, Amirouche Boubekki wrote: > Héllo, > Hey,
> > If I'm not mistaken this patch relies only on the presence of > requirements.txt. This is not a required file in python packaging. > otherwise said, we miss a lot using this method. I think the best way to > do that would be to: > Indeed, requirements.txt is not required. Note that if this file does not exist, "guix import pypi" will not fail, so this patch should not be breaking anything. > - download the package and extract it > - create an environment (#) > - create a virtual env with access to system site package of the > environment (#) > - enter the venv and install the package > - use `pip freeze -l` to retrieve the full set of dependencies > That seems nice, but: 1) I would like to be able to determine whether we have the "right" version of all the dependencies in the current list of packages (if requirements.txt specifies "foobar>=2.0" and we only have python-foo-1.0 in Guix, the user should be told that python-foo should be upgraded), and pip freeze will just give you "pinned" versions (foo==2.0); 2) "pip freeze" will list everything that is installed in the virtual environment, including the dependencies of the actual dependencies, and we do not want that. > If it fails (because of missing system dependencies) fallback to parse > setup.py (with guile-log?) and plain requirements.txt. It would be nice > to allow to drop to guix environment (#) when the first option fails to > inspect and install missing system dependencies manually. > I really do not want to parse setup.py, because you can put any Python code you want in there, so parsing it properly would require a Python parser, and an AI that can determine what the code is meant to do. That might be a bit too complex. WDYT? Cyril.