Latest patch attached. As far as I can tell, I now have working packages. Some generally observations.
* python2: binaries under library path have '#!/usr/bin/env python'. * python3: binaries under library path have '#!/usr/bin/env python'. * binaries installed under /usr/bin/ have correct hash bang (yes, this is with the attached patch). * python3 package doesn't include the following files, so no conflicts. * /etc/bash_completion.d/django_bash_completion (installed via dh_install ) * /usr/bin/django-admin (installed via setup.py and renamed in debian/rules) * The python3 package does include: * /usr/bin/django-admin.py (installed via setup.py and NOT renamed in debian/rules) * There was stuff in debian/rules looked kind of ugly and broken (hard coded referenced site-packages, but dist-packages used), so I deleted it until I can work out if it really is required or not. It doesn't appear to have been doing anything useful. * many lintian image-file-in-usr-lib warnings. Todo: * Obviously, we still need to fix the conflicting binary issue. It may not conflict at the moment, but that is only because the python3 package hasn't renamed it correctly. * Also uncomfortable with /etc/bash_completion.d/django_bash_completion only being included in the python2 package. -- Brian May <br...@microcomaustralia.com.au>
diff -ruN --exclude '*.bak' python-django-1.6.5.old/debian/control python-django-1.6.5/debian/control --- python-django-1.6.5.old/debian/control 2014-05-15 06:47:08.000000000 +1000 +++ python-django-1.6.5/debian/control 2014-06-23 11:48:57.194928161 +1000 @@ -6,7 +6,7 @@ Raphaƫl Hertzog <hert...@debian.org>, Chris Lamb <la...@debian.org> Standards-Version: 3.9.5 -Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-sphinx (>= 1.0.8), locales (>= 0) +Build-Depends: debhelper (>= 9), dh-python, python-all (>= 2.6.6-3~), python3-all, python-sphinx (>= 1.0.8), locales (>= 0) Build-Depends-Indep: libjs-jquery Homepage: http://www.djangoproject.com/ Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-django/trunk/ @@ -20,6 +20,33 @@ Description: High-level Python web development framework Django is a high-level web application framework that loosely follows the model-view-controller design pattern. + . + Python's equivalent to Ruby on Rails, Django lets you build complex + data-driven websites quickly and easily - Django focuses on automating as much + as possible and adhering to the "Don't Repeat Yourself" (DRY) principle. + . + Django additionally emphasizes reusability and "pluggability" of components; + many generic third-party "applications" are available to enhance projects or + to simply to reduce development time even further. + . + Notable features include: + * An object-relational mapper (ORM) + * Automatic admin interface + * Elegant URL dispatcher + * Form serialization and validation system + * Templating system + * Lightweight, standalone web server for development and testing + * Internationalization support + * Testing framework and client + +Package: python3-django +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Recommends: libjs-jquery +Suggests: python3-psycopg2, python3-psycopg, python3-mysqldb, python3-flup, python3-sqlite, python3-yaml, geoip-database-contrib, gettext, python-django-doc, ipython3, bpython3, libgdal1 +Description: High-level Python web development framework + Django is a high-level web application framework that loosely follows the + model-view-controller design pattern. . Python's equivalent to Ruby on Rails, Django lets you build complex data-driven websites quickly and easily - Django focuses on automating as much diff -ruN --exclude '*.bak' python-django-1.6.5.old/debian/python3-django.dirs python-django-1.6.5/debian/python3-django.dirs --- python-django-1.6.5.old/debian/python3-django.dirs 1970-01-01 10:00:00.000000000 +1000 +++ python-django-1.6.5/debian/python3-django.dirs 2014-06-23 11:19:43.231273218 +1000 @@ -0,0 +1 @@ +/usr/bin diff -ruN --exclude '*.bak' python-django-1.6.5.old/debian/python-django.install python-django-1.6.5/debian/python-django.install --- python-django-1.6.5.old/debian/python-django.install 2010-09-18 22:15:28.000000000 +1000 +++ python-django-1.6.5/debian/python-django.install 2014-06-23 11:37:04.487316964 +1000 @@ -1,2 +1 @@ -usr/ extras/django_bash_completion etc/bash_completion.d/ diff -ruN --exclude '*.bak' python-django-1.6.5.old/debian/rules python-django-1.6.5/debian/rules --- python-django-1.6.5.old/debian/rules 2011-09-15 20:39:41.000000000 +1000 +++ python-django-1.6.5/debian/rules 2014-06-23 12:41:33.186361373 +1000 @@ -1,18 +1,12 @@ #!/usr/bin/make -f --include /usr/share/python/python.mk -ifeq (,$(py_sitename)) - py_sitename = site-packages - py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages - py_sitename_sh = $(py_sitename) - py_libdir_sh = $(py_libdir) -endif - +export PYBUILD_NAME=django PREFIX = debian/python-django +PREFIX3 = debian/python3-django %: - dh $@ --with sphinxdoc,python2 + dh $@ --with sphinxdoc,python2,python3 --buildsystem=pybuild override_dh_auto_clean: rm -rf docs.debian tests/__init__.py @@ -46,21 +40,6 @@ override_dh_install: dh_install - # Use default shebang and m move scripts to /usr/lib/python-django - set -e; for ver in $(shell pyversions -vr); do \ - [ -f /usr/bix/python$$ver ] || continue;\ - FILE=$(PREFIX)/$(call py_libdir_sh,$$ver)/django/conf/project_template/manage.py; \ - if [ -f $$FILE ]; then\ - perl -pi -e 's|^#!/usr/bin/env python.*|#!/usr/bin/python|' $$FILE;\ - chmod +x $$FILE;\ - fi;\ - if [ -d $(PREFIX)/usr/lib/python-django ]; then\ - rm -rf $(PREFIX)/$(call py_libdir_sh,$$ver)/django/bin;\ - else\ - mkdir -p $(PREFIX)/usr/lib/python-django;\ - mv $(PREFIX)/$(call py_libdir_sh,$$ver)/django/bin $(PREFIX)/usr/lib/python-django;\ - fi;\ - done # Fix permissions chmod 644 $(PREFIX)/etc/bash_completion.d/django_bash_completion find $(PREFIX)/usr/lib/python-django/bin/ -name '*.py' -not -name '__init__.py' -print0 | xargs -0r chmod 755 @@ -72,6 +51,8 @@ set -e; for FILENAME in jquery.js jquery.min.js; do \ find $(PREFIX) -name $$FILENAME -exec \ ln -sf /usr/share/javascript/jquery/$$FILENAME {} \;; \ + find $(PREFIX3) -name $$FILENAME -exec \ + ln -sf /usr/share/javascript/jquery/$$FILENAME {} \;; \ done override_dh_compress: Binary files python-django-1.6.5.old/debian/.rules.swp and python-django-1.6.5/debian/.rules.swp differ