By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,727 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,727 IT Pros & Developers. It's quick & easy.

New Python website

P: n/a
lpe
http://www.pycode.com

I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
It is brand new and might still be buggy, but hopefully it will be
usefull to some people. Feel free to join and upload any of your code.
thanks

Jul 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On 28 Apr 2005 17:45:02 -0700, lpe <lp*@pycode.com> wrote:
http://www.pycode.com

I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
It is brand new and might still be buggy, but hopefully it will be
usefull to some people. Feel free to join and upload any of your code.
thanks


Something wrong with PyPi?

Mike

--
Michael P. Soulier <ms******@gmail.com>
http://www.digitaltorque.ca
http://opag.ca python -c 'import this'
Jul 19 '05 #2

P: n/a
lpe wrote:
http://www.pycode.com

I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
It is brand new and might still be buggy, but hopefully it will be
usefull to some people. Feel free to join and upload any of your code.
thanks


Hi,

Just yesterday, I was frustrated waiting for replies from Catelog-SIG
about the possibilities of a package management system that works like
Fink (fink.sf.net). Basically, the problems I see is that C extension
modules aren't portable across major Python revisions and there is no
easy way to maintain the installed packages in site-packages directory.
My scenario is that a system admin has to maintain 50 different
libraries and their dependencies...

So I've decided to write something myself... and call it 'centipyde'.

Modelled against Fink and Darwinports (darwinports.opendarwin.org)
(obviously I'm a Mac user), information (in text file) are in a folder
(centipyde/pkginfo/) as .info files. Each package will have a .info file
which tells the system (centipyde) where to download the source tar (or
zip) and how to install the package, as well as the dependecies,
maintaining the installed packages etc etc. No difference from other
package managers (a goal)...

It is still very rough at this moment, so please bear with me.
Basically, the user will have to cvs checkout the system and just run it.

I've checked it into Sourceforge, under IB-DWB project (which is
abandoned) as 'centipyde'. But for some reason, I still can't view it in
ViewCVS yet. Anyway, the directory layout is

.../centipyde
.../centipyde/centipyde.py
.../centipyde/pgkinfo
.../centipyde/pgkinfo/ply15.info
ply15.info contains the following text (pretty much modelled against Fink):

package=ply15
maintainer=.
dependencies=.
downloadurl=http://systems.cs.uchicago.edu/ply/ply-1.5.tar.gz
prebuildscript=tar zxvf ply-1.5.tar.gz
sourcedir=ply-1.5
buildscript=python setup.py build
installscript=sudo python setup.py install
centipyde.py is the following:
================================================== ===

"""
Author: Maurice H.T. Ling <ma*********@acm.org>
Copyright (c) 2005 Maurice H.T. Ling
Date created : 28th April 2005
"""

PKGINFOPATH = 'pkginfo'
INSTALL_LOG = 'install.log'

import os
import string
import sys

def install_package(package_name):
f = open(os.getcwd() + os.sep + PKGINFOPATH + os.sep + package_name
+ '.info', 'r')
install_info = {}
for line in f.readlines():
line = string.split(line, '=')
if line[1][-1] == os.linesep:
install_info[line[0]] = string.strip(line[1][:-1])
else: install_info[line[0]] = string.strip(line[1])
f.close()
print "Package Installation Information: " + str(install_info)

os.system('curl -O ' + str(install_info['downloadurl']))

preinstall = []
preinstall = string.split(install_info['prebuildscript'], ';')
for cmd in preinstall: os.system(cmd)

cwd = os.getcwd()
print cwd
os.chdir(os.path.join(os.getcwd(), install_info['sourcedir']))
print os.getcwd()

buildscript = []
buildscript = string.split(install_info['buildscript'], ';')
for cmd in buildscript: os.system(cmd)

installscript = []
installscript = string.split(install_info['installscript'], ';')
for cmd in installscript: os.system(cmd)
if sys.argv[1] == 'install':
install_package(sys.argv[2])

================================================== ===

