From 7b16bc18be60d0f631aecd650b459dc32de51bad Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Fri, 20 Jan 2012 19:30:57 -0700 Subject: [PATCH] take msgpack out of the setup.py --- MANIFEST.in | 4 +++- requirements.txt | 6 ++++++ setup.py | 38 +------------------------------------- 3 files changed, 10 insertions(+), 38 deletions(-) create mode 100644 requirements.txt diff --git a/MANIFEST.in b/MANIFEST.in index 81c035d985..7c985df044 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,3 @@ -include salt/msgpack/*.h +include AUTHORS +include LICENSE +include README.rst diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..08bfd0d20e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +Jinja2 +pyzmq +msgpack-python +M2Crypto +pycrypto +PyYAML diff --git a/setup.py b/setup.py index 491c0dba04..3c9fb691ba 100755 --- a/setup.py +++ b/setup.py @@ -32,15 +32,6 @@ class TestCommand(Command): ) test_process.communicate() -try: - from Cython.Distutils import build_ext - import Cython.Compiler.Main as cython_compiler - have_cython = True -except ImportError: - from distutils.command.build_ext import build_ext - have_cython = False - - NAME = 'salt' VER = __version__ DESC = ('Portable, distributed, remote execution and ' @@ -55,28 +46,8 @@ if 'SYSCONFDIR' in os.environ: else: etc_path = os.path.join(os.path.dirname(PREFIX), 'etc') -# take care of extension modules. -if have_cython: - sources = ['salt/msgpack/_msgpack.pyx'] - - class Sdist(sdist): - def __init__(self, *args, **kwargs): - for src in glob('salt/msgpack/*.pyx'): - cython_compiler.compile(glob('msgpack/*.pyx'), - cython_compiler.default_options) - sdist.__init__(self, *args, **kwargs) -else: - sources = ['salt/msgpack/_msgpack.c'] - - Sdist = sdist - libraries = ['ws2_32'] if sys.platform == 'win32' else [] -msgpack_mod = Extension('salt.msgpack._msgpack', - sources=sources, - libraries=libraries, - ) - setup( name=NAME, version=VER, @@ -84,8 +55,7 @@ setup( author='Thomas S Hatch', author_email='thatch45@gmail.com', url='http://saltstack.org', - ext_modules=[msgpack_mod], - cmdclass={'build_ext': build_ext, 'sdist': Sdist, 'test': TestCommand}, + cmdclass={'test': TestCommand}, classifiers=[ 'Programming Language :: Python', 'Programming Language :: Cython', @@ -111,7 +81,6 @@ setup( 'salt.runners', 'salt.states', 'salt.utils', - 'salt.msgpack', ], scripts=['scripts/salt-master', 'scripts/salt-minion', @@ -138,10 +107,5 @@ setup( ('share/man/man7', ['doc/man/salt.7', ]), - (doc_path, - ['LICENSE', - 'AUTHORS', - 'README.rst', - ]), ], )