From: Amirouche Boubekki <amirouche@hypermove.net>
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: guix-devel@gnu.org, guix-devel-bounces+amirouche=hypermove.net@gnu.org
Subject: Re: [PATCH] import: pypi: Detect inputs.
Date: Sat, 20 Jun 2015 20:01:39 +0200 [thread overview]
Message-ID: <f6f9561e4a2b46d7771becff68a91f7b@hypermove.net> (raw)
In-Reply-To: <87twu3btmq.fsf@earlgrey.lan>
[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]
On 2015-06-19 17:32, Christopher Allan Webber wrote:
> Amirouche Boubekki writes:
>
>> Héllo,
>>
>>
>> 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:
>>
>> - 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
>
> Using pip freeze is an interesting idea.
>
> Setting up a virtualenv... that's interesting. Would it be written to
> a
> temporary directory?
My bad, it's probably not a good idea to have that without containers,
as it execute some code that we don't know what it does - the setup.py.
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
environment`.
Using `guix environment` might be a good idea to prepapre a recipe
without polluting its own profile.
HTH.
[-- Attachment #2: pypi-guess-deps.sh --]
[-- Type: text/plain, Size: 362 bytes --]
if [ $1 ]
then
wget -q $1 -O - | tar xz > .pypi-guess-deps.log 2>&1
virtualenv .venv >> .pypi-guess-deps.log 2>&1
source .venv/bin/activate >> .pypi-guess-deps.log 2>&1
cd * && python setup.py install >> .pypi-guess-deps.log 2>&1
pip freeze -l
else
echo "Usage: pypi-guess-deps.sh PACKAGE-URL
log is written to `pypi-guess-deps.log`
"
fi
next prev parent reply other threads:[~2015-06-20 18:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 23:51 [PATCH] import: pypi: detect requirements from requirements.txt Cyril Roelandt
2015-03-08 0:41 ` David Thompson
2015-03-22 21:05 ` [PATCH] import: pypi: Detect inputs Cyril Roelandt
2015-03-26 13:15 ` Ludovic Courtès
2015-03-27 12:36 ` David Thompson
2015-03-29 13:46 ` Ludovic Courtès
2015-06-04 22:56 ` Cyril Roelandt
2015-06-07 20:03 ` Ludovic Courtès
2015-06-15 1:25 ` Cyril Roelandt
2015-06-18 10:45 ` Amirouche Boubekki
2015-06-19 15:32 ` Christopher Allan Webber
2015-06-20 18:01 ` Amirouche Boubekki [this message]
2015-06-21 20:56 ` Ludovic Courtès
2015-06-21 21:32 ` Amirouche Boubekki
2015-06-23 21:04 ` Cyril Roelandt
2015-06-24 19:49 ` Ludovic Courtès
2015-06-24 21:42 ` Cyril Roelandt
2015-03-22 21:05 ` [PATCH] import: pypi: detect requirements from requirements.txt Cyril Roelandt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6f9561e4a2b46d7771becff68a91f7b@hypermove.net \
--to=amirouche@hypermove.net \
--cc=cwebber@dustycloud.org \
--cc=guix-devel-bounces+amirouche=hypermove.net@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).