mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Split _msgpack.pyx
This commit is contained in:
parent
eec02b8729
commit
b79e5ba4e5
5 changed files with 407 additions and 382 deletions
24
setup.py
24
setup.py
|
@ -58,7 +58,6 @@ if have_cython:
|
|||
else:
|
||||
Sdist = sdist
|
||||
|
||||
sources = ['msgpack/_packer.cpp']
|
||||
libraries = []
|
||||
if sys.platform == 'win32':
|
||||
libraries.append('ws2_32')
|
||||
|
@ -68,13 +67,20 @@ if sys.byteorder == 'big':
|
|||
else:
|
||||
macros = [('__LITTLE_ENDIAN__', '1')]
|
||||
|
||||
msgpack_mod = Extension('msgpack._packer',
|
||||
sources=sources,
|
||||
libraries=libraries,
|
||||
include_dirs=['.'],
|
||||
define_macros=macros,
|
||||
)
|
||||
del sources, libraries, macros
|
||||
ext_modules = []
|
||||
ext_modules.append(Extension('msgpack._packer',
|
||||
sources=['msgpack/_packer.cpp'],
|
||||
libraries=libraries,
|
||||
include_dirs=['.'],
|
||||
define_macros=macros,
|
||||
))
|
||||
ext_modules.append(Extension('msgpack._unpacker',
|
||||
sources=['msgpack/_unpacker.cpp'],
|
||||
libraries=libraries,
|
||||
include_dirs=['.'],
|
||||
define_macros=macros,
|
||||
))
|
||||
del libraries, macros
|
||||
|
||||
|
||||
desc = 'MessagePack (de)serializer.'
|
||||
|
@ -88,7 +94,7 @@ setup(name='msgpack-python',
|
|||
author_email='songofacandy@gmail.com',
|
||||
version=version_str,
|
||||
cmdclass={'build_ext': BuildExt, 'sdist': Sdist},
|
||||
ext_modules=[msgpack_mod],
|
||||
ext_modules=ext_modules,
|
||||
packages=['msgpack'],
|
||||
description=desc,
|
||||
long_description=long_desc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue