From: Christopher Baines <mail@cbaines.net>
To: guix-devel@gnu.org
Subject: Prototype for using Guix with python packages
Date: Tue, 6 Sep 2016 07:26:23 +0100 [thread overview]
Message-ID: <4174c012-8e2b-d6f2-8387-031e309b7daf@cbaines.net> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 3262 bytes --]
For a few months now, I've been assembling a prototype for how packages
could be produced for software released as Python source distributions
(sdists) [1].
I wanted to build something that was as useful as any similar tool. The
functionality offered by pip [2] was something I looked at, as through
it you can use a large amount of software from the main PyPI [3],
including many different versions of the same project and use the
setuptools feature of extras [4] which allow for optional dependencies.
This differs from the functionality currently offered by the python
packages found in the Guix repository currently, as the number is much
smaller than available on PyPI, and typically only one release is available.
I've now managed to build a system which in a very automated way can
acquire sdists, determine there dependencies, use a full dependency
resolver to determine exactly what version of each dependency to use
across the entire build graph, and convert that graph in to Guix package
records, which can then be built.
Due to the wonderful power of Guix, this should be reasonably easy to
try out. I have imported a piece of software called sentry (as it was
something I was interested in using at the time) and all of its
dependencies in to the repository at [5]. You can find the instructions
here [5] for generating a package for sentry from this information.
My plan was to work towards something that could be run automatically to
stay up to date with a PyPI, so I tried to even automatically solve as
many issues as possible, e.g. dependency looks, so if you look at the
build graph for sentry (attached, and the command to generate it is here
[5]), you should be able to see that the tests are run for setuptools,
something that is not even done for the package in the Guix repository.
I don't view this as a good long term approach, as I'm really hoping
that maybe one day, Guix could help to reduce the specific nature in
which software written in different languages is packaged/released. But
until that happens, I think something like this could be very useful at
getting some of the value that Guix provides quickly, without lots of
manual effort.
The code is very rough as I took a lot of shortcuts to get things
working, and I have lots of ideas for things I would like to change and
improve, but as I have been working on this for so long, I thought it
was time to publish it.
I will also try to look at how what I have been doing could be used to
improve the Guix PyPI importer and the Python build system, as well as
submit the packages that are currently just in the guix-env.scm file in
the repository (pyguile, libsolv) for inclusion in Guix.
I'm quite excited by the possibilities offered by approaches like this,
and was wondering if anyone has feedback, questions, opinions, or if
anyone is working on something similar?
Thanks,
Chris
1: https://docs.python.org/2/distutils/sourcedist.html
2: https://pypi.python.org/pypi/pip
3: https://pypi.python.org/pypi
4:
http://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
5: http://git.cbaines.net/guix-python-integration-project/about/
[-- Attachment #1.1.2: sentry-graph.pdf --]
[-- Type: application/pdf, Size: 75204 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 955 bytes --]
next reply other threads:[~2016-09-06 6:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 6:26 Christopher Baines [this message]
2016-09-07 14:01 ` Prototype for using Guix with python packages Ludovic Courtès
2016-09-10 13:09 ` Christopher Baines
2016-09-11 13:43 ` Ludovic Courtès
2016-09-11 14:25 ` Christopher Baines
2016-09-11 20:34 ` Ludovic Courtès
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=4174c012-8e2b-d6f2-8387-031e309b7daf@cbaines.net \
--to=mail@cbaines.net \
--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).