all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Agreeing on some "rules" for packaging.
Date: Wed, 28 Aug 2013 22:56:16 +0200	[thread overview]
Message-ID: <20130828205616.GA12493@debian> (raw)
In-Reply-To: <521E423C.7010107@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

Please find attached a patch with proposed conventions for package names,
including in the presence of packages for several version numbers
(such as python itself), and for python modules.

Andreas


[-- Attachment #2: 0001-doc-Add-package-guidelines-for-names-and-numbers.patch --]
[-- Type: text/x-diff, Size: 3935 bytes --]

From ee85f3dbe9ec38abffd08971be27b876634392ee Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Wed, 28 Aug 2013 22:51:20 +0200
Subject: [PATCH] doc: Add package guidelines for names and numbers.

* doc/guix.texi: Three new subsections.
---
 doc/guix.texi |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 81 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index dfffdbf..ca2871b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1631,7 +1631,10 @@ needed is to review and apply the patch.
 
 
 @menu
-* Software Freedom::                         What may go into the distribution.
+* Software Freedom::     What may go into the distribution.
+* Package Naming::       What's in a name?
+* Version Numbers::      When the name is not enough.
+* Python Modules::       Taming the snake.
 @end menu
 
 @node Software Freedom
@@ -1654,6 +1657,83 @@ reject non-free firmware, recommendations of non-free software, and
 discuss ways to deal with trademarks and patents.
 
 
+@node Package Naming
+@subsection Package Naming
+
+A package has actually two names associated to it:
+First, there is the name of the @emph{Scheme variable}, the one following
+@code{define-public}. By this name, the package can be made known in the
+Scheme code, for instance as input to another package.
+Second, there is the string in the @code{name} field of a package definition.
+This name is used by the package manager.
+
+Both are usually the same and correspond to the lowercase conversion of the
+project name chosen by upstream. For instance, the GNUnet project is packaged
+as @code{gnunet}. We do not add @code{lib} prefixes for library packages,
+unless these are already part of the official project name.
+But see @ref{Python Modules} for special rules concerning modules for
+the Python language.
+
+
+@node Version Numbers
+@subsection Version Numbers
+
+We usually package only the latest version of a given free software
+project. But sometimes, for instance for incompatible library versions,
+two (or more) versions of the same package are needed. These require different
+Scheme variable names. We use the name as defined in @ref {Package Naming}
+for the most recent version; previous versions use the same name, suffixed
+by @code{-} and the smallest prefix of the version number that may
+distinguish the two versions.
+
+The name inside the package definition is the same for all versions of a
+package and does not contain any version number.
+
+For instance, the versions 2.24.20 and 3.9.12 of GTK+ may be packaged as follows:
+@example
+(define-public gtk+
+  (package
+   (name "gtk+")
+   (version "3.9.12")
+   ...))
+(define-public gtk+-2
+  (package
+   (name "gtk+")
+   (version "2.24.20")
+   ...))
+@end example
+If we also wanted GTK+ 3.8.2, this would be packaged as
+@example
+(define-public gtk+-3.8
+  (package
+   (name "gtk+")
+   (version "3.8.2")
+   ...))
+@end example
+
+
+@node Python Modules
+@subsection Python Modules
+
+We currently package Python 2 and Python 3, under the Scheme variable names
+@code{python-2} and @code{python} as explained in @ref{Version Numbers}.
+To avoid confusion and naming clashes with other programming languages, it
+seems desirable that the name of a package for a Python module contains
+the word @code{python}.
+Some modules are compatible with only one version of Python, others with both.
+If the package Foo compiles only with Python 3, we name it
+@code{python-foo}; if it compiles only with Python 2, we name it
+@code{python2-foo}. If it is compatible with both versions, we create two
+packages with the corresponding names.
+
+If a project already contains the word @code{python}, we drop this;
+for instance, the module python-dateutil is packaged under the names
+@code{python-dateutil} and @code{python2-dateutil}.
+
+
+
+
+
 @node Bootstrapping
 @section Bootstrapping
 
-- 
1.7.10.4


  reply	other threads:[~2013-08-28 20:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 21:46 Agreeing on some "rules" for packaging Cyril Roelandt
2013-08-27 22:31 ` Nikita Karetnikov
2013-08-28  6:29 ` Andreas Enge
2013-08-28 12:51 ` Ludovic Courtès
2013-08-28 18:32   ` Cyril Roelandt
2013-08-28 20:56     ` Andreas Enge [this message]
2013-08-28 22:42       ` Ludovic Courtès
2013-08-28 22:37         ` Cyril Roelandt
2013-08-29  8:59           ` Ludovic Courtès
2013-08-30 21:59         ` Andreas Enge
2013-08-31  9:31           ` Ludovic Courtès
2013-08-31 10:00             ` Andreas Enge
2013-08-31 10:22               ` Ludovic Courtès
2013-08-28 20:57     ` Ludovic Courtès
2013-08-30 18:15 ` Nikita Karetnikov
2013-08-30 19:35   ` Ludovic Courtès
2013-08-30 21:09     ` Nikita Karetnikov
2013-08-30 21:22       ` Ludovic Courtès
2013-08-30 21:49     ` Ludovic Courtès
2013-09-07  8:20 ` Nikita Karetnikov
2013-09-07  8:36   ` Andreas Enge
2013-09-07 13:11   ` Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130828205616.GA12493@debian \
    --to=andreas@enge.fr \
    --cc=guix-devel@gnu.org \
    --cc=tipecaml@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.