1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #137293 from fabaff/bump-Unidecode

This commit is contained in:
Sandro 2021-10-04 14:31:13 +02:00 committed by GitHub
commit d4129f74eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 12 deletions

View file

@ -35,7 +35,6 @@ let
(mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b")
(mkOverride "sarge" "0.1.5.post0" "1c1ll7pys9vra5cfi8jxlgrgaql6c27l6inpy15aprgqhc4ck36s")
(mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
(mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051")
# Requires flask<2, cannot mkOverride because tests need to be disabled
(
@ -65,7 +64,20 @@ let
}
)
# Requires unidecode>=0.04.14,<0.05. Upstream changed the source naming between releases
(
self: super: {
unidecode = super.unidecode.overridePythonAttrs (oldAttrs: rec {
version = "0.04.21";
src = fetchFromGitHub {
owner = "avian2";
repo = "unidecode";
rev = "release-${version}";
sha256 = "0p5bkibv0xm1265dlfrz3zq3k9bbx07gl8zyq8mvvb8hi7p5lifg";
};
});
}
)
# Requires websocket-client <1.0, >=0.57. Cannot do mkOverride b/c differing underscore/hyphen in pypi source name
(

View file

@ -1,22 +1,33 @@
{ lib, buildPythonPackage, fetchPypi, glibcLocales }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "Unidecode";
version = "1.2.0";
pname = "unidecode";
version = "1.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "8d73a97d387a956922344f6b74243c2c6771594659778744b2dbdaad8f6b727d";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "avian2";
repo = pname;
rev = "${pname}-${version}";
sha256 = "07789mrq0gjxrg1b9a3ypzzfww224sbj25wl0h9nik22sjwi8qhh";
};
LC_ALL="en_US.UTF-8";
checkInputs = [
pytestCheckHook
];
buildInputs = [ glibcLocales ];
pythonImportsCheck = [ "unidecode" ];
meta = with lib; {
homepage = "https://pypi.python.org/pypi/Unidecode/";
description = "ASCII transliterations of Unicode text";
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ domenkozar ];
};
}

View file

@ -20,7 +20,8 @@ python3.pkgs.buildPythonApplication rec {
substituteInPlace setup.cfg \
--replace "requests>=2.11.1,<2.25.0" "requests" \
--replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \
--replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0"
--replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" \
--replace "unidecode>=0.04.19,<1.3.0" "unidecode>=0.04.19"
'';
patches = [