From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH] doc: Add guide how to specify dependencies for Python packages Date: Tue, 4 Oct 2016 11:00:30 +0200 Message-ID: <1475571630-27701-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brLaW-000625-Do for guix-devel@gnu.org; Tue, 04 Oct 2016 05:00:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brLaT-0006JP-94 for guix-devel@gnu.org; Tue, 04 Oct 2016 05:00:36 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:47332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brLaT-0006Ih-28 for guix-devel@gnu.org; Tue, 04 Oct 2016 05:00:33 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3spCYX0Hgjz3hlN9 for ; Tue, 4 Oct 2016 11:00:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3spCYW6M5SzvkV3 for ; Tue, 4 Oct 2016 11:00:31 +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 bcvOLLj7Xe3D for ; Tue, 4 Oct 2016 11:00:31 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-145-152.dynamic.mnet-online.de [188.174.145.152]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Tue, 4 Oct 2016 11:00:30 +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 623D660745 for ; Tue, 4 Oct 2016 11:00:30 +0200 (CEST) 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 | 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