From richardjones at optushome.com.au  Thu Nov  3 23:19:55 2005
From: richardjones at optushome.com.au (Richard Jones)
Date: Fri, 4 Nov 2005 09:19:55 +1100
Subject: [Catalog-sig] [lfini@arcetri.astro.it: cannot submit a package]
In-Reply-To: <20051027223035.10365.1437255401.divmod.quotient.1113@ohm>
References: <20051027223035.10365.1437255401.divmod.quotient.1113@ohm>
Message-ID: <200511040919.55807.richardjones@optushome.com.au>

On Fri, 28 Oct 2005 08:30 am, Jean-Paul Calderone wrote:
> I've had the described problem when trying to update a project and not
> having sufficient permissions to do so.  The interface gives no indication
> that this is the case, since it is just a standard HTTP auth dialog.

There should be an explanation when the auth fails (unless you're using 
Safari, which doesn't display the content of auth failure pages).


> The 
> issue is conflated by the fact that sometimes (all the time?), after doing
> this, your old credentials are dropped and you have to log back in as
> yourself.

We're using HTTP Basic Auth. I see no reason (apart from some setting in your 
browser) why credentials would be dropped.


     Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/catalog-sig/attachments/20051104/a2f52fd8/attachment.pgp

From exarkun at divmod.com  Fri Nov  4 00:18:17 2005
From: exarkun at divmod.com (Jean-Paul Calderone)
Date: Thu, 3 Nov 2005 18:18:17 -0500
Subject: [Catalog-sig] [lfini@arcetri.astro.it: cannot submit a package]
In-Reply-To: <200511040919.55807.richardjones@optushome.com.au>
Message-ID: <20051103231817.10365.1602794716.divmod.quotient.3906@ohm>

On Fri, 4 Nov 2005 09:19:55 +1100, Richard Jones <richardjones at optushome.com.au> wrote:
>On Fri, 28 Oct 2005 08:30 am, Jean-Paul Calderone wrote:
>> I've had the described problem when trying to update a project and not
>> having sufficient permissions to do so.  The interface gives no indication
>> that this is the case, since it is just a standard HTTP auth dialog.
>
>There should be an explanation when the auth fails (unless you're using
>Safari, which doesn't display the content of auth failure pages).
>

I'm not and there isn't.

>
>> The
>> issue is conflated by the fact that sometimes (all the time?), after doing
>> this, your old credentials are dropped and you have to log back in as
>> yourself.
>
>We're using HTTP Basic Auth. I see no reason (apart from some setting in your
>browser) why credentials would be dropped.
>

I haven't modified any settings in Firefox that I am aware of that relate to this.

Jean-Paul

From sf at nuxeo.com  Tue Nov  8 12:41:09 2005
From: sf at nuxeo.com (Stefane Fermigier)
Date: Tue, 08 Nov 2005 12:41:09 +0100
Subject: [Catalog-sig] UTF8 bug on cheeseshop
Message-ID: <dkq2sl$hej$1@sea.gmane.org>

The cheeseshop main page claims to be UTF-8:

   <?xml version="1.0" encoding="utf-8"?>

But there are currently non-utf-8 encoded latin-1:

   <tr class="even">
     <td><a href="/pypi/pycompta/0.3.1">pycompta&nbsp;0.3.1</a></td>
     <td>comptabilit? d'entreprise</td>
   </tr>

This confuses strict XML parsers (like lxml).

   S.

-- 
St?fane Fermigier, Tel: +33 (0)6 63 04 12 77 (mobile).
Nuxeo Collaborative Portal Server: http://www.nuxeo.com/cps
Gestion de contenu web / portail collaboratif / groupware / open source!


From martin at v.loewis.de  Tue Nov  8 19:54:17 2005
From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=)
Date: Tue, 08 Nov 2005 19:54:17 +0100
Subject: [Catalog-sig] UTF8 bug on cheeseshop
In-Reply-To: <dkq2sl$hej$1@sea.gmane.org>
References: <dkq2sl$hej$1@sea.gmane.org>
Message-ID: <4370F459.4060503@v.loewis.de>

