diff -Nru python-crypto-2.4/ChangeLog python-crypto-2.4.1/ChangeLog --- python-crypto-2.4/ChangeLog 2011-10-22 19:30:34.000000000 +0000 +++ python-crypto-2.4.1/ChangeLog 2011-11-04 19:17:40.000000000 +0000 @@ -1,3 +1,8 @@ +2.4.1 +===== + * Fix "error: Setup script exited with error: src/config.h: No such file or + directory" when installing via easy_install. (Sebastian Ramacher) + 2.4 === * Python 3 support! (Thorsten E. Behrens, Anders Sundman) diff -Nru python-crypto-2.4/debian/changelog python-crypto-2.4.1/debian/changelog --- python-crypto-2.4/debian/changelog 2011-10-24 19:10:19.000000000 +0000 +++ python-crypto-2.4.1/debian/changelog 2011-11-16 17:09:19.000000000 +0000 @@ -1,3 +1,18 @@ +python-crypto (2.4.1-1) unstable; urgency=low + + * New upstream release. + * debian/rules: also export CPPFLAGS to honor all hardening flags. + * Support noopt. + - debian/patches: + + dont-drop-g.patch: update to don't drop optimization flags and to + don't append -O3. + + Add fix-unresolved-reference-size.patch to fix an unresolved reference + in _fastmath when built without optimization. + - debian/rules: if noopt is not set, append -O3 to CFLAGS (as upstream + does). + + -- Sebastian Ramacher Wed, 16 Nov 2011 18:09:13 +0100 + python-crypto (2.4-1) unstable; urgency=low [ Sebastian Ramacher ] diff -Nru python-crypto-2.4/debian/patches/dont-drop-g.patch python-crypto-2.4.1/debian/patches/dont-drop-g.patch --- python-crypto-2.4/debian/patches/dont-drop-g.patch 2011-10-23 10:03:07.000000000 +0000 +++ python-crypto-2.4.1/debian/patches/dont-drop-g.patch 2011-11-12 16:06:09.000000000 +0000 @@ -1,16 +1,28 @@ -Description: don't drop -g from the call to gcc - The binaries will be stripped later anyway. +Description: don't drop -g and optimization values from the call to gcc + The binaries will be stripped later anyway and CFLAGS contains the correct + flags. Origin: Sebastian Ramacher -Last-Update: 2011-10-12 +Last-Update: 2011-11-12 Forwarded: no diff --git a/setup.py b/setup.py -index 09fbc09..d0c6201 100644 +index cda9950..b6ae68c 100644 --- a/setup.py +++ b/setup.py -@@ -177,8 +177,6 @@ class PCTBuildExt (build_ext): +@@ -166,8 +166,6 @@ class PCTBuildExt (build_ext): + self.__remove_compiler_option("-DNDEBUG") + + # Choose our own optimization options +- for opt in ["-O", "-O0", "-O1", "-O2", "-O3", "-Os"]: +- self.__remove_compiler_option(opt) + if self.debug: + # Basic optimization is still needed when debugging to compile + # the libtomcrypt code. +@@ -175,10 +173,7 @@ class PCTBuildExt (build_ext): + else: + # Speed up execution by tweaking compiler options. This # especially helps the DES modules. - self.__add_compiler_option("-O3") +- self.__add_compiler_option("-O3") self.__add_compiler_option("-fomit-frame-pointer") - # Don't include debug symbols unless debugging - self.__remove_compiler_option("-g") diff -Nru python-crypto-2.4/debian/patches/fix-unresolved-reference-size.patch python-crypto-2.4.1/debian/patches/fix-unresolved-reference-size.patch --- python-crypto-2.4/debian/patches/fix-unresolved-reference-size.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-crypto-2.4.1/debian/patches/fix-unresolved-reference-size.patch 2011-11-16 16:59:25.000000000 +0000 @@ -0,0 +1,23 @@ +Description: fix build issues if built without optimization. + If built with -O0 the call to size won't be inlined and thus _fastmath cannot + be loaded due to an unresolved symbol. +Author: Sebastian Ramacher +Last-Update: 2011-11-16 +Forwarded: http://lists.dlitz.net/pipermail/pycrypto/2011q4/000514.html + +diff --git a/src/_fastmath.c b/src/_fastmath.c +index eff3e29..5882f3d 100644 +--- a/src/_fastmath.c ++++ b/src/_fastmath.c +@@ -998,7 +998,7 @@ cleanup: + + + +-INLINE size_t size (mpz_t n) ++static INLINE size_t size (mpz_t n) + { + return mpz_sizeinbase (n, 2); + } +-- +1.7.7.2 + diff -Nru python-crypto-2.4/debian/patches/series python-crypto-2.4.1/debian/patches/series --- python-crypto-2.4/debian/patches/series 2011-10-23 10:03:07.000000000 +0000 +++ python-crypto-2.4.1/debian/patches/series 2011-11-16 16:59:25.000000000 +0000 @@ -1 +1,2 @@ dont-drop-g.patch +fix-unresolved-reference-size.patch diff -Nru python-crypto-2.4/debian/rules python-crypto-2.4.1/debian/rules --- python-crypto-2.4/debian/rules 2011-10-24 13:26:34.000000000 +0000 +++ python-crypto-2.4.1/debian/rules 2011-11-12 16:06:09.000000000 +0000 @@ -11,7 +11,13 @@ pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1)) pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug) +# build with -O3 (as upstream does) if noopt is not set +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +export DEB_CFLAGS_MAINT_APPEND=-O3 +endif + export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) %: diff -Nru python-crypto-2.4/Doc/pycrypt.rst python-crypto-2.4.1/Doc/pycrypt.rst --- python-crypto-2.4/Doc/pycrypt.rst 2011-10-22 19:30:34.000000000 +0000 +++ python-crypto-2.4.1/Doc/pycrypt.rst 2011-11-04 19:17:40.000000000 +0000 @@ -2,7 +2,7 @@ Python Cryptography Toolkit ==================================== -**Version 2.4** +**Version 2.4.1** The Python Cryptography Toolkit describes a package containing various cryptographic modules for the Python programming language. This diff -Nru python-crypto-2.4/lib/Crypto/__init__.py python-crypto-2.4.1/lib/Crypto/__init__.py --- python-crypto-2.4/lib/Crypto/__init__.py 2011-10-22 19:30:34.000000000 +0000 +++ python-crypto-2.4.1/lib/Crypto/__init__.py 2011-11-04 19:17:40.000000000 +0000 @@ -38,7 +38,7 @@ __all__ = ['Cipher', 'Hash', 'Protocol', 'PublicKey', 'Util'] -__version__ = '2.4' # See also below and setup.py +__version__ = '2.4.1' # See also below and setup.py __revision__ = "$Id$" # New software should look at this instead of at __version__ above. diff -Nru python-crypto-2.4/MANIFEST.in python-crypto-2.4.1/MANIFEST.in --- python-crypto-2.4/MANIFEST.in 2011-10-22 19:30:34.000000000 +0000 +++ python-crypto-2.4.1/MANIFEST.in 2011-11-04 19:17:40.000000000 +0000 @@ -2,4 +2,6 @@ include ACKS ChangeLog COPYRIGHT Doc/* TODO graft LEGAL recursive-include src *.h *.c +include src/config.h.in include *.py +include configure configure.ac diff -Nru python-crypto-2.4/setup.py python-crypto-2.4.1/setup.py --- python-crypto-2.4/setup.py 2011-10-22 19:30:34.000000000 +0000 +++ python-crypto-2.4.1/setup.py 2011-11-04 19:17:40.000000000 +0000 @@ -287,12 +287,17 @@ f.close() return result -class PCTBuild(build): + def run(self): + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + build_ext.run(self) + def has_configure(self): compiler = new_compiler(compiler=self.compiler) return compiler.compiler_type != 'msvc' - sub_commands = [ ('build_configure', has_configure) ] + build.sub_commands + sub_commands = [ ('build_configure', has_configure) ] + build_ext.sub_commands class PCTBuildConfigure(Command): description = "Generate config.h using ./configure (autoconf)" @@ -378,13 +383,13 @@ self.announce("running extended self-tests") kw = {'name':"pycrypto", - 'version':"2.4", # See also: lib/Crypto/__init__.py + 'version':"2.4.1", # See also: lib/Crypto/__init__.py 'description':"Cryptographic modules for Python.", 'author':"Dwayne C. Litzenberger", 'author_email':"dlitz@dlitz.net", 'url':"http://www.pycrypto.org/", - 'cmdclass' : {'build': PCTBuild, 'build_configure': PCTBuildConfigure, 'build_ext':PCTBuildExt, 'build_py': PCTBuildPy, 'test': TestCommand }, + 'cmdclass' : {'build_configure': PCTBuildConfigure, 'build_ext': PCTBuildExt, 'build_py': PCTBuildPy, 'test': TestCommand }, 'packages' : ["Crypto", "Crypto.Hash", "Crypto.Cipher", "Crypto.Util", "Crypto.Random", "Crypto.Random.Fortuna",