python3Packages.qiskit-ibmq-provider: disable optional packages by default

Disables visualization packages in the user environment by default.
Allows running leaner/faster import environments by default.
Packages can still be added with override or manually adding to environment.
This commit is contained in:
Drew Risinger 2020-10-08 01:14:51 -04:00 committed by Jonathan Ringer
parent 4a57cce048
commit 53bfcf5058

View file

@ -9,21 +9,33 @@
, requests_ntlm , requests_ntlm
, websockets , websockets
# Visualization inputs # Visualization inputs
, ipykernel , withVisualization ? false
, ipython
, ipyvuetify , ipyvuetify
, ipywidgets , ipywidgets
, matplotlib , matplotlib
, nbconvert
, nbformat
, plotly , plotly
, pyperclip , pyperclip
, seaborn , seaborn
# check inputs # check inputs
, pytestCheckHook , pytestCheckHook
, nbconvert
, nbformat
, pproxy , pproxy
, vcrpy , vcrpy
}: }:
let
visualizationPackages = [
ipython
ipyvuetify
ipywidgets
matplotlib
plotly
pyperclip
seaborn
];
in
buildPythonPackage rec { buildPythonPackage rec {
pname = "qiskit-ibmq-provider"; pname = "qiskit-ibmq-provider";
version = "0.11.1"; version = "0.11.1";
@ -44,24 +56,16 @@ buildPythonPackage rec {
requests requests
requests_ntlm requests_ntlm
websockets websockets
# Visualization/Jupyter inputs ] ++ lib.optionals withVisualization visualizationPackages;
ipykernel
ipyvuetify
ipywidgets
matplotlib
nbconvert
nbformat
plotly
pyperclip
seaborn
];
# Most tests require credentials to run on IBMQ # Most tests require credentials to run on IBMQ
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
nbconvert
nbformat
pproxy pproxy
vcrpy vcrpy
]; ] ++ lib.optionals (!withVisualization) visualizationPackages;
pythonImportsCheck = [ "qiskit.providers.ibmq" ]; pythonImportsCheck = [ "qiskit.providers.ibmq" ];
# These disabled tests require internet connection, aren't skipped elsewhere # These disabled tests require internet connection, aren't skipped elsewhere