When I run "python centipyde.py install ply15", PLY1.5 gets downloaded
from David Beazley's website, uncompressed and installed into the
site-package as shown here:
znichols-maurice:~/MyProjects/ib-dwb/centipyde mauriceling$ ls -alltotal 8
drwxr-xr-x 5 mauricel mauricel 170 28 Apr 17:37 .
drwxr-xr-x 10 mauricel mauricel 340 28 Apr 16:21 ..
drwxr-xr-x 5 mauricel mauricel 170 28 Apr 17:33 CVS
-rw-r--r-- 1 mauricel mauricel 1385 28 Apr 23:47 centipyde.py
drwxr-xr-x 4 mauricel mauricel 136 28 Apr 17:36 pkginfo
znichols-maurice:~/MyProjects/ib-dwb/centipyde mauriceling$ sudo python
centipyde.py install ply15
Package Installation Information: {'maintainer': '.', 'sourcedir':
'ply-1.5', 'package': 'ply15', 'downloadurl':
'http://systems.cs.uchicago.edu/ply/ply-1.5.tar.gz', 'installscript':
'sudo python setup.py install', 'dependencies': '.', 'buildscript':
'python setup.py build', 'prebuildscript': 'tar zxvf ply-1.5.tar.gz'}
% Total % Received % Xferd Average Speed Time
Curr.
Dload Upload Total Current Left
Speed
100 69278 100 69278 0 0 7746 0 0:00:08 0:00:08 0:00:00
31811
ply-1.5/
ply-1.5/doc/
ply-1.5/doc/ply.html
ply-1.5/CHANGES
ply-1.5/COPYING

...... [snipped] .....

ply-1.5/test/yacc_uprec.exp
ply-1.5/test/yacc_uprec.py
/sw/lib/python2.3/distutils/dist.py:213: UserWarning: 'licence'
distribution option is deprecated; use 'license'
warnings.warn(msg)
running build
running build_py
creating build
creating build/lib
copying lex.py -> build/lib
copying yacc.py -> build/lib
/sw/lib/python2.3/distutils/dist.py:213: UserWarning: 'licence'
distribution option is deprecated; use 'license'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
znichols-maurice:~/MyProjects/ib-dwb/centipyde mauriceling$
================================

I think there are some obvious ways that we might work together...

Cheers
Maurice
Jul 19 '05 #3

P: n/a
Michael Soulier wrote:
On 28 Apr 2005 17:45:02 -0700, lpe <lp*@pycode.com> wrote:
http://www.pycode.com

I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
It is brand new and might still be buggy, but hopefully it will be
usefull to some people. Feel free to join and upload any of your code.
thanks

Something wrong with PyPi?

Mike


I think it is quite clear when he says "I could not find any good sites
with 3rd party modules (other than the Vaults of Parnassus, where you
must host files elsewhere)", suggesting that he is looking for a site
whereby 3rd party modules can be hosted, rather than a site telling you
where 3rd party modules are hosted.

maurice
Jul 19 '05 #4

P: n/a
lpe
Hi maurice
thanks for your interest, that surely looks interesting (and promising)
I had no experience with any of the packages you mentioned, but it may
well be usefull.
Please email me with more details of what you had in mind.

Jul 19 '05 #5

P: n/a
lpe wrote:
Hi maurice
thanks for your interest, that surely looks interesting (and promising)
I had no experience with any of the packages you mentioned, but it may
well be usefull.
Please email me with more details of what you had in mind.


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 <js****@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
Jul 19 '05 #6

P: n/a
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 <js****@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

Jul 19 '05 #7

P: n/a

lpe wrote:
http://www.pycode.com

I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host files elsewhere), so I decided to write one myself :)
Maybe You shot a bit fast? PiPy is good and the Vaults are good. Link
them makes them better, though not very innovative. Someone told me
that I'm on the Web here, am I?
It is brand new and might still be buggy, but hopefully it will be
usefull to some people. Feel free to join and upload any of your code. thanks


When I was younger I found anarchy cool. Now I find it grey.

Ciao,
Kay

Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.