From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <1476116123-20994-1-git-send-email-h.goebel@crazy-compilers.com> References: <878tu1gpi2.fsf@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdEi-0003bJ-8A for guix-devel@gnu.org; Mon, 10 Oct 2016 12:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btdEd-000522-Q8 for guix-devel@gnu.org; Mon, 10 Oct 2016 12:15:32 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:55382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdEd-00051b-Jj for guix-devel@gnu.org; Mon, 10 Oct 2016 12:15:27 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3st4wZ3WK3z3hjWr for ; Mon, 10 Oct 2016 18:15:26 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3st4wZ2Q4SzvkWS for ; Mon, 10 Oct 2016 18:15:26 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id SbYn5bvmCpS0 for ; Mon, 10 Oct 2016 18:15:25 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-147-59.dynamic.mnet-online.de [188.174.147.59]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Mon, 10 Oct 2016 18:15:24 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 03D2160B40 for ; Mon, 10 Oct 2016 18:15:24 +0200 (CEST) In-Reply-To: <878tu1gpi2.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@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