Stefane Fermigier wrote:
> The cheeseshop main page claims to be UTF-8:
> 
>    <?xml version="1.0" encoding="utf-8"?>
> 
> But there are currently non-utf-8 encoded latin-1:
> 
>    <tr class="even">
>      <td><a href="/pypi/pycompta/0.3.1">pycompta&nbsp;0.3.1</a></td>
>      <td>comptabilit? d'entreprise</td>
>    </tr>

What URL are you accessing? I cannot reproduce the problem;
it encodes the character just fine in UTF-8 for me.

Regards,
Martin

From grig at gheorghiu.net  Wed Nov  9 22:33:35 2005
From: grig at gheorghiu.net (Grig Gheorghiu)
Date: Wed, 9 Nov 2005 13:33:35 -0800 (PST)
Subject: [Catalog-sig] Standardized way of getting to a package download URL
	in Cheeseshop
Message-ID: <20051109213335.1797.qmail@web54506.mail.yahoo.com>

I'm working on a project I called "Cheesecake" which aims to quantify
the "goodness" of Python packages based on various indicators such as
presence of special files (README, LICENSE, etc.), special directories
(tests, doc, etc.), percentage of modules/classes/methods/functions
with docstrings, etc.

It would be nice if there was a standardized way to get to a download
URL for a given package listed at the Cheeseshop. Currently some
packages are hosted there, some are hosted elsewhere, but in any case
one would think that a pointer to the full URL for the package file
could be kept on the Cheeseshop page for that package and made
available via an API.

I'd volunteer to start this ball rolling if nobody else has been
working on it. What is the procedure for contributing to the PyPI
project?

Grig

From martin at v.loewis.de  Wed Nov  9 22:47:14 2005
From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=)
Date: Wed, 09 Nov 2005 22:47:14 +0100
Subject: [Catalog-sig] Standardized way of getting to a package download
 URL	in Cheeseshop
In-Reply-To: <20051109213335.1797.qmail@web54506.mail.yahoo.com>
References: <20051109213335.1797.qmail@web54506.mail.yahoo.com>
Message-ID: <43726E62.30605@v.loewis.de>

Grig Gheorghiu wrote:
> It would be nice if there was a standardized way to get to a download
> URL for a given package listed at the Cheeseshop. Currently some
> packages are hosted there, some are hosted elsewhere, but in any case
> one would think that a pointer to the full URL for the package file
> could be kept on the Cheeseshop page for that package and made
> available via an API.

The challenge here is that for packages with no downloadable files,
it is difficult to infer a URL from the metadata. There is a download
URL, but it is imprecise, as there is only a single one, not multiple
download URLs depending on type of package to download.

So different packages use different strategies, such as only
giving the base URL, and expecting the user to actually read
the page at the download URL to understand where the package
proper is available.

> I'd volunteer to start this ball rolling if nobody else has been
> working on it. What is the procedure for contributing to the PyPI
> project?

Depends on the nature of the change you propose: for a change
in the meta-data, you need to write a PEP, and provide patches to
distutils.

Regards,
Martin

From grig at gheorghiu.net  Wed Nov  9 23:02:55 2005
From: grig at gheorghiu.net (Grig Gheorghiu)
Date: Wed, 9 Nov 2005 14:02:55 -0800 (PST)
Subject: [Catalog-sig] Standardized way of getting to a package download
	URL in Cheeseshop
In-Reply-To: <43726E62.30605@v.loewis.de>
Message-ID: <20051109220256.84691.qmail@web54501.mail.yahoo.com>

--- "Martin v. L?wis" <martin at v.loewis.de> wrote:

> Grig Gheorghiu wrote:
> > It would be nice if there was a standardized way to get to a
> download
> > URL for a given package listed at the Cheeseshop. Currently some
> > packages are hosted there, some are hosted elsewhere, but in any
> case
> > one would think that a pointer to the full URL for the package file
> > could be kept on the Cheeseshop page for that package and made
> > available via an API.
> 
> The challenge here is that for packages with no downloadable files,
> it is difficult to infer a URL from the metadata. There is a download
> URL, but it is imprecise, as there is only a single one, not multiple
> download URLs depending on type of package to download.
> 
> So different packages use different strategies, such as only
> giving the base URL, and expecting the user to actually read
> the page at the download URL to understand where the package
> proper is available.
> 

