[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-distutils-sig
Subject:    [Distutils] Metadata.
From:       pje () telecommunity ! com (Phillip J !  Eby)
Date:       2005-08-14 21:13:47
Message-ID: 5.1.1.6.0.20050814170137.02809c68 () mail ! telecommunity ! com
[Download RAW message or body]

At 10:58 PM 8/14/2005 +0200, Vincenzo Di Massa wrote:
>     def download_source(self):
>         self.index.find_packages(self.requirement)

The above line is redundant; obtain() will call find_packages() 
automatically.  Also, you may not want to use obtain anyway.  For what you 
are trying to do, I would suggest running "easy_install --editable 
--build_dir=somewhere requirement", because then it will handle all the 
details of finding and unpacking the source.  The source tree will then be 
"somewhere/projectname" (the project name will be all-lowercase).  You 
could use a temporary directory for "somewhere", if you like.  In any case 
this will take care of most of the things you're doing in this code outside 
of the deb_src() method.


>I need to retrieve other metadata like description, author and license.
>I nned it to put it into lines like SED LINE.

Well, you can always run the package's setup script, and in fact you will 
need to do so if you're working with an unbuilt source distribution.  Most 
of the PKG-INFO metadata items can be displayed using options to setup.py, 
however.  For example, running this in the setuptools directory:

    python setup.py --name --version --author --license --url

produces this output:

    setuptools
    0.6a0
    Phillip J. Eby
    PSF or ZPL
    http://peak.telecommunity.com/DevCenter/setuptools

Use setup.py --help to get a list of the available options.

Note that you may want to pass the name and version results through 
pkg_resources' safe_name() and safe_version() functions.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic