* doc/guix.texi (Python Modules): New sub-subsection "Specifying Dependencies". --- doc/guix.texi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi index 9bd8b43..f51ab75 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12194,6 +12194,43 @@ 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 + +@itemize + +@item +All Python package required at run-time need to go into +@code{propagated-inputs}. These are typically defined in +@code{install_requires} or in a requirements-file. + +@item +Python packages required only for building (to be found e.g. in +@code{setup_requires}) or testing (to be found e.g. in +@code{tests_require}) go into @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 be +set in @code{propagated-inputs}. + +@item +@code{inputs} only contain programs or C-libraries (and such) required +for building Python packages containing c-extensions (or such). + +@item +If a Python package has optional extra dependencies +(@code{extras_require}), not these are not listed here at all - except +if there is a test-case in which case they are added 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. + +@end itemize + + @node Perl Modules @subsection Perl Modules -- 2.7.4