You're right, I can see how it would be more difficult to keep track of
multiple download URLs per package, one for each type of package such
as .tgz, .zip etc. 

The situation is also made more difficult by the fact that some
packages are hosted at Source Forge, which means that their download
URL is picked up dynamically based on user preferences for the mirrors.

Unfortunately this means that automating the process of downloading a
package is hard or impossible, unless you do nasty tricks such as Web
page scraping. I was hoping that PyPI can emulate the CPAN
functionality. Obviously one brute force way of doing it would be to
force package authors to upload the latest version of their package to
PyPI and provide several download URLs, one per package type. 

> > I'd volunteer to start this ball rolling if nobody else has been
> > working on it. What is the procedure for contributing to the PyPI
> > project?
> 
> Depends on the nature of the change you propose: for a change
> in the meta-data, you need to write a PEP, and provide patches to
> distutils.

I'll have to give more thought to this, but I still think it would be a
worthy addition to the PyPI functionality.

Grig


From ianb at colorstudy.com  Wed Nov  9 23:05:29 2005
From: ianb at colorstudy.com (Ian Bicking)
Date: Wed, 09 Nov 2005 16:05:29 -0600
Subject: [Catalog-sig] Standardized way of getting to a package download
 URL	in Cheeseshop
In-Reply-To: <20051109213335.1797.qmail@web54506.mail.yahoo.com>
References: <20051109213335.1797.qmail@web54506.mail.yahoo.com>
Message-ID: <437272A9.70003@colorstudy.com>

Grig Gheorghiu wrote:
> It would be nice if there was a standardized way to get to a download
> URL for a given package listed at the Cheeseshop. Currently some
> packages are hosted there, some are hosted elsewhere, but in any case
> one would think that a pointer to the full URL for the package file
> could be kept on the Cheeseshop page for that package and made
> available via an API.

