summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2012-12-11 22:17:36 +0900
committerINADA Naoki <inada-n@klab.com>2012-12-11 22:17:36 +0900
commit685026d2e1e2c014118954781d7e30bcf2ba3038 (patch)
tree6dd5d92c809ec2c94c4effcff46617513be87d32 /setup.py
parent171145e56290a2254d6b648d438dde33cd631fc4 (diff)
parent1c5b865db36a9cd2db5eb8de7625573a78085c56 (diff)
downloadmsgpack-python-685026d2e1e2c014118954781d7e30bcf2ba3038.tar.gz
Split _msgpack.pyx (fix #34)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index b9af8c3..ac3eeb5 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,6 @@
# coding: utf-8
import os
import sys
-import shutil
from glob import glob
from distutils.command.sdist import sdist
from setuptools import setup, Extension
@@ -59,7 +58,6 @@ if have_cython:
else:
Sdist = sdist
-sources = ['msgpack/_msgpack.cpp']
libraries = []
if sys.platform == 'win32':
libraries.append('ws2_32')
@@ -69,13 +67,20 @@ if sys.byteorder == 'big':
else:
macros = [('__LITTLE_ENDIAN__', '1')]
-msgpack_mod = Extension('msgpack._msgpack',
- 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.'
@@ -89,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,