Skip to content

Commit

Permalink
Remove numpy import in setup.py
Browse files Browse the repository at this point in the history
Because `pip` is now the reccomended way to install packages in *all*
python versions, using `python setup.py install` is no longer expected
or support. Therefore, we no longer need to try and import numpy, and pip
install it upon failure, to prevent a direct build from souce that is
prone to failure.
  • Loading branch information
Joseph H Kennedy committed Jun 27, 2018
1 parent d2a6901 commit 98dee78
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
with open(os.path.join(here, 'livvkit', '__init__.py')) as f:
init_file = f.read()

# NOTE: Numpy really wants to build from source unless it's already installed,
# which is slow and prone to failure This significantly make the build more
# robust and much faster.
try:
import numpy
except ImportError:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'numpy'])
numpy = importlib.import_module('numpy')
print('Installed numpy v{} via pip.'.format(numpy.__version__))

setup(
name='livvkit',
version=re.search(r'{}\s*=\s*[(]([^)]*)[)]'.format('__version_info__'),
Expand All @@ -64,7 +54,7 @@
long_description=long_desc,
long_description_content_type='text/markdown',

url='http://github.com/LIVVkit/LIVVkit',
url='https://github.com/LIVVkit/LIVVkit',

author='Joseph H. Kennedy et al.',
author_email='kennedyjh@ornl.gov',
Expand Down

0 comments on commit 98dee78

Please sign in to comment.