From eb683a5d7753168523c9eb5b9166937f83327e62 Mon Sep 17 00:00:00 2001
From: Alexander Kiselyov <aleksandr.kiselyov@gmail.com>
Date: Fri, 20 Aug 2021 14:33:53 +0300
Subject: [PATCH] python3Packages.pot: minor fixes from PR review

---
 pkgs/development/python-modules/{POT => pot}/default.nix | 5 +++--
 pkgs/top-level/python-packages.nix                       | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
 rename pkgs/development/python-modules/{POT => pot}/default.nix (85%)

diff --git a/pkgs/development/python-modules/POT/default.nix b/pkgs/development/python-modules/pot/default.nix
similarity index 85%
rename from pkgs/development/python-modules/POT/default.nix
rename to pkgs/development/python-modules/pot/default.nix
index a72303f6b4cc..431c2e40487f 100644
--- a/pkgs/development/python-modules/POT/default.nix
+++ b/pkgs/development/python-modules/pot/default.nix
@@ -26,8 +26,7 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.cfg \
-      --replace "--cov-report= --cov=ot" \
-                ""
+      --replace "--cov-report= --cov=ot" ""
   '';
 
   nativeBuildInputs = [ numpy cython ];
@@ -36,6 +35,8 @@ buildPythonPackage rec {
     ++ lib.optionals enableDimensionalityReduction [ pymanopt autograd ];
   checkInputs = [ matplotlib scikit-learn pytestCheckHook ];
 
+  # To prevent importing of an incomplete package from the build directory
+  # instead of nix store (`ot` is the top-level package name).
   preCheck = ''
     rm -r ot
   '';
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d138ed3039cc..62f8b77232e6 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5571,7 +5571,7 @@ in {
 
   postorius = callPackage ../servers/mail/mailman/postorius.nix { };
 
-  POT = callPackage ../development/python-modules/POT { };
+  pot = callPackage ../development/python-modules/pot { };
 
   potr = callPackage ../development/python-modules/potr { };