From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amirouche Boubekki Subject: Re: [PATCH] import: pypi: Detect inputs. Date: Sat, 20 Jun 2015 20:01:39 +0200 Message-ID: References: <87d217uvzd.fsf@gnu.org> <1434331554-13170-1-git-send-email-tipecaml@gmail.com> <87twu3btmq.fsf@earlgrey.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_a04f024e676c62d2b4f4ff3b010565ee" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6N5R-0008JP-9x for guix-devel@gnu.org; Sat, 20 Jun 2015 14:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6N5Q-00070C-DG for guix-devel@gnu.org; Sat, 20 Jun 2015 14:01:49 -0400 In-Reply-To: <87twu3btmq.fsf@earlgrey.lan> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Christopher Allan Webber Cc: guix-devel@gnu.org, guix-devel-bounces+amirouche=hypermove.net@gnu.org --=_a04f024e676c62d2b4f4ff3b010565ee Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-06-19 17:32, Christopher Allan Webber wrote: > Amirouche Boubekki writes: >=20 >> H=C3=A9llo, >>=20 >>=20 >> 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=20 >> to >> do that would be to: >>=20 >> - 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 >=20 > Using pip freeze is an interesting idea. >=20 > Setting up a virtualenv... that's interesting. Would it be written to=20 > a > temporary directory? My bad, it's probably not a good idea to have that without containers,=20 as it execute some code that we don't know what it does - the setup.py.=20 The best way to go is to parse the setup.py *and* requirements.txt. I attached a script that does what I described without the `guix=20 environment`. Using `guix environment` might be a good idea to prepapre a recipe=20 without polluting its own profile. HTH. --=_a04f024e676c62d2b4f4ff3b010565ee Content-Transfer-Encoding: base64 Content-Type: text/plain; name=pypi-guess-deps.sh Content-Disposition: attachment; filename=pypi-guess-deps.sh; size=362 aWYgWyAkMSBdCnRoZW4KICAgIHdnZXQgLXEgJDEgLU8gLSB8IHRhciB4eiA+IC5weXBpLWd1ZXNz LWRlcHMubG9nIDI+JjEKICAgIHZpcnR1YWxlbnYgLnZlbnYgPj4gLnB5cGktZ3Vlc3MtZGVwcy5s b2cgMj4mMQogICAgc291cmNlIC52ZW52L2Jpbi9hY3RpdmF0ZSA+PiAucHlwaS1ndWVzcy1kZXBz LmxvZyAyPiYxCiAgICBjZCAqICYmIHB5dGhvbiBzZXR1cC5weSBpbnN0YWxsID4+IC5weXBpLWd1 ZXNzLWRlcHMubG9nIDI+JjEKICAgIHBpcCBmcmVlemUgLWwKZWxzZQogICBlY2hvICJVc2FnZTog cHlwaS1ndWVzcy1kZXBzLnNoIFBBQ0tBR0UtVVJMCgpsb2cgaXMgd3JpdHRlbiB0byBgcHlwaS1n dWVzcy1kZXBzLmxvZ2AKIgpmaQo= --=_a04f024e676c62d2b4f4ff3b010565ee--