Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed merge conflict

  • Loading branch information...
commit b2a61778bec84155bccc9d9284eaf56b115acace 2 parents 770175b + 6e9028f
@fancycode authored
View
1  doc/THANKS.txt
@@ -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
9 setup.py
@@ -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
3  src/pylzma/pylzma.c
@@ -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();
View
6 src/pylzma/pylzma_compressfile.c
@@ -34,6 +34,12 @@
#include "pylzma_compress.h"
#include "pylzma_compressfile.h"
+void
+pylzma_init_compfile()
+{
+ PycString_IMPORT;
+}
+
typedef struct {
PyObject_HEAD
CLzmaEncHandle encoder;
View
1  src/pylzma/pylzma_compressfile.h
@@ -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
5 tests/test_pylzma.py
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.