"implementation" of PEP 262 as an academic project

Maurice LING mauriceling at acm.org
Sat Apr 30 00:56:56 EDT 2005


Hi all,

I reckoned that if I'm on this work, I might as well make it into an 
academic engineering-type project for my pass degree. Hence, I am 
sending this posting out to everyone to inform of my intentions. Despite 
the possible interests in this work, academic requires a 'personal' 
project with defined work.

Of course, I do hope that comments and suggestions continue to flow like 
milk and honey. If in event I do decide against making it into an 
academic project or when it had cease to be academically-focused (i.e. 
submitted and passed my thesis), I will have the onus to inform everyone 
again through comp.lang.python (python-list) and catalog-sig mailing list.

Thank you everyone for your kind understanding.

Cheers
Maurice


> Hi,
> 
> I've just read PEP 262 last night and finds that it does more or less 
> describes what I have in mind. However, I am not sure if there is every 
> need for such a descriptive database file or something slimmer, like 
> Fink's .info files will suffice.
> 
> An example of Fink's .info file is:
> ====================================================
> Package: g77
> Version: 3.4.1
> Revision: 1
> BuildDependsOnly: true
> Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.bz2
> Source-MD5: 31b459062499f9f68d451db9cbf3205c
> NoSourceDirectory: True
> ConfigureParams: --enable-languages=f77 --infodir='${prefix}/share/info' 
> --libexecdir='${prefix}/lib' --disable-shared
> #BuildDepends: dejagnu
> PatchScript: <<
>  #!/bin/sh
>  cd gcc-%v/gcc
>  mv Makefile.in Makefile.in.orig
>  sed 's|$(ALL_CPPFLAGS) $(INCLUDES)|$(INCLUDES) $(ALL_CPPFLAGS)|g' < 
> Makefile.in.orig > Makefile.in
> <<
> CompileScript: <<
>  #!/bin/sh
>  mkdir darwin
>  cd darwin
>  ../gcc-%v/configure %c
>  make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 
> -fno-implicit-templates' profiledbootstrap
> #cd gcc; make check-g77
> <<
> InstallScript: <<
>  #!/bin/sh
>  cd darwin
>  make install prefix=%i
>  cd %i/bin
>  /bin/rm -f gcc gccbug cpp gcov powerpc-apple*
>  ln -s %p/bin/g77 f77
>  darwinvers=`/usr/bin/uname -v | cut -f1 -d":" | awk '{print $4}'`
>  gccvers=`%i/bin/g77 -dumpversion | head -1 | cut -f4 -d" "`
>  ln -s 
> %p/lib/gcc/powerpc-apple-darwin${darwinvers}/${gccvers}/include/g2c.h 
> %i/include/g2c.h
>  /bin/rm -rf %i/share/locale %i/man
>  /bin/rm -f %i/lib/charset.alias
>  /bin/rm -f %i/share/info/gcc* %i/share/info/cpp*
>  /bin/mv -f %i/lib/libiberty.a %i/lib/libiberty-g77.a
> <<
> License: GPL
> DocFiles: gcc-%v/gcc/f/ChangeLog gcc-%v/COPYING gcc-%v/COPYING.LIB
> Description: GNU Fortran compiler
> DescDetail: <<
>  g77 consists of several components:
> 
>  1) The g77 command itself.
>  2) The libg2c run-time library.  This library contains the
>     machine code needed to support capabilities of the Fortran
>     language that are not directly provided by the machine code
>     generated by the g77 compilation phase.
>  3) The compiler itself, internally named f771.
>     f771 does not generate machine code directly --
>     it generates assembly code, leaving the conversion to
>     actual machine code to an assembler, usually named as.
> 
>  g77 supports some fortran90 features, like automatic arrays,
>  free source form, and DO WHILE.
> <<
> DescPort: <<
>  Installs g77 from the FSF gcc distribution.
> 
>  This version does not install in /usr. It contains it's own cc1 and
>  libgcc.a installed in %p.
> 
>  libiberty.a moved to libiberty-g77.a to avoid conflict with ddd.
> <<
> DescUsage: <<
>  If you get unresolved symbol '_saveFP', add -lcc_dynamic when linking.
> 
>  Does not support -framework argument, to link frameworks use -Wl flag
>  (for example, to link vecLib use "-Wl,-framework -Wl,vecLib").
> 
>  No man page, use "info g77".
> <<
> Homepage: http://gcc.gnu.org/onlinedocs/g77/
> Maintainer: Jeffrey Whitaker <jswhit at fastmail.fm>
> ================================================================================ 
> 
> 
> Implementing the API specified in PEP 262 is desirable.
> 
> What I am thinking is this,
> 
> 1. when user specify a package to install, the package's .info file will 
> be looked up in 'pkginfo' directory (in PEP 262, it is the INSTALLDB 
> directory that holds all these .info files).
> 
> 2. to the system, only 3 things are crucial: where to get the package? 
> what packages the package needs? how to install? These 3 things are the 
> real critical parts of .info file, the rest are information and metadata.
> 
> 3. from the dependencies, the system now creates a tree of dependencies. 
> Can all dependencies be satisfied, i.e. are there any required packages 
> that are not in standard library and there is no .info file for?
> 
> 4. dependencies are satisfied (install the packages) from terminal leaf 
> nodes on the dependency tree to the root node (which is the one the user 
> wants to install)
> 
> 5. appropriate entries are made in appropriate files (i.e. 
> pkg-install.log) to signify which packages are installed.
> 
> 6. satisfy the files needed for API requirements of PEP 262.
> 
> Please tell me what you think...
> 
> 
> Cheers
> Maurice



More information about the Python-list mailing list