Merge pull request #58031 from dotlambda/elasticsearch-curator-application

elasticsearch-curator: add top-level package using older click
This commit is contained in:
Sarah Brofeldt
2019-03-22 20:11:54 +01:00
committed by GitHub
6 changed files with 23 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:
{ lib, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:
buildPythonPackage rec {
pname = "click";
@@ -10,10 +10,10 @@ buildPythonPackage rec {
sha256 = "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7";
};
patches = stdenv.lib.optional (stdenv.lib.versionAtLeast version "6.7") (substituteAll {
src = ./fix-paths.patch;
locale = "${locale}/bin/locale";
});
postPatch = ''
substituteInPlace click/_unicodefun.py \
--replace "'locale'" "'${locale}/bin/locale'"
'';
buildInputs = [ pytest ];
@@ -24,7 +24,7 @@ buildPythonPackage rec {
# https://github.com/pallets/click/issues/823
doCheck = false;
meta = with stdenv.lib; {
meta = with lib; {
homepage = http://click.pocoo.org/;
description = "Create beautiful command line interfaces in Python";
longDescription = ''

View File

@@ -1,13 +0,0 @@
diff --git a/click/_unicodefun.py b/click/_unicodefun.py
index 620edff..85a3c98 100644
--- a/click/_unicodefun.py
+++ b/click/_unicodefun.py
@@ -63,7 +63,7 @@ def _verify_python3_env():
if os.name == 'posix':
import subprocess
try:
- rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
+ rv = subprocess.Popen(['@locale@', '-a'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()[0]
except OSError:
rv = b''

View File

@@ -45,13 +45,6 @@ buildPythonPackage rec {
funcsigs
];
postPatch = ''
substituteInPlace setup.cfg \
--replace 'click>=6.7,<7.0' 'click'
substituteInPlace setup.py \
--replace 'click>=6.7,<7.0' 'click'
'';
meta = with stdenv.lib; {
homepage = https://github.com/elastic/curator;
description = "Curate, or manage, your Elasticsearch indices and snapshots";
@@ -69,5 +62,8 @@ buildPythonPackage rec {
* Perform various actions on the items which remain in the actionable list.
'';
maintainers = with maintainers; [ basvandijk ];
# https://github.com/elastic/curator/pull/1280
broken = versionAtLeast click.version "7.0";
};
}