Skip to content

Commit

Permalink
Adding install deps
Browse files Browse the repository at this point in the history
  • Loading branch information
luisulloa committed Dec 13, 2017
1 parent 4ca3f04 commit 70edb24
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import sys
import pip
from package_settings import NAME, VERSION, PACKAGES, DESCRIPTION
from setuptools import setup

# TODO is there a better way ? dependency_links seems to be deprecated and to require a version
if "--no-deps" in sys.argv:
sys.argv.remove("--no-deps")
print(f"Skipped dependencies of {NAME}", file=sys.stderr)
else:
command = pip.main(['install', '--upgrade', '--ignore-installed', '-r', 'requirements.txt'])
if command > 0:
print(f"Detected error while installing dependencies abandoning install of {NAME}", file=sys.stderr)
sys.exit(command)

setup(
name=NAME,
version=VERSION,
Expand Down

0 comments on commit 70edb24

Please sign in to comment.