diff options
author | Robert Scott <code@humanleg.org.uk> | 2021-11-22 23:24:50 +0000 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-11-22 23:05:47 -0800 |
commit | 712b402565e53a0e00113e9b617d4edd428d158c (patch) | |
tree | e8272b02a0527fd76ff58e7a9dc6dd898e9ee301 /pkgs/development/python-modules/cwcwidth | |
parent | 67c9d4ae0086730668661af469886dfc99f1392e (diff) |
python3Packages.cwcwidth: fix tests on darwin
use the same locale settings used by upstream's CI: https://github.com/sebastinas/cwcwidth/blob/2bc4360474b524148ffde3c8b837cbb0a4f172f5/.github/workflows/build.yaml#L33 this has the effect of skipping some otherwise-failing tests on darwin. seems slightly counterproductive but who am i to judge?
Diffstat (limited to 'pkgs/development/python-modules/cwcwidth')
-rw-r--r-- | pkgs/development/python-modules/cwcwidth/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/cwcwidth/default.nix b/pkgs/development/python-modules/cwcwidth/default.nix index 940d41129e57e..ede96fc3b41d7 100644 --- a/pkgs/development/python-modules/cwcwidth/default.nix +++ b/pkgs/development/python-modules/cwcwidth/default.nix @@ -13,12 +13,17 @@ buildPythonPackage rec { nativeBuildInputs = [ cython ]; checkInputs = [ pytestCheckHook ]; - # Hack needed to make pytest + cython work - # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298 preCheck = '' + # Hack needed to make pytest + cython work + # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298 export HOME=$(mktemp -d) cp -r $TMP/$sourceRoot/tests $HOME pushd $HOME + + # locale settings used by upstream, has the effect of skipping + # otherwise-failing tests on darwin + export LC_ALL='C.UTF-8' + export LANG='C.UTF-8' ''; postCheck = "popd"; |