Merge pull request #287864 from itslychee/package/python/jishaku

This commit is contained in:
Sandro 2024-02-23 00:12:48 +01:00 committed by GitHub
commit c2457867f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,45 @@
{ lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pytestCheckHook,
astunparse,
setuptools
}:
buildPythonPackage rec {
pname = "import-expression";
version = "1.1.4";
pyproject = true;
src = fetchFromGitHub {
owner = "ioistired";
repo = "import-expression-parser";
rev = "refs/tags/v${version}";
hash = "sha256-mll2NePB7fthzltLOk6D9BgaDpH6GaW4psqcGun/0qM=";
};
patches = [
(fetchpatch {
url = "https://github.com/ioistired/import-expression-parser/commit/3daf968c3163b64685aa529740e132f0df5ab262.patch";
hash = "sha256-2Ubv3onor2D26udZbDDMb3iNLopEIRnIcO/X6WUVmJU=";
})
];
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ astunparse ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests.py" ];
pythonImportsCheck = [
"import_expression"
"import_expression._codec"
];
meta = {
description = "Transpiles a superset of python to allow easy inline imports";
homepage = "https://github.com/ioistired/import-expression-parser";
license = with lib.licenses; [ mit psfl ];
mainProgram = "import-expression";
maintainers = with lib.maintainers; [ lychee ];
};
}

View File

@ -0,0 +1,66 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
setuptools,
discordpy,
click,
braceexpand,
import-expression,
tabulate,
pytestCheckHook,
pytest-asyncio,
youtube-dl
}:
buildPythonPackage rec {
pname = "jishaku";
version = "2.5.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Gorialis";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-BWnuk6h80cKwRECyTuRvnYnTC78219oraeTNoqWDd1c=";
};
patches = [
(fetchpatch {
# add entrypoint for install script
url = "https://github.com/Gorialis/jishaku/commit/b96cd55a1c2fd154c548f08019ccd6f7be9c7f90.patch";
hash = "sha256-laPoupwCC1Zthib8G+c1BXqTwZK0Z6up1DKVkhFicJ0=";
})
];
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
discordpy
click
braceexpand
tabulate
import-expression
];
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
youtube-dl
];
pythonImportsCheck = [
"jishaku"
"jishaku.repl"
"jishaku.features"
];
meta = {
description = "A debugging and testing cog for discord.py bots";
homepage = "https://jishaku.readthedocs.io/en/latest";
changelog = "https://github.com/Gorialis/jishaku/releases/tag/${version}";
maintainers = with lib.maintainers; [ lychee ];
mainProgram = "jishaku";
license = lib.licenses.mit;
};
}

View File

@ -5558,6 +5558,8 @@ self: super: with self; {
impacket = callPackage ../development/python-modules/impacket { };
import-expression = callPackage ../development/python-modules/import-expression { };
importlab = callPackage ../development/python-modules/importlab { };
importlib-metadata = callPackage ../development/python-modules/importlib-metadata { };
@ -5891,6 +5893,8 @@ self: super: with self; {
jira = callPackage ../development/python-modules/jira { };
jishaku = callPackage ../development/python-modules/jishaku { };
jiwer = callPackage ../development/python-modules/jiwer { };
jmespath = callPackage ../development/python-modules/jmespath { };