python39Packages.arabic-reshaper: disable on older Python releases

- add license
- run tests
- update pname
This commit is contained in:
Fabian Affolter
2022-12-25 12:10:35 +01:00
committed by Frederik Rietdijk
parent 4dec038e12
commit 07b3154972
@@ -1,26 +1,48 @@
{ lib, buildPythonPackage, fetchPypi, future, configparser, isPy27 }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, fonttools
, future
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "arabic_reshaper";
pname = "arabic-reshaper";
version = "2.1.4";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-6Es7Ctjq45VkHJTTAQtTv+0sKxq4DyXrjNwBAZ3fZCY=";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mpcabd";
repo = "python-arabic-reshaper";
rev = "v${version}";
hash = "sha256-qQGIC/KequOQZoxwm7AEkdPV0QpS7YoBV9v8ZA7AYQM=";
};
propagatedBuildInputs = [ future ]
++ lib.optionals isPy27 [ configparser ];
propagatedBuildInputs = [
future
];
# Tests are not published on pypi
doCheck = false;
passthru.optional-dependencies = {
with-fonttools = [
fonttools
];
};
pythonImportsCheck = [ "arabic_reshaper" ];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"arabic_reshaper"
];
meta = with lib; {
homepage = "https://github.com/mpcabd/python-arabic-reshaper";
description = "Reconstruct Arabic sentences to be used in applications that don't support Arabic";
platforms = platforms.unix;
homepage = "https://github.com/mpcabd/python-arabic-reshaper";
license = with licenses; [ mit ];
maintainers = with maintainers; [ freezeboy ];
};
}