From 7efb7b32f504c27a16d83e1814cd2761b216e772 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 08:25:43 +0100 Subject: [PATCH 01/11] python3Packages.pyfakefs: 4.3.2 -> 4.3.3 --- pkgs/development/python-modules/pyfakefs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index 64ec58487c45..49c35507c7fb 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder, python, pytest, glibcLocales }: buildPythonPackage rec { - version = "4.3.2"; + version = "4.3.3"; pname = "pyfakefs"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - sha256 = "dfeed4715e2056e3e56b9c5f51a679ce2934897eef926f3d14e5364e43f19070"; + sha256 = "sha256-/7KrJkoLg69Uii2wxQl5jiCDYd85YBuomK5lzs+1nLs="; }; postPatch = '' From 1983e27ac9aff5ec66a70a4a6e9f86f57574210e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 08:54:36 +0100 Subject: [PATCH 02/11] python3Packages.pyfakefs: switch to pytestCheckHook --- .../python-modules/pyfakefs/default.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index 49c35507c7fb..8fac00e871e1 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder, python, pytest, glibcLocales }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { version = "4.3.3"; @@ -25,20 +31,16 @@ buildPythonPackage rec { --replace "test_rename_dir_to_existing_dir" "notest_rename_dir_to_existing_dir" ''); - checkInputs = [ pytest glibcLocales ]; - - checkPhase = '' - export LC_ALL=en_US.UTF-8 - ${python.interpreter} -m pyfakefs.tests.all_tests - ${python.interpreter} -m pyfakefs.tests.all_tests_without_extra_packages - ${python.interpreter} -m pytest pyfakefs/pytest_tests/pytest_plugin_test.py - ''; + checkInputs = [ pytestCheckHook ]; + # https://github.com/jmcgeheeiv/pyfakefs/issues/581 (OSError: [Errno 9] Bad file descriptor) + disabledTests = [ "test_open_existing_pipe" ]; + pythonImportsCheck = [ "pyfakefs" ]; meta = with lib; { description = "Fake file system that mocks the Python file system modules"; - license = licenses.asl20; - homepage = "http://pyfakefs.org/"; - changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/master/CHANGES.md"; + homepage = "http://pyfakefs.org/"; + changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/master/CHANGES.md"; + license = licenses.asl20; maintainers = with maintainers; [ gebner ]; }; } From a98a01449045212ab3b822d1f158cb280985f63a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 17:51:10 +0100 Subject: [PATCH 03/11] python3Packages.qiskit-terra: 0.16.1 -> 0.16.4 --- pkgs/development/python-modules/qiskit-terra/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index 89d39b718cdf..ff51e82e351e 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -56,7 +56,7 @@ in buildPythonPackage rec { pname = "qiskit-terra"; - version = "0.16.1"; + version = "0.16.4"; disabled = pythonOlder "3.6"; @@ -64,7 +64,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = pname; rev = version; - sha256 = "0007glsbrvq9swamvz8r76z9nzh46b388y0ds1dypczxpwlp9xcq"; + sha256 = "sha256-/rWlPfpAHoMedKG42jfUYt0Ezq7i+9dkyPllavkg4cc="; }; nativeBuildInputs = [ cython ]; From ead3df8c338e0fd8725887046768579f2a9be617 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 17:53:00 +0100 Subject: [PATCH 04/11] python3Packages.qiskit-ignis: 0.5.1 -> 0.5.2 --- pkgs/development/python-modules/qiskit-ignis/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index b5295dbd0411..fd0747bd8ac8 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "qiskit-ignis"; - version = "0.5.1"; + version = "0.5.2"; disabled = pythonOlder "3.6"; @@ -33,11 +33,11 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-ignis"; rev = version; - sha256 = "17kplmi17axcbbgw35dzfr3d5bzfymxfni9sf6v14223c5674p4y"; + sha256 = "sha256-Kl3tnoamZrCxwoDdu8betG6Lf3CC3D8R2TYiq8Zl3Aw="; }; # hacky, fix https://github.com/Qiskit/qiskit-ignis/issues/532. - # TODO: remove on qiskit-ignis v0.5.1 + # TODO: remove on qiskit-ignis v0.5.2 postPatch = '' substituteInPlace qiskit/ignis/mitigation/expval/base_meas_mitigator.py --replace "plt.axes" "'plt.axes'" ''; From 8cdca673f8acee2963f88b8bde5923b9ff283a1e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 17:53:26 +0100 Subject: [PATCH 05/11] python3Packages.docplex: 2.19.202 -> 2.20.204 --- pkgs/development/python-modules/docplex/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/docplex/default.nix b/pkgs/development/python-modules/docplex/default.nix index 0fa202addb92..54af81d5d8b0 100644 --- a/pkgs/development/python-modules/docplex/default.nix +++ b/pkgs/development/python-modules/docplex/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "docplex"; - version = "2.19.202"; + version = "2.20.204"; # No source available from official repo src = fetchPypi { inherit pname version; - sha256 = "2b606dc645f99feae67dfc528620dddc773ecef5d59bcaeae68bba601f25162b"; + sha256 = "sha256-JNjD9UtLHsMGwTuXydZ+L5+pPQ2eobkr26Yt9pgs1qA="; }; propagatedBuildInputs = [ From 88666eca654b01a05208189c0c406925b771e6e5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 18:00:45 +0100 Subject: [PATCH 06/11] python3Packages.qiskit-aqua: 0.8.1 -> 0.8.2 --- .../python-modules/qiskit-aqua/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-aqua/default.nix b/pkgs/development/python-modules/qiskit-aqua/default.nix index 11274c525f09..0e6e8e25b538 100644 --- a/pkgs/development/python-modules/qiskit-aqua/default.nix +++ b/pkgs/development/python-modules/qiskit-aqua/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { pname = "qiskit-aqua"; - version = "0.8.1"; + version = "0.8.2"; disabled = pythonOlder "3.6"; @@ -43,7 +43,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-aqua"; rev = version; - sha256 = "11qyya3vyq50wpzrzzl8v46yx5p72rhpqhybwn47qgazxgg82r1b"; + sha256 = "sha256-ybf8bXqsVk6quYi0vrfo/Mplk7Nr7tQS7cevXxI9khw="; }; # Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed. @@ -73,13 +73,8 @@ buildPythonPackage rec { # It can also be installed at runtime from the pip wheel. # We disable appropriate tests below to allow building without pyscf installed - # NOTE: we remove cplex b/c we can't build pythonPackages.cplex. - # cplex is only distributed in manylinux1 wheel (no source), and Nix python is not manylinux1 compatible - postPatch = '' - substituteInPlace setup.py \ - --replace "pyscf; sys_platform != 'win32'" "" \ - --replace "cplex; python_version >= '3.6' and python_version < '3.8'" "" + substituteInPlace setup.py --replace "docplex==2.15.194" "docplex" # Add ImportWarning when running qiskit.chemistry (pyscf is a chemistry package) that pyscf is not included echo -e "\nimport warnings\ntry: import pyscf;\nexcept ImportError:\n " \ From aebae2ab90e5e29dea5472d8efa7bf6fe352dab5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 18:01:21 +0100 Subject: [PATCH 07/11] python3Packages.qiskit-aer: 0.7.1 -> 0.7.4 --- .../python-modules/qiskit-aer/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-aer/default.nix b/pkgs/development/python-modules/qiskit-aer/default.nix index e5eb877b6b2b..c182e8982bb2 100644 --- a/pkgs/development/python-modules/qiskit-aer/default.nix +++ b/pkgs/development/python-modules/qiskit-aer/default.nix @@ -7,6 +7,7 @@ , blas , catch2 , cmake +, conan , cython , fmt , muparserx @@ -28,7 +29,7 @@ buildPythonPackage rec { pname = "qiskit-aer"; - version = "0.7.1"; + version = "0.7.4"; disabled = pythonOlder "3.6"; @@ -36,7 +37,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-aer"; rev = version; - sha256 = "07l0wavdknx0y4vy0hwgw24365sg4nb6ygl3lpa098np85qgyn4y"; + sha256 = "sha256-o6c1ZcGFZ3pwinzMTif1nqF29Wq0Nog1++ZoJGuiKxo="; }; nativeBuildInputs = [ @@ -61,10 +62,13 @@ buildPythonPackage rec { pybind11 ]; - patches = [ - # TODO: remove in favor of qiskit-aer PR #877 patch once accepted/stable - ./remove-conan-install.patch - ]; + postPatch = '' + substituteInPlace setup.py --replace "'cmake!=3.17,!=3.17.0'," "" + ''; + + preBuild = '' + export DISABLE_CONAN=1 + ''; dontUseCmakeConfigure = true; From 8315b1668a202e9080a9adf83c51129d97a231e2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 18:01:53 +0100 Subject: [PATCH 08/11] python3Packages.qiskit-aer: remove patch --- .../qiskit-aer/remove-conan-install.patch | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch diff --git a/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch b/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch deleted file mode 100644 index 1c5ae87b082f..000000000000 --- a/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index efeacfc..77bd6bd 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -121,7 +121,11 @@ endif() - # Looking for external libraries - # - --setup_conan() -+find_package(muparserx REQUIRED) -+find_package(nlohmann_json REQUIRED) -+find_package(spdlog REQUIRED) -+# for tests only -+find_package(catch2) - - # If we do not set them with a space CMake fails afterwards if nothing is set for this vars! - set(AER_LINKER_FLAGS " ") -@@ -269,16 +273,16 @@ endif() - set(AER_LIBRARIES - ${AER_LIBRARIES} - ${BLAS_LIBRARIES} -- CONAN_PKG::nlohmann_json -+ nlohmann_json - Threads::Threads -- CONAN_PKG::spdlog -+ spdlog - ${DL_LIB} - ${THRUST_DEPENDANT_LIBS}) - - set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} ${CONAN_DEFINES}) - # Cython build is only enabled if building through scikit-build. - if(SKBUILD) # Terra Addon build -- set(AER_LIBRARIES ${AER_LIBRARIES} CONAN_PKG::muparserx) -+ set(AER_LIBRARIES ${AER_LIBRARIES} muparserx) - add_subdirectory(qiskit/providers/aer/pulse/qutip_extra_lite/cy) - add_subdirectory(qiskit/providers/aer/backends/wrappers) - add_subdirectory(src/open_pulse) -diff --git a/setup.py b/setup.py -index fd71e9f..1561cc4 100644 ---- a/setup.py -+++ b/setup.py -@@ -11,12 +11,6 @@ import inspect - - PACKAGE_NAME = os.getenv('QISKIT_AER_PACKAGE_NAME', 'qiskit-aer') - --try: -- from conans import client --except ImportError: -- subprocess.call([sys.executable, '-m', 'pip', 'install', 'conan']) -- from conans import client -- - try: - from skbuild import setup - except ImportError: -@@ -46,8 +40,6 @@ common_requirements = [ - - setup_requirements = common_requirements + [ - 'scikit-build', -- 'cmake!=3.17,!=3.17.0', -- 'conan>=1.22.2' - ] - - requirements = common_requirements + ['qiskit-terra>=0.12.0'] From ae088f4fdadb00107ab71f3e5b145314d6dcab39 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 18:02:38 +0100 Subject: [PATCH 09/11] python3Packages.qiskit: 0.23.1 -> 0.23.5 --- pkgs/development/python-modules/qiskit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qiskit/default.nix b/pkgs/development/python-modules/qiskit/default.nix index 7c79d517ce5d..3c7a00442020 100644 --- a/pkgs/development/python-modules/qiskit/default.nix +++ b/pkgs/development/python-modules/qiskit/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "qiskit"; # NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history - version = "0.23.1"; + version = "0.23.5"; disabled = pythonOlder "3.6"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "qiskit"; repo = "qiskit"; rev = version; - sha256 = "0x4cqx1wqqj7h5g3vdag694qjzsmvhpw25yrlcs70mh5ywdp28x1"; + sha256 = "sha256-qtMFztAeqNz0FSgQnOOrvAdPcbUCAal7KrVmpNvvBiY="; }; propagatedBuildInputs = [ From 37b8fe30f2672b08e433c903b2c67e0afd6be742 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 19:10:25 +0100 Subject: [PATCH 10/11] python3Packages.intelhex: 2.2.1 -> 2.3.0 --- .../python-modules/intelhex/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/intelhex/default.nix b/pkgs/development/python-modules/intelhex/default.nix index 0634e9190242..e5b0cc6fbc74 100644 --- a/pkgs/development/python-modules/intelhex/default.nix +++ b/pkgs/development/python-modules/intelhex/default.nix @@ -1,25 +1,23 @@ { lib , buildPythonPackage , fetchPypi -, fetchpatch +, pytestCheckHook }: buildPythonPackage rec { pname = "intelhex"; - version = "2.2.1"; + version = "2.3.0"; src = fetchPypi { inherit pname version; - sha256 = "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"; + sha256 = "sha256-iStzYacZ9JRSN9qMz3VOlRPbMvViiFJ4WuoQjc0lAJM="; }; - patches = [ - # patch the tests to check for the correct version string (2.2.1) - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/bialix/intelhex/pull/26.patch"; - sha256 = "1f3f2cyf9ipb9zdifmjs8rqhg028dhy91vabxxn3l7br657s8r2l"; - }) - ]; + checkInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ "intelhex/test.py" ]; + + pythonImportsCheck = [ "intelhex" ]; meta = { homepage = "https://github.com/bialix/intelhex"; From 746c3368eeef4a1786945b996a4a6d39f94626ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 19:10:48 +0100 Subject: [PATCH 11/11] python3Packages.solo-python: 0.0.26 -> 0.0.27 --- .../python-modules/solo-python/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/solo-python/default.nix b/pkgs/development/python-modules/solo-python/default.nix index 0ce6e338e61f..72546642009f 100644 --- a/pkgs/development/python-modules/solo-python/default.nix +++ b/pkgs/development/python-modules/solo-python/default.nix @@ -1,9 +1,20 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder -, click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, click +, cryptography +, ecdsa +, fido2 +, intelhex +, pyserial +, pyusb +, requests +}: buildPythonPackage rec { pname = "solo-python"; - version = "0.0.26"; + version = "0.0.27"; format = "flit"; disabled = pythonOlder "3.6"; # only python>=3.6 is supported @@ -11,7 +22,7 @@ owner = "solokeys"; repo = pname; rev = version; - sha256 = "05rwqrhr1as6zqhg63d6wga7l42jm2azbav5w6ih8mx5zbxf61yz"; + sha256 = "sha256-OCiKa6mnqJGoNCC4KqI+hMw22tzhdN63x9/KujNJqcE="; }; # replaced pinned fido, with unrestricted fido version @@ -21,6 +32,7 @@ propagatedBuildInputs = [ click + cryptography ecdsa fido2 intelhex