mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
take msgpack out of the setup.py
This commit is contained in:
parent
77a66402bb
commit
7b16bc18be
3 changed files with 10 additions and 38 deletions
|
@ -1 +1,3 @@
|
||||||
include salt/msgpack/*.h
|
include AUTHORS
|
||||||
|
include LICENSE
|
||||||
|
include README.rst
|
||||||
|
|
6
requirements.txt
Normal file
6
requirements.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Jinja2
|
||||||
|
pyzmq
|
||||||
|
msgpack-python
|
||||||
|
M2Crypto
|
||||||
|
pycrypto
|
||||||
|
PyYAML
|
38
setup.py
38
setup.py
|
@ -32,15 +32,6 @@ class TestCommand(Command):
|
||||||
)
|
)
|
||||||
test_process.communicate()
|
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'
|
NAME = 'salt'
|
||||||
VER = __version__
|
VER = __version__
|
||||||
DESC = ('Portable, distributed, remote execution and '
|
DESC = ('Portable, distributed, remote execution and '
|
||||||
|
@ -55,28 +46,8 @@ if 'SYSCONFDIR' in os.environ:
|
||||||
else:
|
else:
|
||||||
etc_path = os.path.join(os.path.dirname(PREFIX), 'etc')
|
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 []
|
libraries = ['ws2_32'] if sys.platform == 'win32' else []
|
||||||
|
|
||||||
msgpack_mod = Extension('salt.msgpack._msgpack',
|
|
||||||
sources=sources,
|
|
||||||
libraries=libraries,
|
|
||||||
)
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=NAME,
|
name=NAME,
|
||||||
version=VER,
|
version=VER,
|
||||||
|
@ -84,8 +55,7 @@ setup(
|
||||||
author='Thomas S Hatch',
|
author='Thomas S Hatch',
|
||||||
author_email='thatch45@gmail.com',
|
author_email='thatch45@gmail.com',
|
||||||
url='http://saltstack.org',
|
url='http://saltstack.org',
|
||||||
ext_modules=[msgpack_mod],
|
cmdclass={'test': TestCommand},
|
||||||
cmdclass={'build_ext': build_ext, 'sdist': Sdist, 'test': TestCommand},
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Cython',
|
'Programming Language :: Cython',
|
||||||
|
@ -111,7 +81,6 @@ setup(
|
||||||
'salt.runners',
|
'salt.runners',
|
||||||
'salt.states',
|
'salt.states',
|
||||||
'salt.utils',
|
'salt.utils',
|
||||||
'salt.msgpack',
|
|
||||||
],
|
],
|
||||||
scripts=['scripts/salt-master',
|
scripts=['scripts/salt-master',
|
||||||
'scripts/salt-minion',
|
'scripts/salt-minion',
|
||||||
|
@ -138,10 +107,5 @@ setup(
|
||||||
('share/man/man7',
|
('share/man/man7',
|
||||||
['doc/man/salt.7',
|
['doc/man/salt.7',
|
||||||
]),
|
]),
|
||||||
(doc_path,
|
|
||||||
['LICENSE',
|
|
||||||
'AUTHORS',
|
|
||||||
'README.rst',
|
|
||||||
]),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue