Skip to content

Commit

Permalink
Only do script_install_dir check if doing setup.py install #49
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Dec 15, 2016
1 parent 07c55da commit 77a4b73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import print_function
import sys,os,glob,re


try:
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
Expand Down Expand Up @@ -336,7 +335,9 @@ def run(self):
)

# Check that the path includes the directory where the scripts are installed.
if (dist.script_install_dir not in os.environ['PATH'].split(':') and
# NB. If not running install, then script_install_dir won't be there...
if (hasattr(dist,'script_install_dir') and
dist.script_install_dir not in os.environ['PATH'].split(':') and
os.path.realpath(dist.script_install_dir) not in os.environ['PATH'].split(':')):
print('\nWARNING: The Piff executables were installed in a directory not in your PATH')
print(' If you want to use the executables, you should add the directory')
Expand Down

0 comments on commit 77a4b73

Please sign in to comment.