mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Added path checking to setup.py
This commit is contained in:
parent
6e7afc0d0e
commit
3791d3ba0a
1 changed files with 8 additions and 2 deletions
10
setup.py
10
setup.py
|
@ -25,7 +25,13 @@ if 'USE_SETUPTOOLS' in os.environ:
|
|||
if with_setuptools is False:
|
||||
from distutils.core import setup
|
||||
|
||||
exec(compile(open("salt/version.py").read(), "salt/version.py", 'exec'))
|
||||
salt_version = os.path.join(os.path.abspath(
|
||||
os.path.dirname(__file__)), 'salt', 'version.py')
|
||||
|
||||
salt_reqs = os.path.join(os.path.abspath(
|
||||
os.path.dirname(__file__)), 'requirements.txt')
|
||||
|
||||
exec(compile(open(salt_version).read(), salt_version, 'exec'))
|
||||
|
||||
|
||||
class TestCommand(Command):
|
||||
|
@ -70,7 +76,7 @@ else:
|
|||
libraries = ['ws2_32'] if sys.platform == 'win32' else []
|
||||
|
||||
requirements = ''
|
||||
with open('requirements.txt') as f:
|
||||
with open(salt_reqs) as f:
|
||||
requirements = f.read()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue