Powerfull python script to generate packages/templates/targets

Peter Soetens peter.soetens@mech.kuleuven.ac.be
Wed Sep 24 01:07:00 GMT 2003


Hi,

I have written a program to generate ecos .epk packages. This is the synopsis:

./ecospkggen.py --help
usage:
    ecospkggen.py [options] -V VERSION PACKAGES
 Will result in PACKAGES being built separately, all having version VERSION.

    ecospkggen.py [options] -t TARGET -V VERSION PACKAGES
 Will result in a single package containing TARGET and all PACKAGES.

    ecospkggen.py [options] -t TARGET -T TEMPLATE -V VERSION PACKAGES
 Will result in a single package containing TARGET, TEMPLATE and all PACKAGES.

 All PACKAGES listed on the command line will be taken from 'current' and 
override versions given in TARGET or TEMPLATE.
 All packages listed in the TARGET and the TEMPLATE file will be included in 
the archive.


options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -RPATH, --repository=PATH
                        The path to the eCos repository
  -VVERSION, --version_number=VERSION
                        The version number of the generated packages
  -q, --quiet           don't print any messages to stdout
  -v, --verbose         make lots of noise
  -r, --recursive       Process packages recursively [default]
  -S, --single          Do not process packages recursively
  -LLICENCE_FILE, --licence=LICENCE_FILE
                        Specify the licence to add to the package.
  -tTARGET_NAME, --target=TARGET_NAME
                        Specify a target. This will result in a single package
                        which contains the target, its dependencies and all
                        specified packages.
  -TTEMPLATE_NAME, --template=TEMPLATE_NAME
                      Specify a template. This will result in a single package
                        which contains the template, its dependencies and all
                        specified packages.

It requires Python 2.3 for the argument parsing. I'd appreciate any test 
results from other people so I can improve its robustness. For example, only 
the first alias is used from the package description (which is fine for 99% 
of the packages).

If all goes well, you are able to specify the alias or the CYGPKG_... name on 
the commandline for PACKAGES

TODO : 
* replace the occurence of 'current' in the template .ect file with the actual 
version number.

Peter

PS: you can also have it from  
http://people.mech.kuleuven.ac.be/~psoetens/ecos/ecospkggen.py
-- 
------------------------------------------------------------------------
Peter Soetens                                      http://www.orocos.org
Katholieke Universiteit Leuven
Division Production Engineering,                      tel. +32 16 322773
Machine Design and Automation                         fax. +32 16 322987
Celestijnenlaan 300B                   peter.soetens@mech.kuleuven.ac.be
B-3001 Leuven Belgium                 http://www.mech.kuleuven.ac.be/pma
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecospkggen.py
Type: text/x-python
Size: 13962 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20030924/82441962/attachment.py>


More information about the Ecos-patches mailing list