summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2012-12-11 22:15:21 +0900
committerINADA Naoki <inada-n@klab.com>2012-12-11 22:15:21 +0900
commitb79e5ba4e5e16eb9907e2e0081593ce6aa14eb66 (patch)
tree9a7e1f70bddf4f26d0b24e44cc0704120fe0b479 /setup.py
parenteec02b87294a84199d3eb527b785d6091307d868 (diff)
downloadmsgpack-python-b79e5ba4e5e16eb9907e2e0081593ce6aa14eb66.tar.gz
Split _msgpack.pyx
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index c73b16e..ac3eeb5 100644
--- a/setup.py
+++ b/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,