There's a not-exactly-standard way to download a package in setuptools, 
i.e., the algorithm easy_install uses to find packages.  You could grab 
the function out of there (I can't remember where it is, but it 
shouldn't be too hard to find).  You might want to copy it out and add 
extra information so you can score the download availability, since it 
finds some links that are deeper and further from the PyPI record than 
they should be (and they should lose points for that).

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

From pje at telecommunity.com  Wed Nov  9 23:09:05 2005
From: pje at telecommunity.com (Phillip J. Eby)
Date: Wed, 09 Nov 2005 17:09:05 -0500
Subject: [Catalog-sig] Standardized way of getting to a package download
 URL in Cheeseshop
In-Reply-To: <20051109213335.1797.qmail@web54506.mail.yahoo.com>
Message-ID: <5.1.1.6.0.20051109165738.01f6efe8@mail.telecommunity.com>

At 01:33 PM 11/9/2005 -0800, Grig Gheorghiu wrote:
>I'm working on a project I called "Cheesecake" which aims to quantify
>the "goodness" of Python packages based on various indicators such as
>presence of special files (README, LICENSE, etc.), special directories
>(tests, doc, etc.), percentage of modules/classes/methods/functions
>with docstrings, etc.
>
>It would be nice if there was a standardized way to get to a download
>URL for a given package listed at the Cheeseshop.

setuptools' "package_index" module has facilities to scan Cheeseshop pages 
and the pages they link to for URLs that are downloadable 
distributions.  Also, the "easy_install" command-line tool can be used to 
fetch and extract editable source (or check out from subversion) the source 
code of a project.  For example:

     $ easy_install -eb~/projects SQLObject
     Searching for SQLObject
     Reading http://www.python.org/pypi/SQLObject/
     Reading http://sqlobject.org
     Best match: SQLObject 0.7.0
     Downloading 
http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.0.tar.gz#md5=dccb921b5df6a15312b56630ac4ac205
     Processing SQLObject-0.7.0.tar.gz

     Extracted editable version of SQLObject to ~/projects/sqlobject

Notice that this works even with projects not hosted at the Cheeseshop, 
even if they are on Sourceforge mirrors:

     $ easy_install -eb~/projects ctypes
     Searching for ctypes
     Reading http://www.python.org/pypi/ctypes/
     Reading http://starship.python.net/crew/theller/ctypes/
     Reading http://sourceforge.net/project/showfiles.php?group_id=71702
     Best match: ctypes 0.9.6
     Downloading 
http://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.zip?download
     Requesting redirect to (randomly selected) 'surfnet' mirror
     Downloading 
http://surfnet.dl.sourceforge.net/sourceforge/ctypes/ctypes-0.9.6.zip
     Processing ctypes-0.9.6.zip

     Extracted editable version of ctypes to ~/projects/ctypes

As long as a download link is available from one of these three places, it 
can be found:

  1. The cheeseshop page for the package
  2. The page referenced by the cheeseshop "download url" link
  3. The page referenced by the cheeseshop "home page" link

I would say that any project whose download URL(s) can't be found by 
easy_install should get a bad score on your metrics, since it's going to be 
pretty tough for the *user* to find the package!

EasyInstall is not limited to source downloads, however.  It's just that 
the '-e' option tells it you want an "editable" distribution (e.g., a 
Subversion checkout preferably, with a source distribution being second 
best), and the '-b' option tells it the base directory under which the 
project directory should be created.  (Ordinarily, EasyInstall just 
attempts to get binaries or build and install them.)


From grig at gheorghiu.net  Wed Nov  9 23:16:00 2005
From: grig at gheorghiu.net (Grig Gheorghiu)
Date: Wed, 9 Nov 2005 14:16:00 -0800 (PST)
Subject: [Catalog-sig] Standardized way of getting to a package download
	URL in Cheeseshop
In-Reply-To: <5.1.1.6.0.20051109165738.01f6efe8@mail.telecommunity.com>
Message-ID: <20051109221600.99132.qmail@web54510.mail.yahoo.com>

--- "Phillip J. Eby" <pje at telecommunity.com> wrote:

> At 01:33 PM 11/9/2005 -0800, Grig Gheorghiu wrote:
> >I'm working on a project I called "Cheesecake" which aims to
> quantify
> >the "goodness" of Python packages based on various indicators such
> as
> >presence of special files (README, LICENSE, etc.), special
> directories
> >(tests, doc, etc.), percentage of modules/classes/methods/functions
> >with docstrings, etc.
> >
> >It would be nice if there was a standardized way to get to a
> download
> >URL for a given package listed at the Cheeseshop.
> 
> setuptools' "package_index" module has facilities to scan Cheeseshop
> pages 
> and the pages they link to for URLs that are downloadable 
> distributions.  Also, the "easy_install" command-line tool can be
> used to 
> fetch and extract editable source (or check out from subversion) the
> source 
> code of a project.  For example:
> 
>      $ easy_install -eb~/projects SQLObject
>      Searching for SQLObject
>      Reading http://www.python.org/pypi/SQLObject/
>      Reading http://sqlobject.org
>      Best match: SQLObject 0.7.0
>      Downloading 
>
http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.0.tar.gz#md5=dccb921b5df6a15312b56630ac4ac205
>      Processing SQLObject-0.7.0.tar.gz
> 
>      Extracted editable version of SQLObject to ~/projects/sqlobject
> 
> Notice that this works even with projects not hosted at the
> Cheeseshop, 
> even if they are on Sourceforge mirrors:
> 
>      $ easy_install -eb~/projects ctypes
>      Searching for ctypes
>      Reading http://www.python.org/pypi/ctypes/
>      Reading http://starship.python.net/crew/theller/ctypes/
>      Reading
> http://sourceforge.net/project/showfiles.php?group_id=71702
>      Best match: ctypes 0.9.6
>      Downloading 
> http://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.zip?download
>      Requesting redirect to (randomly selected) 'surfnet' mirror
>      Downloading 
> http://surfnet.dl.sourceforge.net/sourceforge/ctypes/ctypes-0.9.6.zip
>      Processing ctypes-0.9.6.zip
> 
>      Extracted editable version of ctypes to ~/projects/ctypes
> 
> As long as a download link is available from one of these three
> places, it 
> can be found:
> 
>   1. The cheeseshop page for the package
>   2. The page referenced by the cheeseshop "download url" link
>   3. The page referenced by the cheeseshop "home page" link
> 
> I would say that any project whose download URL(s) can't be found by 
> easy_install should get a bad score on your metrics, since it's going
> to be 
> pretty tough for the *user* to find the package!
> 
> EasyInstall is not limited to source downloads, however.  It's just
> that 
> the '-e' option tells it you want an "editable" distribution (e.g., a
> 
> Subversion checkout preferably, with a source distribution being
> second 
> best), and the '-b' option tells it the base directory under which
> the 
> project directory should be created.  (Ordinarily, EasyInstall just 
> attempts to get binaries or build and install them.)
> 
> 

Thanks a lot for the explanation, this is exactly what I was looking
for! Once again EasyInstall saves the day :-)

Grig

From grig at gheorghiu.net  Mon Nov 14 05:22:32 2005
From: grig at gheorghiu.net (Grig Gheorghiu)
Date: Sun, 13 Nov 2005 20:22:32 -0800 (PST)
Subject: [Catalog-sig] Standardized way of getting to a package download
	URL in Cheeseshop
In-Reply-To: <5.1.1.6.0.20051109165738.01f6efe8@mail.telecommunity.com>
Message-ID: <20051114042233.53253.qmail@web54502.mail.yahoo.com>

--- "Phillip J. Eby" <pje at telecommunity.com> wrote:

> At 01:33 PM 11/9/2005 -0800, Grig Gheorghiu wrote:
> >I'm working on a project I called "Cheesecake" which aims to
> quantify
> >the "goodness" of Python packages based on various indicators such
> as
> >presence of special files (README, LICENSE, etc.), special
> directories
> >(tests, doc, etc.), percentage of modules/classes/methods/functions
> >with docstrings, etc.
> >
> >It would be nice if there was a standardized way to get to a
> download
> >URL for a given package listed at the Cheeseshop.
> 
> setuptools' "package_index" module has facilities to scan Cheeseshop
> pages 
> and the pages they link to for URLs that are downloadable 
> distributions.  Also, the "easy_install" command-line tool can be
> used to 
> fetch and extract editable source (or check out from subversion) the
> source 
> code of a project.  For example:
> 
>      $ easy_install -eb~/projects SQLObject
>      Searching for SQLObject
>      Reading http://www.python.org/pypi/SQLObject/
>      Reading http://sqlobject.org
>      Best match: SQLObject 0.7.0
>      Downloading 
>
http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.0.tar.gz#md5=dccb921b5df6a15312b56630ac4ac205
>      Processing SQLObject-0.7.0.tar.gz
> 
>      Extracted editable version of SQLObject to ~/projects/sqlobject
> 
> Notice that this works even with projects not hosted at the
> Cheeseshop, 
> even if they are on Sourceforge mirrors:
> 
>      $ easy_install -eb~/projects ctypes
>      Searching for ctypes
>      Reading http://www.python.org/pypi/ctypes/
>      Reading http://starship.python.net/crew/theller/ctypes/
>      Reading
> http://sourceforge.net/project/showfiles.php?group_id=71702
>      Best match: ctypes 0.9.6
>      Downloading 
> http://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.zip?download
>      Requesting redirect to (randomly selected) 'surfnet' mirror
>      Downloading 
> http://surfnet.dl.sourceforge.net/sourceforge/ctypes/ctypes-0.9.6.zip
>      Processing ctypes-0.9.6.zip
> 
>      Extracted editable version of ctypes to ~/projects/ctypes
> 
> As long as a download link is available from one of these three
> places, it 
> can be found:
> 
>   1. The cheeseshop page for the package
>   2. The page referenced by the cheeseshop "download url" link
>   3. The page referenced by the cheeseshop "home page" link
> 
> I would say that any project whose download URL(s) can't be found by 
> easy_install should get a bad score on your metrics, since it's going
> to be 
> pretty tough for the *user* to find the package!
> 
> EasyInstall is not limited to source downloads, however.  It's just
> that 
> the '-e' option tells it you want an "editable" distribution (e.g., a
> 
> Subversion checkout preferably, with a source distribution being
> second 
> best), and the '-b' option tells it the base directory under which
> the 
> project directory should be created.  (Ordinarily, EasyInstall just 
> attempts to get binaries or build and install them.)
> 
> 

My immediate goal is to download a package in a "sandbox" directory,
unpack it and examine its files and directories.

I found a way to download a package using setuptools by looking it up
on PyPI by its "short" name (e.g. "funkload"). I do this in my code:

from setuptools.package_index import PackageIndex
pkgindex = PackageIndex()
output = pkgindex.download(name, sandbox)

This works just fine, but PackageIndex downloads the first package it
finds -- which in many cases is an egg file. The problem with egg
packages is that they don't contain the source distribution, so my
Cheesecake module doesn't find docs, tests, special files, etc. inside
an egg.

Is there a way I can tell setuptools what type of package I want it to
download (e.g. "tar.gz" or "zip")? I guess I could find the answer to
this question myself by poring some more over the setuptools source
code, but if you know the answer already, I'd appreciate it!

My intention is to try to always download the source distribution for a
package, and add extra points if I also find an egg for that package.

Thanks,

Grig



From pje at telecommunity.com  Mon Nov 14 05:53:11 2005
From: pje at telecommunity.com (Phillip J. Eby)
Date: Sun, 13 Nov 2005 23:53:11 -0500
Subject: [Catalog-sig] Standardized way of getting to a package download
 URL in Cheeseshop
In-Reply-To: <20051114042233.53253.qmail@web54502.mail.yahoo.com>
References: <5.1.1.6.0.20051109165738.01f6efe8@mail.telecommunity.com>
Message-ID: <5.1.1.6.0.20051113234752.01f51590@mail.telecommunity.com>

At 08:22 PM 11/13/2005 -0800, Grig Gheorghiu wrote:
>My immediate goal is to download a package in a "sandbox" directory,
>unpack it and examine its files and directories.
>
>I found a way to download a package using setuptools by looking it up
>on PyPI by its "short" name (e.g. "funkload"). I do this in my code:
>
>from setuptools.package_index import PackageIndex
>pkgindex = PackageIndex()
>output = pkgindex.download(name, sandbox)
>
>This works just fine, but PackageIndex downloads the first package it
>finds -- which in many cases is an egg file. The problem with egg
>packages is that they don't contain the source distribution, so my
>Cheesecake module doesn't find docs, tests, special files, etc. inside
>an egg.
>
>Is there a way I can tell setuptools what type of package I want it to
>download (e.g. "tar.gz" or "zip")? I guess I could find the answer to
>this question myself by poring some more over the setuptools source
>code, but if you know the answer already, I'd appreciate it!

Use the 'fetch()' method instead of 'download()'.  You will need a 
Requirement object, e.g.:

     from pkg_resources import Requirement
     output = pkgindex.fetch(Requirement.parse(name), sandbox, 
force_scan=True, source=True)

'force_scan' tells the index to check PyPI even if there's a 
locally-availablepackage of the given name.  'source' tells it to ignore 
binary packages such as .egg and .exe.


From grig at gheorghiu.net  Mon Nov 14 06:50:18 2005
From: grig at gheorghiu.net (Grig Gheorghiu)
Date: Sun, 13 Nov 2005 21:50:18 -0800 (PST)
Subject: [Catalog-sig] Standardized way of getting to a package download
	URL in Cheeseshop
In-Reply-To: <5.1.1.6.0.20051113234752.01f51590@mail.telecommunity.com>
Message-ID: <20051114055018.55020.qmail@web54508.mail.yahoo.com>

--- "Phillip J. Eby" <pje at telecommunity.com> wrote:

