Skip to content

Commit

Permalink
fix(setup tool): pip moved main to _internal
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Nov 20, 2019
1 parent 095cfb1 commit 545584b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions setup.py
Expand Up @@ -23,6 +23,7 @@ def open_file(file_name, splitlines=False):

return file_output


# Get vars from project files.
version = open_file('VERSION')
long_description = open_file('README.rst')
Expand Down Expand Up @@ -92,12 +93,14 @@ def finalize_options(self):
pass

def run(self):
import pip

# Install requirements via pip.
pip.main(['install', '.'])
cmd = ['pip', 'install', '-r', 'requirements.txt']

if self.tests_requirement:
pip.main(['install', '.[tests]'])
cmd += ['-r', 'tests/requirements.txt']

print(' '.join(cmd))
subprocess.check_call(cmd)

setup(
name='ansible-netbox-inventory',
Expand Down

0 comments on commit 545584b

Please sign in to comment.