From 093b1b7224056adc5d893f8c122906d49217c533 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 12 Dec 2020 21:58:04 +0800 Subject: [PATCH] artiq-fast: quamash -> qasync on artiq-6+ --- artiq-fast/conda/artiq-deps.nix | 16 ---------------- artiq-fast/conda/artiq.nix | 17 ++++++++++++++++- artiq-fast/default.nix | 7 +++++++ artiq-fast/pkgs/artiq.nix | 3 ++- artiq-fast/pkgs/python-deps.nix | 19 +++++++++++++++++++ artiq-fast/windows/run-test.nix | 1 + 6 files changed, 45 insertions(+), 18 deletions(-) delete mode 100644 artiq-fast/conda/artiq-deps.nix diff --git a/artiq-fast/conda/artiq-deps.nix b/artiq-fast/conda/artiq-deps.nix deleted file mode 100644 index 3b38e77..0000000 --- a/artiq-fast/conda/artiq-deps.nix +++ /dev/null @@ -1,16 +0,0 @@ -[ - "llvmlite-artiq" - "binutils-or1k-linux" - "pythonparser" - "scipy" - "numpy" - "prettytable" - "h5py" - "python-dateutil" - "pyqt" - "quamash" - "pyqtgraph" - "pygit2" - "python-levenshtein" - "sipyco" -] diff --git a/artiq-fast/conda/artiq.nix b/artiq-fast/conda/artiq.nix index 5f8c1db..ab21777 100644 --- a/artiq-fast/conda/artiq.nix +++ b/artiq-fast/conda/artiq.nix @@ -6,7 +6,22 @@ let name = "artiq"; inherit version; src = import ../pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; - dependencies = import ./artiq-deps.nix; + dependencies = [ + "llvmlite-artiq" + "binutils-or1k-linux" + "pythonparser" + "scipy" + "numpy" + "prettytable" + "h5py" + "python-dateutil" + "pyqt" + (if (pkgs.lib.strings.versionAtLeast version "6.0") then "qasync" else "quamash") + "pyqtgraph" + "pygit2" + "python-levenshtein" + "sipyco" + ]; extraYaml = '' about: diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index e11a097..69e2f72 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -66,6 +66,13 @@ let name = "quamash"; inherit (pkgs.python3Packages.quamash) version src; }; + }; + conda-qasync = import ./conda/build.nix { inherit pkgs; } { + name = "conda-qasync"; + src = import ./conda/fake-source.nix { inherit pkgs; } { + name = "qasync"; + inherit (pythonDeps.qasync) version src; + }; }; conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix { inherit pkgs; diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index 144bd6e..b4fd615 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -11,7 +11,8 @@ python3Packages.buildPythonPackage rec { propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ] ++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ]) ++ (with pythonDeps; [ sipyco pyqtgraph-qt5 pythonparser ]) - ++ (with python3Packages; [ pygit2 numpy dateutil quamash scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]); + ++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 ]) + ++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)]; dontWrapQtApps = true; postFixup = '' diff --git a/artiq-fast/pkgs/python-deps.nix b/artiq-fast/pkgs/python-deps.nix index 6654f13..9966ec0 100644 --- a/artiq-fast/pkgs/python-deps.nix +++ b/artiq-fast/pkgs/python-deps.nix @@ -53,6 +53,25 @@ rec { propagatedBuildInputs = with python3Packages; [ scipy numpy pyqt5 pyopengl ]; }; + qasync = python3Packages.buildPythonPackage rec { + pname = "qasync"; + version = "0.10.0"; + + src = fetchFromGitHub { + owner = "CabbageDevelopment"; + repo = "qasync"; + rev = "v${version}"; + sha256 = "1zga8s6dr7gk6awmxkh4pf25gbg8n6dv1j4b0by7y0fhi949qakq"; + }; + + propagatedBuildInputs = [ python3Packages.pyqt5 ]; + + checkInputs = [ python3Packages.pytest ]; + checkPhase = '' + pytest -k 'test_qthreadexec.py' # the others cause the test execution to be aborted, I think because of asyncio + ''; + }; + # Development/firmware dependencies artiq-netboot = python3Packages.buildPythonPackage rec { name = "artiq-netboot"; diff --git a/artiq-fast/windows/run-test.nix b/artiq-fast/windows/run-test.nix index 1c09ed9..f478516 100644 --- a/artiq-fast/windows/run-test.nix +++ b/artiq-fast/windows/run-test.nix @@ -33,6 +33,7 @@ let win-put ${artiqpkgs.conda-pythonparser}/noarch/*.tar.bz2 'fake-channel/noarch' win-put ${artiqpkgs.conda-sipyco}/noarch/*.tar.bz2 'fake-channel/noarch' win-put ${artiqpkgs.conda-quamash}/noarch/*.tar.bz2 'fake-channel/noarch' + win-put ${artiqpkgs.conda-qasync}/noarch/*.tar.bz2 'fake-channel/noarch' ''; }; in