mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add requirements.txt to sdist and allow setup.py to use setuptools if detected in environment
This commit is contained in:
parent
2ef9c58e97
commit
eae7bea4f6
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
include AUTHORS
|
include AUTHORS
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include README.rst
|
include README.rst
|
||||||
|
include requirements.txt
|
8
setup.py
8
setup.py
|
@ -11,6 +11,9 @@ from distutils.command.sdist import sdist
|
||||||
from distutils.cmd import Command
|
from distutils.cmd import Command
|
||||||
from distutils.sysconfig import get_python_lib, PREFIX
|
from distutils.sysconfig import get_python_lib, PREFIX
|
||||||
|
|
||||||
|
if os.environ.get('VIRTUAL_ENV'):
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
execfile('salt/version.py')
|
execfile('salt/version.py')
|
||||||
|
|
||||||
class TestCommand(Command):
|
class TestCommand(Command):
|
||||||
|
@ -48,6 +51,10 @@ else:
|
||||||
|
|
||||||
libraries = ['ws2_32'] if sys.platform == 'win32' else []
|
libraries = ['ws2_32'] if sys.platform == 'win32' else []
|
||||||
|
|
||||||
|
requirements=''
|
||||||
|
with open('requirements.txt') as f:
|
||||||
|
requirements = f.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=NAME,
|
name=NAME,
|
||||||
version=VER,
|
version=VER,
|
||||||
|
@ -108,4 +115,5 @@ setup(
|
||||||
['doc/man/salt.7',
|
['doc/man/salt.7',
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
|
install_requires=requirements,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue