mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Override the develop command when WITH_SETUPTOOLS is set
This commit is contained in:
parent
4d6841c761
commit
a5aa752a85
1 changed files with 15 additions and 2 deletions
17
setup.py
17
setup.py
|
@ -71,6 +71,7 @@ WITH_SETUPTOOLS = False
|
||||||
if 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules:
|
if 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules:
|
||||||
try:
|
try:
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
from setuptools.command.develop import develop
|
||||||
from setuptools.command.install import install
|
from setuptools.command.install import install
|
||||||
from setuptools.command.sdist import sdist
|
from setuptools.command.sdist import sdist
|
||||||
from setuptools.command.egg_info import egg_info
|
from setuptools.command.egg_info import egg_info
|
||||||
|
@ -190,6 +191,17 @@ class WriteSaltSshPackagingFile(Command):
|
||||||
# pylint: enable=E0602
|
# pylint: enable=E0602
|
||||||
|
|
||||||
|
|
||||||
|
if WITH_SETUPTOOLS:
|
||||||
|
class Develop(develop):
|
||||||
|
def run(self):
|
||||||
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
# Install M2Crypto first
|
||||||
|
self.distribution.salt_installing_m2crypto_windows = True
|
||||||
|
self.run_command('install-m2crypto-windows')
|
||||||
|
self.distribution.salt_installing_m2crypto_windows = None
|
||||||
|
develop.run(self)
|
||||||
|
|
||||||
|
|
||||||
class InstallM2CryptoWindows(Command):
|
class InstallM2CryptoWindows(Command):
|
||||||
|
|
||||||
description = 'Install M2CryptoWindows'
|
description = 'Install M2CryptoWindows'
|
||||||
|
@ -649,8 +661,9 @@ class SaltDistribution(distutils.dist.Distribution):
|
||||||
'write-salt-ssh-packaging-file': WriteSaltSshPackaingFile})
|
'write-salt-ssh-packaging-file': WriteSaltSshPackaingFile})
|
||||||
if not IS_WINDOWS_PLATFORM:
|
if not IS_WINDOWS_PLATFORM:
|
||||||
self.cmdclass.update({'sdist': CloudSdist,
|
self.cmdclass.update({'sdist': CloudSdist,
|
||||||
'install_lib': InstallLib
|
'install_lib': InstallLib})
|
||||||
'install-m2crypto-windows': InstallM2CryptoWindows})
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
self.cmdclass.update({'install-m2crypto-windows': InstallM2CryptoWindows})
|
||||||
|
|
||||||
self.license = 'Apache Software License 2.0'
|
self.license = 'Apache Software License 2.0'
|
||||||
self.packages = self.discover_packages()
|
self.packages = self.discover_packages()
|
||||||
|
|
Loading…
Add table
Reference in a new issue