[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#776267: lintian: Add check for unsupported PyPI URL in debian/watch



On 25-Jan-2015, James McCoy wrote:
> Through a discussion on IRC, it came up that many of the Python Team
> maintained packages use http(s)://pypi.python.org/packages/source/...
> URLs, which aren't currently working.  Turns out that's not a URL that
> should be relied upon

Thanks, the reference to <URL:https://wiki.python.org/moin/PyPISimple>
is helpful.

> and http(s)://pypi.python.org/simple/... should be used instead.

But from experimenting just now, simply replacing ‘/packages/source/’
with ‘/simple/’ is not enough.

The “simple API” page has URLs with leading paths, and fragment
identifiers, so they won't match. They also need to be parsed with the
‘filenamemangle’ option to find the actual filename from the URL.

Instead, the replacement for:

    https://pypi.python.org/packages/source/p/pip/ \
        pip-(\S+)\.tar\.gz

needs to be something like:

    opts="filenamemangle=s/\S+\/([^\/]+\.tar\.gz)#md5=[[:alnum:]]+$/$1/" \
        https://pypi.python.org/simple/pip/ \
        \S+/pip-(\S+)\.tar\.gz#md5=[[:alnum:]]+

Perhaps something clearer already exists, to suggest as a uscan
configuration replacement. Where is it documented?

> The attached patch adds a new check for this, referring to the
> upstream documentation for this "simple HTML" API[0].

The Lintian tag description should point to a document that explains
in detail how to re-write the uscan configuration for this new PyPI
API.

Unfortunately the information at the upstream documentation is not
specific to Debian's uscan, and isn't sufficient to write a working
configuration.

Does the Debian project already have this documented? That would be a
better reference in the Lintian tag description.

-- 
 \                “I got fired from my job the other day. They said my |
  `\          personality was weird. … That's okay, I have four more.” |
_o__)                                       —Bug-Eyed Earl, _Red Meat_ |
Ben Finney <ben@benfinney.id.au>

Attachment: signature.asc
Description: Digital signature


Reply to: