Komprimierung mit PyLZMA

Stellt hier eure Projekte vor.
Internetseiten, Skripte, und alles andere bzgl. Python.
Antworten
Magog
User
Beiträge: 1
Registriert: Montag 5. Juli 2004, 12:00
Wohnort: Stuttgart
Kontaktdaten:

Hi,

auf meiner Homepage gibt es das Python-Modul PyLZMA, das eine Python-Schnittstelle zur Komprimierungs-Library LZMA bereitstellt.
LZMA wird u.a. von 7-zip verwendet und komprimiert in vielen Fällen deutlich besser als Zip, gzip oder bzip2.

PyLZMA funktioniert mit Python 2.1 bis 2.3, sowohl unter Windows, als auch unter Linux und FreeBSD. Zum Kompilieren werden keine zusätzlichen Bibliotheken benötigt.

Downloaden (Source, Binaries) könnt Ihr die aktuelle Version PyLZMA 0.0.3 unter folgender Url: http://www.joachim-bauch.de/projects/python/pylzma/

Feedback willkommen!
Joachim
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Cool! Hält es aich auch an die Konventionen des bz2 Moduls? Dann könnte man es als dropin verwenden. Aja, und ein Python 2.4 binary für Windows fehlt noch :)
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
Ubuntuxer
User
Beiträge: 42
Registriert: Donnerstag 17. April 2008, 15:49

Hi,
ich versuche gerade die Version 0.3.0 zu kompilimiren Ubuntu Hardy zu kompilieren, doch ich bekomme leider folgende Fehlermeldung:
johannes@johannes-pc:~/Desktop/pylzma-0.3.0$ python setup.py build
setup.py:83: UnsupportedPlatformWarning: Multithreading is not supported on the platform "linux2",
please contact mail@joachim-bauch.de for more informations.
please contact mail@joachim-bauch.de for more informations.""" % (sys.platform), UnsupportedPlatformWarning)
running build
running build_py
running build_ext
building 'pylzma' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWITH_COMPAT=1 -I/usr/include/python2.5 -I. -I/usr/include/python2.5 -c pylzma.c -o build/temp.linux-x86_64-2.5/pylzma.o -Wno-non-virtual-dtor
cc1: Warnung: Kommandozeilenoption "-Wno-non-virtual-dtor" ist gültig für C++/ObjC++, aber nicht für C
pylzma.c:26:20: Fehler: Python.h: No such file or directory
pylzma.c:27:23: Fehler: cStringIO.h: No such file or directory
In file included from pylzma.c:30:
pylzma_compress.h:32: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:31:
pylzma_decompress.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:32:
pylzma_decompressobj.h:33: Fehler: expected specifier-qualifier-list before »PyObject_HEAD«
pylzma_decompressobj.h:42: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CDecompressionObject_Type«
In file included from pylzma.c:33:
pylzma_compressobj.h:29: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompressionObject_Type«
pylzma_compressobj.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:34:
pylzma_compressfile.h:33: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompressionFileObject_Type«
In file included from pylzma.c:36:
pylzma_decompress_compat.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:37:
pylzma_decompressobj_compat.h:33: Fehler: expected specifier-qualifier-list before »PyObject_HEAD«
pylzma_decompressobj_compat.h:40: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompatDecompressionObject_Type«
pylzma_decompressobj_compat.h:45: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
pylzma.c:44: Fehler: expected »)« before »*« token
pylzma.c:53: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »methods«
pylzma.c:67: Warnung: Rückgabetyp ist auf »int« voreingestellt
pylzma.c: In Funktion »DL_EXPORT«:
pylzma.c:67: Fehler: expected declaration specifiers before »initpylzma«
pylzma.c:99: Fehler: expected »{« at end of input
error: command 'gcc' failed with exit status 1

Kann mir da jemand helfen?
Gibt es noch eine andere Möglichkeit über Python 7zip Pakete zu entpacken?
vielen dank schon mal :)
audax
User
Beiträge: 830
Registriert: Mittwoch 19. Dezember 2007, 10:38

Dir fehlen die Python-Header.
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

btw. Da hast du leider ein kleines Spam Problem...

PyLZMA ist echt nett! Wäre toll, wenn es direkt in die Python Distribution aufgenommen werden würde ;)

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Ubuntuxer
User
Beiträge: 42
Registriert: Donnerstag 17. April 2008, 15:49

vielen dank audax; eigentlich hät ich darauf auch selber kommen können. :wink:
Antworten