Patches item #1054967, was opened at 2004-10-27 00:48 Message generated for change (Comment added) made by jafo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1054967&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Distutils and setup.py Group: Python 2.5 >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Geoffrey T. Dairiki (dairiki) Assigned to: Sean Reifschneider (jafo) Summary: bdist_deb - Debian packager Initial Comment: Here's a first crack at a bdist_deb. This patch implements two new distutils commands: bdist_deb: Build Debian packages debianize: Create and populate a top-level debian subdirectory. (Essentially dh_make for distutils packages.) There is a slightly detailed README.bdist_deb included in the patches. I'm open to suggestions for improvements and bug-fixes. ---------------------------------------------------------------------- >Comment By: Sean Reifschneider (jafo) Date: 2007-06-10 10:58 Message: Logged In: YES user_id=81797 Originator: NO This code has a number of outstanding issues including (primarily) whether a contributors agreement will be signed. It would be nice to have this code in Distutils, but I think this is a show-stopper to getting it in. If Geoffrey signs a contributor agreement, I'll open it back up and see if I can address the other outstanding issues. Sean ---------------------------------------------------------------------- Comment By: Andrew Straw (astraw) Date: 2007-04-03 03:17 Message: Logged In: YES user_id=210276 Originator: NO You may also be interested in stdeb, which produces Debian source packages from Python packages. See http://stdeb.python-hosting.com/ ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2005-03-28 15:06 Message: Logged In: YES user_id=21627 I agree with most of kbk's comments, except for 5: all of the *_util modules are in distutils, why not deb_util? It is not a command. Also, dairiki, are you willing to sign the contributor form? see http://www.python.org/psf/contrib.html ---------------------------------------------------------------------- Comment By: Kurt B. Kaiser (kbk) Date: 2005-03-19 23:18 Message: Logged In: YES user_id=149084 In response to jafo's request for comments on python-dev: 1. This facility should be documented in the Python Module docs. A section should be introduced in "Distributing Python Modules" after the 5.2 Creating RPM Packages. Also, the reference disutils.command.bdist_deb should be supplied. The fact that the rest of distutils is 'lightly' documented is no excuse :-) 2. The README.bdist_deb should be folded into the doc strings for the two modules (except the change info should be left behind in the patch). 3. The existing doc strings in the two modules are not always in standard form, and could be more extensive. 4. There are triple quoted block comments in the code. These should be # comment blocks, cf. PEP8 and PEP 257. You don't use doc strings to document variables. 5. deb_util.py probably belongs in distutils/command/ 6. I would like it better if the default was to build the source package, and that would be consistent with bdist_rpm's action. 7. I'm not entirely happy with the overall design: it seems there are two ways to go. First, run bdist_deb, which give you a package which isn't debian compliant; there's no debian/changelog. Second, you can run dh_make, which will 'debianize' the Python source. This can only be done once, and then the recommendation is to use the standard Debian tools to create the packages. In this second case, apparently you can't use bdist_deb, nor do you have a convenient way of updating when the Python code changes, if I understand the README.bdist_deb correctly. If these impressions are correct, it's a lot of code for relatively little effect, at least at its current level of development. 8. What about alberanid's last comment? 8. Do we have a commitment from Dairiki to maintain this code for at least a couple of years? ---------------------------------------------------------------------- Comment By: Davide Alberani (alberanid) Date: 2005-02-23 11:10 Message: Logged In: YES user_id=170840 Sometimes you need to install the same package for many different releases of Python; unfortunately this will fail, because dpkg refuses to override the dummy man page, present in both packages. Would it be a good idea to modify line 453 of dh_make to include pyver in the name of the manpage file? ---------------------------------------------------------------------- Comment By: Marek Kubica (leonidasxiv) Date: 2005-01-11 16:53 Message: Logged In: YES user_id=872713 I was looking a long time for something like this. I really hope seeing this in Python 2.5, although I'm not familiar with Python's development process. ---------------------------------------------------------------------- Comment By: Geoffrey T. Dairiki (dairiki) Date: 2004-11-11 16:18 Message: Logged In: YES user_id=45814 Another updated patch set. The only change is a bug fix: when using a hand-build set of debian/* files, dh_make will now deduce the correct Debian revision and build architecture. (Bug reported by Bastian Kleineidam.) Patches, as always are on today's CVS version of distutils. ---------------------------------------------------------------------- Comment By: Davide Alberani (alberanid) Date: 2004-11-09 15:39 Message: Logged In: YES user_id=170840 I've created a patch to make your bdist_deb/dh_make commands compatible with Python 1.5.2; it can be found here: http://erlug.linux.it/~da/tmp/distutils-cvs_debpy152-20041109.patch Beware that I've tested it for a very short time, so double check everything (especially the permissions on file/umasks). Moreover, the patch changes also some other files like build_py.py, install_lib.py, bdist_rpm.py, that were not 1.5.2 compatible - these changes are part of another patch I've posted today. HTH. ---------------------------------------------------------------------- Comment By: Geoffrey T. Dairiki (dairiki) Date: 2004-11-08 21:38 Message: Logged In: YES user_id=45814 Another updated patch set: As suggested by Bastian Kleineidam, when the source distribution includes it's own debian subdirectory, bdist_deb (rather than just crapping out) will now skip the dh_make stage, and just run debuild. As always, patches on the current CVS version of distutils are attached below. ---------------------------------------------------------------------- Comment By: Geoffrey T. Dairiki (dairiki) Date: 2004-11-02 22:20 Message: Logged In: YES user_id=45814 Here's try number three! Changes are mostly fixes for woody. The README.bdist_deb (included in the patch set) enumerates the changes in more detail. (I've bitten the bullet and installed woody on one of my machines, so I'm fairly confident it should work now.) The patches, on todays CVS are, as always, attached below. ==== Note to Davide, Thank you, again, very much for all the testing. A couple of the lintian warnings ('prerm-does-not-remove-usr-doc-link' and 'postinst-does-not-set-usr-doc-link') that are listed in your test suite output are due, I think, to your mixed system. Specifically, I suspect you've got the woody version of lintian (which wants to see symlinks from /usr/doc/<package> to /usr/share/doc/<package>), but a later version of debhelper. (Woody's dh_installdocs (in the debhelper package) automatically generates those links, later versions don't; /usr/doc has been phased out.) Anyhow, I'm not going to fix those warnings (unless it turns out that you're seeing them on your pure woody system.) On package with python scripts (in /usr/bin) Woody's lintian generates an 'unusual-interpreter' warning which I think is spurious (i.e. it is not a valid warning.) (Lintian 1.20.17 doesn't recognize things like /usr/bin/python2.1 as a valid interpreter --- it seems valid enough to me.) Best Regards, Jeff ---------------------------------------------------------------------- Comment By: Davide Alberani (alberanid) Date: 2004-10-30 08:57 Message: Logged In: YES user_id=170840 I've tried the 29/10 patch with my home system (dpkg-dev 1.10, debhelper 4.1.90 and dh-make 0.30) and another "pure woody" system (dpkg-dev 1.9.21, debhelper 4.0.2 and dh-make 0.30). I've used your test suite and some of my personal projects (using both bdist_deb and dh_make); as far as I can tell, it works very well. :-) bdist_deb always worked as expected, producing good debian packages. I've used dh_make and then I've run "dpkg-buildpackage -rfakeroot" and I got some errors (but I'm not sure they depends on your code). Also your test suite produced some failures. Here you can find the output of "dpkg-buildpackage -rfakeroot" and of your tests suite (both were running on my home system): http://erlug.linux.it/~da/tmp/dpkg-buildpackage http://erlug.linux.it/~da/tmp/testsuite Thank you for your great effort! ---------------------------------------------------------------------- Comment By: Geoffrey T. Dairiki (dairiki) Date: 2004-10-29 19:38 Message: Logged In: YES user_id=45814 Thanks for the comments. Here's a second attempt. Changes include: It might work with woody. (I'd appreciate it if you could try again, Davide) 'debianize' command renamed to 'dh_make'. Use debchange to create debian/changelog. This eliminates the need to duplicate debchange's logic to deduce the packagers name and e-mail. A more complete test script. Patches are on today's CVS. ---------------------------------------------------------------------- Comment By: Davide Alberani (alberanid) Date: 2004-10-27 14:47 Message: Logged In: YES user_id=170840 I've a woody with some packages backported from sarge (debhelper 4.1.90 and dpkg-dev 1.10). Running python2.3 ./setup.py bdist_deb with some of my projects, I got the error: dpkg-buildpackage: unknown option or argument --check-dirname-level=1 Debian dpkg-buildpackage . Commenting out the "check-dirname-level" and "check-dirname-regex" options in the bdist_deb.py file the script can go on, but it exits with the error: debian/rules:11: *** first argument to `word' function must be greater than 0. Stop. Hope this helps. ---------------------------------------------------------------------- Comment By: Sean Reifschneider (jafo) Date: 2004-10-27 03:44 Message: Logged In: YES user_id=81797 I'm just doing a review of this code. A couple of things: There's been some concern expressed about get_default_maintainer. Namely, that if debchange changes it's algorithm, it won't be reflected in this code. It seems like one possible way around that would be to build a directory with a "debian" directory under it, a fake "changelog", and then call debchange to write the data out, and parse it. Too bad there's not a direct hook into debchange to get that information. Can _formatdate, if email doesn't exist, use rfc822.formatdate()? Ditto for _parseaddr? It looks pretty good. However, when trying to build a .deb of my jotweb2 package, it's failing with: [...] dh_testdir dh_testroot dh_installchangelogs- dh_installdocs cp: cannot stat `doc': No such file or directory dh_installdocs: command returned error code 256 [...] I'm not sure exactly why. I do have a "doc" directory in my main package directory, but I don't reference to it in my setup.py or MANIFEST. Adding it to the MANIFEST doesn't seem to help this. Sean ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1054967&group_id=5470 _______________________________________________ Patches mailing list [email protected] http://mail.python.org/mailman/listinfo/patches
