Merge pull request #41843 from flokli/python-click-path
python3Packages.click: fix 'locale' path
This commit is contained in:
commit
64cdcb57de
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
|
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, glibc, pytest }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "click";
|
pname = "click";
|
||||||
|
@ -9,6 +9,12 @@ buildPythonPackage rec {
|
||||||
sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi";
|
sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = stdenv.lib.optionals (stdenv.isLinux && !stdenv.hostPlatform.isMusl)
|
||||||
|
(substituteAll {
|
||||||
|
src = ./fix-paths.patch;
|
||||||
|
locale = "${glibc.bin}/bin/locale";
|
||||||
|
});
|
||||||
|
|
||||||
buildInputs = [ pytest ];
|
buildInputs = [ pytest ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/click/_unicodefun.py 2018-06-11 15:08:59.369358278 +0200
|
||||||
|
+++ b/click/_unicodefun.py 2018-06-11 15:09:09.342325998 +0200
|
||||||
|
@@ -60,7 +60,7 @@
|
||||||
|
extra = ''
|
||||||
|
if os.name == 'posix':
|
||||||
|
import subprocess
|
||||||
|
- rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
|
||||||
|
+ rv = subprocess.Popen(['@locale@', '-a'], stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE).communicate()[0]
|
||||||
|
good_locales = set()
|
||||||
|
has_c_utf8 = False
|
Loading…
Reference in New Issue