Merge pull request #327887 from moduon/whool

python3Packages.whool: init at 1.0.1
This commit is contained in:
OTABI Tomoya
2024-07-27 18:37:13 +09:00
committed by GitHub
3 changed files with 67 additions and 0 deletions
@@ -0,0 +1,49 @@
{
buildPythonPackage,
fetchFromGitHub,
git,
hatch-vcs,
lib,
manifestoo-core,
pytestCheckHook,
pythonOlder,
tomli,
wheel,
}:
buildPythonPackage rec {
pname = "whool";
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "sbidoul";
repo = "whool";
rev = "refs/tags/v${version}";
hash = "sha256-skJoMDIgZgRjfp4tsc6TKYVe09XBvg8Fk2BQfqneCYI=";
};
build-system = [ hatch-vcs ];
dependencies = [
manifestoo-core
wheel
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
pythonImportsCheck = [ "whool" ];
nativeCheckInputs = [
pytestCheckHook
git
];
setupHook = ./setup-hook.sh;
meta = {
description = "Standards-compliant Python build backend to package Odoo addons";
homepage = "https://github.com/sbidoul/whool";
changelog = "https://github.com/sbidoul/whool/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.yajo ];
};
}
@@ -0,0 +1,16 @@
# Avoid using git to auto-bump the addon version
# DOCS https://github.com/sbidoul/whool/?tab=readme-ov-file#configuration
whool-post-version-strategy-hook() {
# DOCS https://stackoverflow.com/a/13864829/1468388
if [ -z ${WHOOL_POST_VERSION_STRATEGY_OVERRIDE+x} ]; then
echo Setting WHOOL_POST_VERSION_STRATEGY_OVERRIDE to none
export WHOOL_POST_VERSION_STRATEGY_OVERRIDE=none
fi
# Make sure you can import the built addon
for manifest in $(find -L . -name __manifest__.py); do
export pythonImportsCheck="$pythonImportsCheck odoo.addons.$(basename $(dirname $(realpath $manifest)))"
done
}
preBuildHooks+=(whool-post-version-strategy-hook)
+2
View File
@@ -17331,6 +17331,8 @@ self: super: with self; {
whoisdomain = callPackage ../development/python-modules/whoisdomain { };
whool = callPackage ../development/python-modules/whool { };
whoosh = callPackage ../development/python-modules/whoosh { };
widgetsnbextension = callPackage ../development/python-modules/widgetsnbextension { };