[Python-modules-commits] r8844 - in packages/pycryptopp/trunk/debian (9 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Mon Jun 22 22:06:16 UTC 2009


    Date: Monday, June 22, 2009 @ 22:06:16
  Author: piotr
Revision: 8844

* New upstream release
* new patches:
  - do_not_regenerate_darcs_stuff.patch
  - move_testvectors_outside_site-packages.patch  

Added:
  packages/pycryptopp/trunk/debian/patches/
  packages/pycryptopp/trunk/debian/patches/do_not_regenerate_darcs_stuff.patch
  packages/pycryptopp/trunk/debian/patches/move_testvectors_outside_site-packages.patch
  packages/pycryptopp/trunk/debian/patches/series
  packages/pycryptopp/trunk/debian/python-pycryptopp.dirs
  packages/pycryptopp/trunk/debian/python-pycryptopp.docs
Modified:
  packages/pycryptopp/trunk/debian/changelog
  packages/pycryptopp/trunk/debian/control
  packages/pycryptopp/trunk/debian/rules

Modified: packages/pycryptopp/trunk/debian/changelog
===================================================================
--- packages/pycryptopp/trunk/debian/changelog	2009-06-22 09:23:21 UTC (rev 8843)
+++ packages/pycryptopp/trunk/debian/changelog	2009-06-22 22:06:16 UTC (rev 8844)
@@ -1,5 +1,5 @@
-pycryptopp (0.5.13-1) UNRELEASED; urgency=low
+pycryptopp (0.5.14-1) unstable; urgency=low
 
   * Initial release (Closes: #503977).
 
- -- Zooko O'Whielacronx <zooko at zooko.com>  Wed, 17 Jun 2009 22:11:26 +0200
+ -- Zooko O'Whielacronx <zooko at zooko.com>  Mon, 22 Jun 2009 22:20:50 +0200

Modified: packages/pycryptopp/trunk/debian/control
===================================================================
--- packages/pycryptopp/trunk/debian/control	2009-06-22 09:23:21 UTC (rev 8843)
+++ packages/pycryptopp/trunk/debian/control	2009-06-22 22:06:16 UTC (rev 8844)
@@ -3,15 +3,16 @@
 Priority: optional
 Maintainer: Zooko O'Whielacronx <zooko at zooko.com>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 5), python-all-dev, python-all-dbg, python-support (>= 0.6.4), python-setuptools (>= 0.6b3), libcrypto++-dev
+Build-Depends: debhelper (>= 5), python-all-dev, python-all-dbg, python-support (>= 0.6.4), python-setuptools (>= 0.6b3), libcrypto++-dev, quilt (>= 0.40)
 Standards-Version: 3.8.2
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pycryptopp/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pycryptopp/trunk/
 Homepage: http://allmydata.org/trac/pycryptopp
+XS-Python-Version: all
 
 Package: python-pycryptopp
 Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}, python-pkg-resources
+Depends: ${python:Depends}, ${shlibs:Depends}
 Provides: ${python:Provides}
 Description: Python wrappers for the Crypto++ library
  PyCryptopp is a set of Python wrappers for a few of the best crypto algorithms

Added: packages/pycryptopp/trunk/debian/patches/do_not_regenerate_darcs_stuff.patch
===================================================================
--- packages/pycryptopp/trunk/debian/patches/do_not_regenerate_darcs_stuff.patch	                        (rev 0)
+++ packages/pycryptopp/trunk/debian/patches/do_not_regenerate_darcs_stuff.patch	2009-06-22 22:06:16 UTC (rev 8844)
@@ -0,0 +1,40 @@
+# upstream tarball already has all .py files generated by darcs / setuptools_darcs
+# no need to regenerate them
+Index: pycryptopp-0.5.14/setup.cfg
+===================================================================
+--- pycryptopp-0.5.14.orig/setup.cfg
++++ pycryptopp-0.5.14/setup.cfg
+@@ -10,8 +10,8 @@ tag_svn_revision = 0
+ sdist_dsc = darcsver --count-all-patches sdist_dsc
+ sdist = darcsver --count-all-patches sdist
+ trial = darcsver --count-all-patches trial
+-build = darcsver --count-all-patches build
+-install = darcsver --count-all-patches install
+-test = darcsver --count-all-patches test
++#build = darcsver --count-all-patches build
++#install = darcsver --count-all-patches install
++#test = darcsver --count-all-patches test
+ bdist_egg = darcsver --count-all-patches bdist_egg
+ 
+Index: pycryptopp-0.5.14/setup.py
+===================================================================
+--- pycryptopp-0.5.14.orig/setup.py
++++ pycryptopp-0.5.14/setup.py
+@@ -218,7 +218,7 @@ install_requires = ['setuptools >= 0.6a9
+ # that are already in use), you may need to add it to setup.cfg and configure
+ # it to run darcsver before your command, if you want the version number to be
+ # correct when that command runs.  http://pypi.python.org/pypi/darcsver
+-setup_requires.append('darcsver >= 1.2.0')
++#setup_requires.append('darcsver >= 1.2.0')
+ 
+ # setuptools_pyflakes is needed only if you want "./setup.py flakes" to run
+ # pyflakes on all the pycryptopp modules.
+@@ -230,7 +230,7 @@ if 'flakes' in sys.argv[1:]:
+ # pycryptopp.egg-info/SOURCES.txt file present which contains a complete list
+ # of needed files.
+ # http://pypi.python.org/pypi/setuptools_darcs
+-setup_requires.append('setuptools_darcs >= 1.0.5')
++#setup_requires.append('setuptools_darcs >= 1.0.5')
+ 
+ data_fnames=['COPYING.GPL', 'COPYING.TGPPL.html', 'README.txt']
+ 

Added: packages/pycryptopp/trunk/debian/patches/move_testvectors_outside_site-packages.patch
===================================================================
--- packages/pycryptopp/trunk/debian/patches/move_testvectors_outside_site-packages.patch	                        (rev 0)
+++ packages/pycryptopp/trunk/debian/patches/move_testvectors_outside_site-packages.patch	2009-06-22 22:06:16 UTC (rev 8844)
@@ -0,0 +1,39 @@
+# moves testvecoros (i.e. non .py files) outside site-packages
+Index: pycryptopp-0.5.14/pycryptopp/test/__init__.py
+===================================================================
+--- /dev/null
++++ pycryptopp-0.5.14/pycryptopp/test/__init__.py
+@@ -0,0 +1,7 @@
++import os
++
++def resource_string(package_or_requirement, resource_name):
++    return file(os.path.join("/usr/share/python-pycryptopp/%s" % resource_name)).read()
++
++def resource_listdir(package_or_requirement, resource_name):
++    return os.listdir("/usr/share/python-pycryptopp/%s" % resource_name)
+Index: pycryptopp-0.5.14/pycryptopp/test/test_aes.py
+===================================================================
+--- pycryptopp-0.5.14.orig/pycryptopp/test/test_aes.py
++++ pycryptopp-0.5.14/pycryptopp/test/test_aes.py
+@@ -11,7 +11,7 @@ VERBOSE=False
+ 
+ from pycryptopp.cipher import aes
+ 
+-from pkg_resources import resource_string, resource_listdir
++from pycryptopp.test import resource_string, resource_listdir
+ 
+ from base64 import b32encode
+ def ab(x): # debuggery
+Index: pycryptopp-0.5.14/pycryptopp/test/test_sha256.py
+===================================================================
+--- pycryptopp-0.5.14.orig/pycryptopp/test/test_sha256.py
++++ pycryptopp-0.5.14/pycryptopp/test/test_sha256.py
+@@ -11,7 +11,7 @@ VERBOSE=False
+ 
+ from pycryptopp.hash import sha256
+ 
+-from pkg_resources import resource_string
++from pycryptopp.test import resource_string
+ 
+ def resource_string_lines(pkgname, resname):
+     return split_on_newlines(resource_string(pkgname, resname))

Added: packages/pycryptopp/trunk/debian/patches/series
===================================================================
--- packages/pycryptopp/trunk/debian/patches/series	                        (rev 0)
+++ packages/pycryptopp/trunk/debian/patches/series	2009-06-22 22:06:16 UTC (rev 8844)
@@ -0,0 +1,2 @@
+move_testvectors_outside_site-packages.patch
+do_not_regenerate_darcs_stuff.patch

Added: packages/pycryptopp/trunk/debian/python-pycryptopp.dirs
===================================================================
--- packages/pycryptopp/trunk/debian/python-pycryptopp.dirs	                        (rev 0)
+++ packages/pycryptopp/trunk/debian/python-pycryptopp.dirs	2009-06-22 22:06:16 UTC (rev 8844)
@@ -0,0 +1 @@
+/usr/share/python-pycryptopp/

Added: packages/pycryptopp/trunk/debian/python-pycryptopp.docs
===================================================================
--- packages/pycryptopp/trunk/debian/python-pycryptopp.docs	                        (rev 0)
+++ packages/pycryptopp/trunk/debian/python-pycryptopp.docs	2009-06-22 22:06:16 UTC (rev 8844)
@@ -0,0 +1 @@
+README.txt

Modified: packages/pycryptopp/trunk/debian/rules
===================================================================
--- packages/pycryptopp/trunk/debian/rules	2009-06-22 09:23:21 UTC (rev 8843)
+++ packages/pycryptopp/trunk/debian/rules	2009-06-22 22:06:16 UTC (rev 8844)
@@ -2,10 +2,16 @@
 
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
+-include /usr/share/python/python.mk
+ifeq (,$(py_libdir))
+    py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
+endif
+
 PYVERS=$(shell pyversions -vr)
 PKGDIR=$(CURDIR)/debian/python-pycryptopp
 
-clean: 
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -rf dist build build-*
@@ -14,29 +20,34 @@
 		$(PYVERS:%=install-python%) $(PYVERS:%=build-python%) \
 		$(PYVERS:%=install-debug-python%) $(PYVERS:%=build-debug-python%)
 
-build: build-stamp
+build: patch build-stamp
 
 build-stamp: $(PYVERS:%=build-python%) $(PYVERS:%=build-debug-python%)
 	touch $@
 
-build-python%:
+build-python%: patch
 	python$* setup.py build --disable-embedded-cryptopp
 	touch $@
 
-build-debug-python%:
+build-debug-python%: patch
 	python$*-dbg setup.py build --disable-embedded-cryptopp
 	touch $@
 
-install: $(PYVERS:%=install-python%) $(PYVERS:%=install-debug-python%)
-	# temporary workaround:
-	rm -f ${PKGDIR}/usr/share/doc/python-pycryptopp/COPYING.GPL
-	rm -f ${PKGDIR}-dbg/usr/share/doc/python-pycryptopp/COPYING.GPL
-	# python-pkg-resources (used by tests only) is already in Depends, lets not require full setuptools:
-	find $(PKGDIR)-dbg/usr/ -type f -name requires.txt -delete
+install: patch $(PYVERS:%=install-python%) $(PYVERS:%=install-debug-python%)
+	# pkg_resources is not used (see patches), no need to require setuptools
+	find $(PKGDIR)/usr/ -type f -name requires.txt -delete
+	# docs are in /usr/share/doc/python-pycryptopp/, remove duplicates
+	rm -rf $(PKGDIR)/usr/share/doc/pycryptopp/
+	rm -rf $(PKGDIR)-dbg/usr/share/doc/pycryptopp/
 
 install-python%: build
+	dh_installdirs
 	python$* setup.py install \
 		--skip-build --single-version-externally-managed --root $(PKGDIR)
+	# move test vectors outside site-packages
+	if [ -d $(PKGDIR)/usr/share/python-pycryptopp/testvectors ]; then \
+		rm -rf $(PKGDIR)/$(call py_libdir,$*)/pycryptopp/testvectors; \
+	else	mv $(PKGDIR)/$(call py_libdir,$*)/pycryptopp/testvectors $(PKGDIR)/usr/share/python-pycryptopp/; fi
 	touch $@
 
 install-debug-python%: build




More information about the Python-modules-commits mailing list