Package: python-pymongo Version: 2.2-1 Severity: wishlist Tags: patch Hi,
I wrote a patch to support python3. Please help to see if it is suitable for official package, thanks. Regards, ChangZhuo -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-pymongo depends on: ii python 2.7.3~rc2-1 ii python-bson 2.2-1 ii python2.6 2.6.8-0.2 ii python2.7 2.7.3~rc2-2.1 Versions of packages python-pymongo recommends: ii python-gridfs 2.2-1 ii python-pymongo-ext 2.2-1 python-pymongo suggests no packages. -- no debconf information
diff -Naur pymongo-2.2.orig/debian/control pymongo-2.2/debian/control --- pymongo-2.2.orig/debian/control 2012-05-11 04:22:07.000000000 +0800 +++ pymongo-2.2/debian/control 2012-06-22 23:38:54.072341069 +0800 @@ -7,9 +7,12 @@ Build-Depends: debhelper (>= 8.0.0~), python-all-dev (>= 2.6.6-3~), python-setuptools (>= 0.6.14), - python-sphinx + python-sphinx, + python3-all-dev (>= 3.1), + python3-setuptools Standards-Version: 3.9.3 X-Python-Version: >= 2.5 +X-Python3-Version: >= 3.1 Homepage: http://api.mongodb.org/python/ Vcs-Git: git://git.debian.org/git/collab-maint/pymongo.git Vcs-Browser: http://git.debian.org/?p=collab-maint/pymongo.git @@ -26,6 +29,18 @@ to easily access it from Python. Consider installing the python-pymongo-ext C extension to improve performance. +Package: python3-pymongo +Architecture: any +Depends: python3-bson (= ${binary:Version}), ${python3:Depends}, ${misc:Depends} +Recommends: python3-gridfs (>= ${source:Version}) + , python-pymongo-ext [any-i386 any-ia64 any-amd64] +Provides: ${python3:Provides} +Description: Python interface to the MongoDB document-oriented database + MongoDB is a high-performance, open source, schema-free + document-oriented data store. Pymongo provides an interface + to easily access it from Python. + Consider installing the python-pymongo-ext C extension to improve performance. + Package: python-pymongo-ext Architecture: any-i386 any-ia64 any-amd64 Depends: python-bson (= ${binary:Version}), ${shlibs:Depends} @@ -58,6 +73,15 @@ The Python gridfs module is an implementation based on the pymongo module. It provides a file-like interface. +Package: python3-gridfs +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends} +Provides: ${python3:Provides} +Description: Python implementation of GridFS for MongoDB + GridFS is a storage specification for large objects in MongoDB. + The Python gridfs module is an implementation based + on the pymongo module. It provides a file-like interface. + Package: python-bson Architecture: any Depends: ${python:Depends}, ${misc:Depends}, ${shlibs:Depends} @@ -66,6 +90,15 @@ Description: Python implementation of BSON for MongoDB BSON Python module contains all of the Binary JSON encoding and decoding logic for MongoDB. + +Package: python3-bson +Architecture: any +Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends} +Recommends: python-bson-ext [any-i386 any-ia64 any-amd64] +Provides: ${python3:Provides} +Description: Python implementation of BSON for MongoDB + BSON Python module contains all of the Binary JSON encoding and decoding + logic for MongoDB. Package: python-bson-ext Architecture: any-i386 any-ia64 any-amd64 diff -Naur pymongo-2.2.orig/debian/python3-bson.install pymongo-2.2/debian/python3-bson.install --- pymongo-2.2.orig/debian/python3-bson.install 1970-01-01 08:00:00.000000000 +0800 +++ pymongo-2.2/debian/python3-bson.install 2012-06-22 15:10:09.954730423 +0800 @@ -0,0 +1 @@ +usr/lib/python3*/*-packages/bson*/*.py diff -Naur pymongo-2.2.orig/debian/python3-gridfs.install pymongo-2.2/debian/python3-gridfs.install --- pymongo-2.2.orig/debian/python3-gridfs.install 1970-01-01 08:00:00.000000000 +0800 +++ pymongo-2.2/debian/python3-gridfs.install 2012-06-22 15:08:15.834164529 +0800 @@ -0,0 +1 @@ +usr/lib/python3*/*-packages/gridfs* diff -Naur pymongo-2.2.orig/debian/python3-pymongo.install pymongo-2.2/debian/python3-pymongo.install --- pymongo-2.2.orig/debian/python3-pymongo.install 1970-01-01 08:00:00.000000000 +0800 +++ pymongo-2.2/debian/python3-pymongo.install 2012-06-22 14:35:29.916416059 +0800 @@ -0,0 +1,2 @@ +usr/lib/python3*/*-packages/pymongo*/*.py +usr/lib/python3*/*-packages/pymongo*/*.txt diff -Naur pymongo-2.2.orig/debian/python-bson.install pymongo-2.2/debian/python-bson.install --- pymongo-2.2.orig/debian/python-bson.install 2012-05-11 04:22:07.000000000 +0800 +++ pymongo-2.2/debian/python-bson.install 2012-06-22 15:10:03.682699325 +0800 @@ -1 +1 @@ -usr/lib/python*/*-packages/bson*/*.py +usr/lib/python2*/*-packages/bson*/*.py diff -Naur pymongo-2.2.orig/debian/python-gridfs.install pymongo-2.2/debian/python-gridfs.install --- pymongo-2.2.orig/debian/python-gridfs.install 2012-05-11 04:22:07.000000000 +0800 +++ pymongo-2.2/debian/python-gridfs.install 2012-06-22 15:08:21.366191964 +0800 @@ -1 +1 @@ -usr/lib/python*/*-packages/gridfs* +usr/lib/python2*/*-packages/gridfs* diff -Naur pymongo-2.2.orig/debian/python-pymongo.install pymongo-2.2/debian/python-pymongo.install --- pymongo-2.2.orig/debian/python-pymongo.install 2012-05-11 04:22:07.000000000 +0800 +++ pymongo-2.2/debian/python-pymongo.install 2012-06-22 14:35:16.776350914 +0800 @@ -1,2 +1,2 @@ -usr/lib/python*/*-packages/pymongo*/*.py -usr/lib/python*/*-packages/pymongo*/*.txt +usr/lib/python2*/*-packages/pymongo*/*.py +usr/lib/python2*/*-packages/pymongo*/*.txt diff -Naur pymongo-2.2.orig/debian/rules pymongo-2.2/debian/rules --- pymongo-2.2.orig/debian/rules 2012-05-11 04:22:07.000000000 +0800 +++ pymongo-2.2/debian/rules 2012-06-23 10:50:06.145556318 +0800 @@ -1,16 +1,28 @@ #!/usr/bin/make -f export DH_VERBOSE=1 +PY3VERS = $(shell py3versions -r 2>/dev/null) +ROOT=$(CURDIR)/debian/tmp + %: - dh $@ --with python2 + dh $@ --with python2,python3 override_dh_auto_build: dh_auto_build + for py3 in $(PY3VERS); do \ + $$py3 setup.py build --force --build-base=$(ROOT); \ + done sphinx-build -b html doc debian/html rm -rf debian/html/_sources/ rm -f debian/python-pymongo-doc/usr/share/doc/python-pymongo-doc/html/_static/jquery.js rm -rf debian/python-pymongo-doc/usr/share/doc/python-pymongo-doc/html/.doctrees +override_dh_auto_install: + dh_auto_install + for py3 in $(PY3VERS); do \ + $$py3 setup.py install --install-layout=deb --force --no-compile -O0 --root=$(ROOT); \ + done + override_dh_installchangelogs: dh_installchangelogs doc/changelog.rst @@ -18,6 +30,9 @@ rm -rf debian/html find doc -name "*.pyc" -exec rm -rf {} + dh_auto_clean + for py3 in $(PY3VERS); do \ + $$py3 setup.py clean --all --build-base=$(ROOT); \ + done override_dh_compress: dh_compress -X.html