[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to make a new Python package - help wanted please



I would like to package the Python interface to PostgreSQL (since it is
included in the PostgreSQL source and there is at least one person who
wants it).

Can anyone point me to a package which would be a good model to use?
(I have read /usr/doc/python/README.Debian, but I could do with a bit
more help.  The Makefile.pre.in on my system does not contain the
boot-deb target mentioned in README.Debian.)

I attach the building and installation instructions from the upstream
source.  These seem to expect the installer to copy files into his
Python tree.  This doesn't seem to be a good idea in a source package;
can I/do I have to copy the Python files into my local build directory?

It looks as if I have to modify the Python Setup file, which is presumably
a conf file belonging to python-dev.  Is there some mechanism for doing
this in a way that conforms to policy?

Installation instructions for PyGreSQL
 : 1.3. Installation
 : -----------------
 : 
 : * You first have to get and build Python and PostgreSQL.
 : 
 : * PyGreSQL is implemented as two parts, a C module labeled _pg and a
 :   Python wrapper called pg.py.  This changed between 2.1 and 2.2.  This
 :   should not affect any existing programs but the installation is slightly
 :   different.
 : 
 : * Find the directory where your 'Setup' file lives (usually ??/Modules) and
This is /usr/include/python1.5/config     
 :   copy the 'pgmodule.c' file there.
 : 
 : * Add the following line to your Setup file
 :     _pg  pgmodule.c -I[pgInc] -L[pgLib] -lpq # -lcrypt # needed on some 
systems
 :   where:
 :     [pgInc] = path of the PostgreSQL include
 :     [pgLib] = path of the PostgreSQL libraries
 :   Some options may be added to this line:
 :     -DNO_DEF_VAR - no default variables support
 :     -DNO_DIRECT  - no direct access methods
 :     -DNO_LARGE   - no large object support
 :   These options will be described in the next sections.
 : 
 : * If you want a shared module, make sure that the "*shared*" keyword is
 :   uncommented and add the above line below it.  You then need to install
 :   your shared modules with "make sharedinstall."
 : 
 : * Copy pg.py to the lib directory where the rest of your modules are.  For
 :   example, that's /usr/local/lib/Python on my system.
 : 
 : * Do 'make -f Makefile.pre.in boot' and do 'make && make install'
 : 
 : * For more details read the documentation at the top of Makefile.pre.in


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "For the LORD is good; his mercy is everlasting; and 
      his truth endureth to all generations."         
                                     Psalms 100:5 



Reply to: