From 27491cdf25bc9effef10437f6a4d6b715ecea309 Mon Sep 17 00:00:00 2001 From: DavHau Date: Thu, 10 Jun 2021 00:07:19 +0700 Subject: [PATCH] revert default providers to 'wheel,sdist,nixpkgs' --- mach_nix/VERSION | 1 + mach_nix/nix/conda-channels.nix | 10 +++++++--- mach_nix/provider_defaults.toml | 2 +- tests/all-tests.nix | 7 ++++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/mach_nix/VERSION b/mach_nix/VERSION index e69de29..2b1cc87 100644 --- a/mach_nix/VERSION +++ b/mach_nix/VERSION @@ -0,0 +1 @@ +conda-beta \ No newline at end of file diff --git a/mach_nix/nix/conda-channels.nix b/mach_nix/nix/conda-channels.nix index 29f760a..4975f0d 100644 --- a/mach_nix/nix/conda-channels.nix +++ b/mach_nix/nix/conda-channels.nix @@ -75,6 +75,10 @@ let in if missingChannels != [] then throw "Conda channels [${toString missingChannels}] are unknown. Use 'condaChannelsExtra' to make them available" -else - trace "using conda channels: ${toString (concatStringsSep ", " (attrNames allCondaChannels))}" - { inherit condaChannelsJson; } +else let + channelNames = (attrNames allCondaChannels); in + if channelNames != [] then + trace "using conda channels: ${toString (concatStringsSep ", " (attrNames allCondaChannels))}" + { inherit condaChannelsJson; } + else + { inherit condaChannelsJson; } diff --git a/mach_nix/provider_defaults.toml b/mach_nix/provider_defaults.toml index dc8c6c9..c22e900 100644 --- a/mach_nix/provider_defaults.toml +++ b/mach_nix/provider_defaults.toml @@ -1,4 +1,4 @@ -_default = "conda,wheel,sdist,nixpkgs" +_default = "wheel,sdist,nixpkgs" gdal = "nixpkgs" pip = "nixpkgs,sdist" diff --git a/tests/all-tests.nix b/tests/all-tests.nix index 98a912a..58117a5 100644 --- a/tests/all-tests.nix +++ b/tests/all-tests.nix @@ -6,9 +6,14 @@ let import file ({ inherit mach-nix; } // (if conda then (rec { + baseArgsMkPython = { _provierDefaults = (fromTOML (readFile ./mach_nix/provider_defaults.toml) // { + _default = "conda,wheel,sdist,nixpkgs"; + }); }; + baseArgsBuildPythonPackage = baseArgsMkPython; + }) else { baseArgsMkPython = { _provierDefaults = fromTOML (readFile ./mach_nix/provider_defaults.toml); }; baseArgsBuildPythonPackage = baseArgsMkPython; - }) else {})); + })); in flatten (map (file: makeTests) [ ./test_alias_dateutil.nix