mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add bdist_esky command to setup.py
* Add bdist_esky command through import from esky * Add list of explicit includes with platform detection * Update salt build to be zip unsafe
This commit is contained in:
parent
94829774d8
commit
98d8ed8723
1 changed files with 42 additions and 0 deletions
42
setup.py
42
setup.py
|
@ -128,8 +128,50 @@ setup_kwargs = {'name': NAME,
|
|||
('share/man/man7', ['doc/man/salt.7']),
|
||||
],
|
||||
'install_requires': requirements,
|
||||
# The dynamic module loading in salt.modules makes this
|
||||
# package zip unsafe.
|
||||
'zip_safe': False
|
||||
}
|
||||
|
||||
|
||||
# bbfreeze explicit includes
|
||||
# Sometimes the auto module traversal doesn't find everything, so we
|
||||
# explicitly add it. The auto dependency tracking especially does not work for
|
||||
# imports occurring in salt.modules, as they are loaded at salt runtime.
|
||||
# Specifying includes that don't exist doesn't appear to cause a freezing
|
||||
# error.
|
||||
freezer_includes = [
|
||||
'zmq.core.*',
|
||||
'zmq.utils.*',
|
||||
'ast',
|
||||
]
|
||||
|
||||
if sys.platform == 'win32':
|
||||
freezer_includes.extend([
|
||||
'win32con',
|
||||
'win32security',
|
||||
'ntsecuritycon'
|
||||
])
|
||||
elif sys.platform.startswith('linux'):
|
||||
freezer_includes.extend([
|
||||
'yum'
|
||||
])
|
||||
|
||||
if 'bdist_esky' in sys.argv:
|
||||
# Add the esky bdist target if the module is available
|
||||
# may require additional modules depending on platform
|
||||
from esky import bdist_esky
|
||||
# bbfreeze chosen for its tight integration with distutils
|
||||
import bbfreeze
|
||||
options = setup_kwargs.get('options', {})
|
||||
options['bdist_esky'] = {
|
||||
"freezer_module": "bbfreeze",
|
||||
"freezer_options": {
|
||||
"includes": freezer_includes
|
||||
}
|
||||
}
|
||||
setup_kwargs['options'] = options
|
||||
|
||||
if with_setuptools:
|
||||
setup_kwargs['entry_points'] = {
|
||||
"console_scripts": ["salt-master = salt.scripts:salt_master",
|
||||
|
|
Loading…
Add table
Reference in a new issue