guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] doc: Add guide how to specify dependencies for Python package


From: Hartmut Goebel
Subject: [PATCH v2] doc: Add guide how to specify dependencies for Python packages
Date: Mon, 10 Oct 2016 18:15:23 +0200

* 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.
 
 
address@hidden Specifying Dependencies
address@hidden inputs, for Python packages
+
+This section helps mapping the parameters given to @code{setup()} in the
address@hidden file to the different types of package inputs
address@hidden 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
address@hidden file.
+
address@hidden
+
address@hidden
+Python packages required at run time need to go into @pxref{package
+Reference, @code{propagated-inputs}}. These are typically defined in
address@hidden, or in a @file{requirements.txt} file.
+
address@hidden
+Python packages required only for building (e.g. to be found in
address@hidden) or testing (e.g. to be found in
address@hidden) go into @pxref{package
+Reference, @code{native-inputs}}.  Examples are @emph{setuptools},
address@hidden, @emph{mock}, and @emph{nose}.  Of course if any of these
+packages is required at run-time, it needs to go to
address@hidden
+
address@hidden
address@hidden only contain programs or C libraries required for building
+Python packages containing C extensions.
+
address@hidden
+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}.
+
address@hidden
+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}.
+
address@hidden itemize
+
+
 @node Perl Modules
 @subsection Perl Modules
 
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]