On Mon, Mar 27, 2006 at 10:24:39PM +0200, Raphael Hertzog wrote:
> On Mon, 27 Mar 2006, Brian Sutherland wrote:
> [...]
> > For what it's worth, I will be converting most of my packages that build
> > with setuptools to use option 3.
> >
> > That is, of course, until there is some kind of consenus/decision.
>
> If you have done that, can you post your patch to the list ? I have never
> packaged Python related stuff yet, but I recently made a patch to update
> the kid package (#359012) and tried to look quickly what would be needed
> to achieve that but each time I ended with a .egg in the .deb ...
>
> So it would be great to have a example of how this ought to be done.
I really have no idea how this ought to be done, but here's my way of
doing it;) If it fries your hard disk, don't blame me. Also if anyone
has any additions/corrections, let me know.
For example upstream converted python-pullparser package to setuptools
between 0.0.6 and 0.0.7. At the time we only had setuptools version
0.6a8-0.1, so I had to patch the setup.py to remove setuptools (which
is similar to your kid patch):
--- orig/setup.py
+++ mod/setup.py
@@ -73,10 +73,10 @@
#---
# the rest is constant for most of my released packages:
+#import ez_setup
+#ez_setup.use_setuptools()
-import ez_setup
-ez_setup.use_setuptools()
+from distutils.core import setup
-import setuptools
if PACKAGE:
packages, py_modules = [NAME], None
@@ -85,7 +85,7 @@
doclines = __doc__.split("\n")
+setup(
-setuptools.setup(
name = NAME,
version = VERSION,
license = LICENSE,
Now that setuptools 0.6a9-1 I can remove that patch, and patch my rules
and control as follows:
% baz diff
* looking for [EMAIL PROTECTED]/debian-python--python-pullparser--1.0--patch-6
to compare with
* comparing to [EMAIL
PROTECTED]/debian-python--python-pullparser--1.0--patch-6: .. done.
* modified files
--- orig/control
+++ mod/control
@@ -2,7 +2,7 @@
Section: python
Priority: extra
Maintainer: Brian Sutherland <[EMAIL PROTECTED]>
-Build-Depends-Indep: debhelper (>= 4.0.0), python-dev, python2.3-dev,
python2.4-dev
+Build-Depends-Indep: debhelper (>= 4.0.0), python-dev, python2.3-dev,
python2.4-dev, python2.3-setuptools (>= 0.6a9-1), python2.4-setuptools (>=
0.6a9-1)
Standards-Version: 3.6.2.1
Package: python-pullparser
--- orig/rules
+++ mod/rules
@@ -35,7 +35,7 @@
install -D --mode 644 ChangeLog
python-$(PACKAGE)/usr/share/doc/python-$(PACKAGE)/changelog
set -e;\
for ver in $(PYVERSIONS); do\
- $(PYTHON)$$ver setup.py install --no-compile
--prefix=debian/python$$ver-$(PACKAGE)/usr;\
+ $(PYTHON)$$ver setup.py install --no-compile
--single-version-externally-managed --root=debian/python$$ver-$(PACKAGE);\
done
.PHONY: binary-common
The contents of the deb come out like this then:
% dpkg-deb -c ../../python2.3-pullparser_0.0.7-1_all.deb
drwxr-xr-x root/root 0 2006-03-28 12:38:15 ./
drwxr-xr-x root/root 0 2006-03-28 12:38:12 ./usr/
drwxr-xr-x root/root 0 2006-03-28 12:38:09 ./usr/lib/
drwxr-xr-x root/root 0 2006-03-28 12:38:09 ./usr/lib/python2.3/
drwxr-xr-x root/root 0 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/
drwxr-xr-x root/root 0 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/pullparser-0.0.7-py2.3.egg-info/
-rw-r--r-- root/root 1537 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/pullparser-0.0.7-py2.3.egg-info/PKG-INFO
-rw-r--r-- root/root 0 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/pullparser-0.0.7-py2.3.egg-info/zip-safe
-rw-r--r-- root/root 231 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/pullparser-0.0.7-py2.3.egg-info/SOURCES.txt
-rw-r--r-- root/root11 2006-03-28 12:38:10
./usr/lib/python2.3/site-packages/pullparser-0.0.7-py2.3.egg-info/top_level.txt
-rw-r--r-- root/root 12610 2006-01-01 22:44:41
./usr/lib/python2.3/site-packages/pullparser.py
drwxr-xr-x root/root 0 2006-03-28 12:38:12 ./usr/share/
drwxr-xr-x root/root 0 2006-03-28 12:38:12 ./usr/share/doc/
drwxr-xr-x root/root 0 2006-03-28 12:38:14
./usr/share/doc/python2.3-pullparser/
-rw-r--r-- root/root 446 2005-11-09 17:38:47
./usr/share/doc/python2.3-pullparser/copyright
-rw-r--r-- root/root 410 2006-01-01 22:47:42
./usr/share/doc/python2.3-pullparser/changelog.Debian.gz
Have Fun.
--
Brian Sutherland
Metropolis - "it's the first movie with a robot. And she's a woman.
And she's EVIL!!"
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]