Permalink
Browse files

fixed merge conflict

  • Loading branch information...
2 parents 770175b + 6e9028f commit b2a61778bec84155bccc9d9284eaf56b115acace @fancycode committed Oct 23, 2010
Showing with 20 additions and 5 deletions.
  1. +1 −0 doc/THANKS.txt
  2. +6 −3 setup.py
  3. +1 −2 src/pylzma/pylzma.c
  4. +6 −0 src/pylzma/pylzma_compressfile.c
  5. +1 −0 src/pylzma/pylzma_compressfile.h
  6. +5 −0 tests/test_pylzma.py
View
@@ -8,3 +8,4 @@ Helmut Jarausch - jarausch <at> igpm.rwth-aachen <dot> de
Nikolaus Rath - nikolaus <at> rath <dot> org
David Agnew - prescindor <at> gmail <dot> com
Sofring Chow - sofring912 <at> gmail <dot> com
+David Turon - turon.david <at> seznam <dot> cz
View
@@ -27,10 +27,13 @@
from distutils import log
from distutils.command.build_ext import build_ext as _build_ext
-from ez_setup import use_setuptools
-use_setuptools()
+try:
+ from setuptools import setup, Extension
+except ImportError:
+ from ez_setup import use_setuptools
+ use_setuptools()
-from setuptools import setup, Extension
+ from setuptools import setup, Extension
class UnsupportedPlatformWarning(Warning):
pass
View
@@ -24,7 +24,6 @@
*/
#include <Python.h>
-#include <cStringIO.h>
#include "../sdk/7zVersion.h"
#include "../7zip/C/Sha256.h"
@@ -183,7 +182,7 @@ initpylzma(void)
PyModule_AddStringConstant(m, "SDK_VERSION_COPYRIGHT_DATE", MY_VERSION_COPYRIGHT_DATE);
AesGenTables();
- PycString_IMPORT;
+ pylzma_init_compfile();
#if defined(WITH_THREAD)
PyEval_InitThreads();
@@ -34,6 +34,12 @@
#include "pylzma_compress.h"
#include "pylzma_compressfile.h"
+void
+pylzma_init_compfile()
+{
+ PycString_IMPORT;
+}
+
typedef struct {
PyObject_HEAD
CLzmaEncHandle encoder;
@@ -26,6 +26,7 @@
#ifndef ___PYLZMA_COMPRESSFILE__H___
#define ___PYLZMA_COMPRESSFILE__H___
+void pylzma_init_compfile();
extern PyTypeObject CCompressionFileObject_Type;
#define CompressionFileObject_Check(v) ((v)->ob_type == &CCompressionFileObject_Type)
View
@@ -221,6 +221,11 @@ def test_compress_large_stream_bigchunks(self):
outfile.write(decompress.flush())
self.failUnless(data == outfile.getvalue())
+ def test_bugzilla_13(self):
+ # prevent regression of bugzilla #13
+ fp = pylzma.compressfile('/tmp/test')
+ self.failUnless(isinstance(fp, pylzma.compressfile))
+
def suite():
suite = unittest.TestSuite()

0 comments on commit b2a6177

Please sign in to comment.