depot/third_party/nixpkgs/pkgs/development/python-modules/qiskit-optimization/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

71 lines
1.3 KiB
Nix

{
lib,
pythonOlder,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# Python Inputs
decorator,
docplex,
networkx,
numpy,
qiskit-terra,
scipy,
# Check Inputs
pytestCheckHook,
ddt,
pylatexenc,
qiskit-aer,
}:
buildPythonPackage rec {
pname = "qiskit-optimization";
version = "0.6.1";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "qiskit";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-kzEuICajlV8mgD0YLhwFJaDQVxYZo9jv3sr/r/P0VG0=";
};
postPatch = ''
substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx"
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
docplex
decorator
networkx
numpy
qiskit-terra
scipy
];
nativeCheckInputs = [
pytestCheckHook
ddt
pylatexenc
qiskit-aer
];
pythonImportsCheck = [ "qiskit_optimization" ];
pytestFlagsArray = [ "--durations=10" ];
meta = with lib; {
description = "Software for developing quantum computing programs";
homepage = "https://qiskit.org";
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
changelog = "https://qiskit.org/documentation/release_notes.html";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
};
}