take msgpack out of the setup.py

This commit is contained in:
Thomas S Hatch 2012-01-20 19:30:57 -07:00
parent 77a66402bb
commit 7b16bc18be
3 changed files with 10 additions and 38 deletions

View File

@ -1 +1,3 @@
include salt/msgpack/*.h
include AUTHORS
include LICENSE
include README.rst

6
requirements.txt Normal file
View File

@ -0,0 +1,6 @@
Jinja2
pyzmq
msgpack-python
M2Crypto
pycrypto
PyYAML

View File

@ -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',
]),
],
)