Skip to content

Commit

Permalink
Add own srttobool function
Browse files Browse the repository at this point in the history
  • Loading branch information
vvilpas committed Mar 10, 2021
1 parent a601401 commit 33c6e88
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
Main setup file for qiskit-aer
"""
import distutils.util
import importlib
import inspect
import os
Expand All @@ -14,9 +13,18 @@
import platform


def strtobool(val):
val_lower = val.lower()
if val_lower in ('y', 'yes', 't', 'true', 'on', '1'): return True
elif val_lower in ('n', 'no', 'f', 'false', 'off', '0'): return False
else: raise ValueError('Value: "{}" not recognizes as True or False'.format(val))


PACKAGE_NAME = os.getenv('QISKIT_AER_PACKAGE_NAME', 'qiskit-aer')
_DISABLE_CONAN = distutils.util.strtobool(os.getenv("DISABLE_CONAN", "OFF").lower())
_DISABLE_DEPENDENCY_INSTALL = distutils.util.strtobool(os.getenv("DISABLE_DEPENDENCY_INSTALL", "OFF").lower())
_DISABLE_CONAN = strtobool(os.getenv("DISABLE_CONAN", "OFF").lower())
_DISABLE_DEPENDENCY_INSTALL = strtobool(os.getenv("DISABLE_DEPENDENCY_INSTALL", "OFF").lower())



def install_needed_req(to_import, to_install=None, min_version=None, max_version=None):
to_install = to_install if to_install else to_import
Expand Down

0 comments on commit 33c6e88

Please sign in to comment.