mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
Clean up
This commit is contained in:
parent
979efbb950
commit
900785e1aa
@ -13,11 +13,11 @@ You can read document in docstring after `import msgpack`
|
|||||||
|
|
||||||
INSTALL
|
INSTALL
|
||||||
---------
|
---------
|
||||||
Cython_ is required to build the binding.
|
Cython_ is required to build msgpack.
|
||||||
|
|
||||||
.. _Cython: http://www.cython.org/
|
.. _Cython: http://www.cython.org/
|
||||||
|
|
||||||
Posix
|
posix
|
||||||
''''''
|
''''''
|
||||||
You can install msgpack in common way.
|
You can install msgpack in common way.
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Windows
|
|||||||
MessagePack requires gcc currently. So you need to prepare
|
MessagePack requires gcc currently. So you need to prepare
|
||||||
MinGW GCC.
|
MinGW GCC.
|
||||||
|
|
||||||
$ python setup.py install -c mingw
|
$ python setup.py install -c mingw32
|
||||||
|
|
||||||
TEST
|
TEST
|
||||||
----
|
----
|
||||||
|
@ -163,7 +163,7 @@ cdef extern from "unpack.h":
|
|||||||
object template_data(template_context* ctx)
|
object template_data(template_context* ctx)
|
||||||
|
|
||||||
|
|
||||||
def unpacks(object packed_bytes):
|
def unpackb(object packed_bytes):
|
||||||
"""Unpack packed_bytes to object. Returns unpacked object."""
|
"""Unpack packed_bytes to object. Returns unpacked object."""
|
||||||
cdef const_char_ptr p = packed_bytes
|
cdef const_char_ptr p = packed_bytes
|
||||||
cdef template_context ctx
|
cdef template_context ctx
|
||||||
@ -176,10 +176,12 @@ def unpacks(object packed_bytes):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
unpacks = unpackb
|
||||||
|
|
||||||
def unpack(object stream):
|
def unpack(object stream):
|
||||||
"""unpack from stream."""
|
"""unpack from stream."""
|
||||||
packed = stream.read()
|
packed = stream.read()
|
||||||
return unpacks(packed)
|
return unpackb(packed)
|
||||||
|
|
||||||
cdef class UnpackIterator(object):
|
cdef class UnpackIterator(object):
|
||||||
cdef object unpacker
|
cdef object unpacker
|
||||||
|
@ -7,18 +7,14 @@ import os
|
|||||||
|
|
||||||
version = '0.0.1dev'
|
version = '0.0.1dev'
|
||||||
|
|
||||||
PACKAGE_ROOT = os.getcwdu()
|
|
||||||
INCLUDE_PATH = os.path.join(PACKAGE_ROOT, 'include')
|
|
||||||
msgpack_mod = Extension('msgpack._msgpack',
|
msgpack_mod = Extension('msgpack._msgpack',
|
||||||
sources=['msgpack/_msgpack.pyx'],
|
sources=['msgpack/_msgpack.pyx']
|
||||||
include_dirs=[INCLUDE_PATH])
|
)
|
||||||
|
|
||||||
desc = 'MessagePack serializer/desirializer.'
|
desc = 'MessagePack (de)serializer.'
|
||||||
long_desc = desc + """
|
long_desc = desc + """
|
||||||
|
|
||||||
Python binding of MessagePack_.
|
MessagePack_ (de)serializer for Python.
|
||||||
|
|
||||||
This package is under development.
|
|
||||||
|
|
||||||
.. _MessagePack: http://msgpack.sourceforge.jp/
|
.. _MessagePack: http://msgpack.sourceforge.jp/
|
||||||
|
|
||||||
@ -37,4 +33,9 @@ setup(name='msgpack',
|
|||||||
packages=['msgpack'],
|
packages=['msgpack'],
|
||||||
description=desc,
|
description=desc,
|
||||||
long_description=long_desc,
|
long_description=long_desc,
|
||||||
|
classifiers=[
|
||||||
|
'Development Status :: 4 - Beta',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'License :: OSI Approved :: Apache Software License',
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user