> At 08:22 PM 11/13/2005 -0800, Grig Gheorghiu wrote:
> >My immediate goal is to download a package in a "sandbox" directory,
> >unpack it and examine its files and directories.
> >
> >I found a way to download a package using setuptools by looking it
> up
> >on PyPI by its "short" name (e.g. "funkload"). I do this in my code:
> >
> >from setuptools.package_index import PackageIndex
> >pkgindex = PackageIndex()
> >output = pkgindex.download(name, sandbox)
> >
> >This works just fine, but PackageIndex downloads the first package
> it
> >finds -- which in many cases is an egg file. The problem with egg
> >packages is that they don't contain the source distribution, so my
> >Cheesecake module doesn't find docs, tests, special files, etc.
> inside
> >an egg.
> >
> >Is there a way I can tell setuptools what type of package I want it
> to
> >download (e.g. "tar.gz" or "zip")? I guess I could find the answer
> to
> >this question myself by poring some more over the setuptools source
> >code, but if you know the answer already, I'd appreciate it!
> 
> Use the 'fetch()' method instead of 'download()'.  You will need a 
> Requirement object, e.g.:
> 
>      from pkg_resources import Requirement
>      output = pkgindex.fetch(Requirement.parse(name), sandbox, 
> force_scan=True, source=True)
> 
> 'force_scan' tells the index to check PyPI even if there's a 
> locally-availablepackage of the given name.  'source' tells it to
> ignore 
> binary packages such as .egg and .exe.
> 

Thanks a lot for the prompt answer, your solution worked beautifully.

Grig

From tinuviel at sparcs.kaist.ac.kr  Thu Nov 10 10:36:02 2005
From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon)
Date: Thu, 10 Nov 2005 18:36:02 +0900
Subject: [Catalog-sig] Cheeseshop problems
Message-ID: <20051110093601.GA1361@sparcs.kaist.ac.kr>

I reported this problem more than a month before, but I got no answer,
so here it is again...

http://mail.python.org/pipermail/catalog-sig/2005-September/000725.html

Any idea? Compare:

http://www.python.org/pypi/BeautifulSoup/2.1.0
http://www.python.org/pypi/BeautifulSoup

Seo Sanghyeon

From richardjones at optushome.com.au  Tue Nov 15 22:15:53 2005
From: richardjones at optushome.com.au (Richard Jones)
Date: Wed, 16 Nov 2005 08:15:53 +1100
Subject: [Catalog-sig] Cheeseshop problems
In-Reply-To: <20051110093601.GA1361@sparcs.kaist.ac.kr>
References: <20051110093601.GA1361@sparcs.kaist.ac.kr>
Message-ID: <200511160815.53598.richardjones@optushome.com.au>

On Thu, 10 Nov 2005 08:36 pm, Seo Sanghyeon wrote:
> I reported this problem more than a month before, but I got no answer,
> so here it is again...
>
> http://mail.python.org/pipermail/catalog-sig/2005-September/000725.html

The gadfly and PyXML pages still don't work, but Numeric does now.

I have not had a chance to look into the problem. I've been flat-out - and 
will continue to be until mid-December - due to commitments organising the 
programme for the Open Source Developers Conference.


> http://www.python.org/pypi/BeautifulSoup/2.1.0
> http://www.python.org/pypi/BeautifulSoup

The both appear to work.


    Richard

From tinuviel at sparcs.kaist.ac.kr  Wed Nov 16 03:19:14 2005
From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon)
Date: Wed, 16 Nov 2005 11:19:14 +0900
Subject: [Catalog-sig] Cheeseshop problems
In-Reply-To: <200511160815.53598.richardjones@optushome.com.au>
References: <20051110093601.GA1361@sparcs.kaist.ac.kr>
	<200511160815.53598.richardjones@optushome.com.au>
Message-ID: <20051116021914.GA31558@sparcs.kaist.ac.kr>

On Wed, Nov 16, 2005 at 08:15:53AM +1100, Richard Jones wrote:
> 
> The gadfly and PyXML pages still don't work, but Numeric does now.

Note that Numeric had a new release since I sent the first mail, namely
24.2. Perhaps this can be a clue?

>> http://www.python.org/pypi/BeautifulSoup/2.1.0
>> http://www.python.org/pypi/BeautifulSoup
> 
> The both appear to work.

Yes. I included it as an example of working link. :-)

Seo Sanghyeon