From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: guix-devel@gnu.org
Subject: [PATCH v2] doc: Add guide how to specify dependencies for Python packages
Date: Mon, 10 Oct 2016 18:15:23 +0200 [thread overview]
Message-ID: <1476116123-20994-1-git-send-email-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <878tu1gpi2.fsf@gnu.org>
* doc/guix.texi (Python Modules): New sub-subsection "Specifying
Dependencies".
---
doc/guix.texi | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 57821c5..6d74f4e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12251,6 +12251,53 @@ starts with @code{py} (e.g. @code{pytz}), we keep it and prefix it as
described above.
+@subsubsection Specifying Dependencies
+@cindex inputs, for Python packages
+
+This section helps mapping the parameters given to @code{setup()} in the
+@file{setup.py} file to the different types of package inputs
+@xref{package Reference}. To verify and detail the information found
+in @file{setup.py} it is recommended to @command{grep} the source, and
+have a look at any @file{requirements.txt}, @file{tox.ini}, or
+@file{.travis.yml} file.
+
+@itemize
+
+@item
+Python packages required at run time need to go into @pxref{package
+Reference, @code{propagated-inputs}}. These are typically defined in
+@code{install_requires}, or in a @file{requirements.txt} file.
+
+@item
+Python packages required only for building (e.g. to be found in
+@code{setup_requires}) or testing (e.g. to be found in
+@code{tests_require}) go into @pxref{package
+Reference, @code{native-inputs}}. Examples are @emph{setuptools},
+@emph{pytest}, @emph{mock}, and @emph{nose}. Of course if any of these
+packages is required at run-time, it needs to go to
+@code{propagated-inputs}.
+
+@item
+@code{inputs} only contain programs or C libraries required for building
+Python packages containing C extensions.
+
+@item
+If a Python package has optional dependencies (@code{extras_require}),
+these are not listed here at all--except if these are used for testing
+in which case they go to @code{native-inputs}.
+
+@item
+If a packages has complicated optional extra dependencies you may want
+to define another package to ease resolving these dependencies for the
+user. E.g. @code{python-abcdef-ssh} inherits @code{python-abcdef} and
+adds the dependencies required for the @emph{ssh} extra feature.
+
+Optional dependencies are discusses in detail in @ref{Submitting
+Patches}.
+
+@end itemize
+
+
@node Perl Modules
@subsection Perl Modules
--
2.7.4
next prev parent reply other threads:[~2016-10-10 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 9:00 [PATCH] doc: Add guide how to specify dependencies for Python packages Hartmut Goebel
2016-10-04 9:06 ` Hartmut Goebel
2016-10-06 21:02 ` Ludovic Courtès
2016-10-07 7:44 ` Hartmut Goebel
2016-10-10 16:15 ` Hartmut Goebel [this message]
2016-10-12 21:00 ` [PATCH v2] " Ludovic Courtès
2016-10-13 13:18 ` Hartmut Goebel
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=1476116123-20994-1-git-send-email-h.goebel@crazy-compilers.com \
--to=h.goebel@crazy-compilers.com \
--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).