python3Packages.qiskit-aer: 0.8.0 -> 0.8.2

Use a patch submitted via PR instead of custom substitute.

Remove pybind11 install requirement, as requested by @dotlambda
This commit is contained in:
Drew Risinger 2021-05-19 18:13:40 -04:00
parent bf1bad9263
commit 2d90781e4d

View File

@ -2,6 +2,7 @@
, pythonOlder , pythonOlder
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
# C Inputs # C Inputs
, blas , blas
, catch2 , catch2
@ -27,7 +28,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "qiskit-aer"; pname = "qiskit-aer";
version = "0.8.0"; version = "0.8.2";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
@ -36,13 +37,30 @@ buildPythonPackage rec {
owner = "Qiskit"; owner = "Qiskit";
repo = "qiskit-aer"; repo = "qiskit-aer";
rev = version; rev = version;
hash = "sha256-CWF3ehLs0HBXnYH11r+2CQwIcxddAfQm3ulAf1agl/o="; hash = "sha256-7NWM7qpMQ3vA6p0dhEPnkBjsPMdhceYTYcAD4tsClf0=";
}; };
patches = [
(fetchpatch {
# https://github.com/Qiskit/qiskit-aer/pull/1250
name = "qiskit-aer-pr-1250-native-cmake_dl_libs.patch";
url = "https://github.com/Qiskit/qiskit-aer/commit/2bf04ade3e5411776817706cf82cc67a3b3866f6.patch";
sha256 = "0ldwzxxfgaad7ifpci03zfdaj0kqj0p3h94qgshrd2953mf27p6z";
})
];
# Remove need for cmake python package
# pybind11 shouldn't be an install requirement, just build requirement.
postPatch = ''
substituteInPlace setup.py \
--replace "'cmake!=3.17,!=3.17.0'," "" \
--replace "'pybind11>=2.6'" ""
'';
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
ninja ninja
scikit-build scikit-build
pybind11
]; ];
buildInputs = [ buildInputs = [
@ -58,14 +76,8 @@ buildPythonPackage rec {
cvxpy cvxpy
cython # generates some cython files at runtime that need to be cython-ized cython # generates some cython files at runtime that need to be cython-ized
numpy numpy
pybind11
]; ];
# tries to install pypi cmake package, not needed
postPatch = ''
substituteInPlace setup.py --replace "'cmake!=3.17,!=3.17.0'," ""
'';
# Disable using conan for build # Disable using conan for build
preBuild = '' preBuild = ''
export DISABLE_CONAN=1 export DISABLE_CONAN=1