Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Package naming convention [was: Re: [PATCH 1/2] scanpypi: new utility]
Date: Wed, 15 Jul 2015 16:17:08 +0200	[thread overview]
Message-ID: <55A66B64.5090603@mind.be> (raw)
In-Reply-To: <916572081.3104684.1436969298786.JavaMail.root@openwide.fr>

 Hi all,

 A topic for all to discuss here...

On 07/15/15 16:08, Denis Thulin wrote:
[snip]
>>> +def pkg_buildroot_name(pkg_name):
>>> +    """
>>> +    Returns name to avoid troublesome characters.
>>
>>  No it doesn't.
>>
>> Returns the buildroot package name for the PyPI package pkg_name.
>>
>>
>>  In fact, the function should also prepend the python- prefix,
>>  because the
>> buildroot name starts with python-.
> 
> Actually, I have a question here, should I change . into - or into nothing ?
> I'm asking this because when looking into existing packages I noticed 'web.py'
> became 'python-webpy' but 'zope.interface' became 'python-zope-interface'

 Good question, we indeed have no real convention of what the buildroot name is
for packages with weird characters.

 Actually, we do: keep the upstream name as much as possible. So python-webpy,
for instance, keeps the upstream webpy name (note that the upstream name is
webpy, even though the package is identified in PyPI as web.py. PyPI isn't very
consistent either). For zope.interface, I actually see no reason not to keep the
upstream name, so the package really should have been called
python-zope.interface IMHO.

 What do the others think?

 BTW Thanks Denis for pointing this out.

 Regards,
 Arnout

> 
>>
>>> +    Remove all non alphanumeric characters except -
>>> +    Also lowers the name
>>> +
>>> +    Keyword arguments:
>>> +    pkg_name -- String to rename
>>> +    """
>>> +    name = re.sub('[^\w-]', '', pkg_name.lower())
>>> +    name = re.sub('^python-', '', name)
>>> +    return name
[snip]

-- 
Arnout Vandecappelle      arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2015-07-15 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 13:31 [Buildroot] [PATCH 0/2] python-package-generator Denis THULIN
2015-07-09 13:31 ` [Buildroot] [PATCH 1/2] scanpypi: new utility Denis THULIN
2015-07-11 12:56   ` Arnout Vandecappelle
2015-07-15 14:08     ` Denis Thulin
2015-07-15 14:17       ` Arnout Vandecappelle [this message]
2015-08-08 10:59         ` [Buildroot] Package naming convention [was: Re: [PATCH 1/2] scanpypi: new utility] Thomas Petazzoni
2015-07-09 13:31 ` [Buildroot] [PATCH 2/2] python-robotframework: New package Denis THULIN
2015-07-11 15:39   ` Arnout Vandecappelle

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=55A66B64.5090603@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox