-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python312Packages.amulet-core: init at 1.9.27
- Loading branch information
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
pkgs/development/python-modules/amulet-core/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pythonOlder, | ||
|
||
# build-system | ||
setuptools, | ||
wheel, | ||
cython, | ||
versioneer, | ||
numpy, | ||
|
||
# dependencies | ||
amulet-nbt, | ||
pymctranslate, | ||
portalocker, | ||
amulet-leveldb, | ||
platformdirs, | ||
lz4, | ||
black, | ||
pre-commit, | ||
sphinx, | ||
sphinx-autodoc-typehints, | ||
sphinx-rtd-theme, | ||
|
||
pytestCheckHook, | ||
nix-update-script, | ||
}: | ||
let | ||
version = "1.9.27"; | ||
in | ||
buildPythonPackage { | ||
pname = "amulet-core"; | ||
inherit version; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Amulet-Team"; | ||
repo = "Amulet-Core"; | ||
tag = version; | ||
hash = "sha256-kyUEF9bOVs51yD1kGnjMnDaB1Fiz78Kuvjwji3Qq1PQ="; | ||
}; | ||
|
||
disabled = pythonOlder "3.9"; | ||
|
||
postPatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace-fail 'versioneer-518' 'versioneer' | ||
substituteInPlace setup.py \ | ||
--replace-fail "versioneer.get_version()" "'${version}'" | ||
''; | ||
|
||
build-system = [ | ||
setuptools | ||
wheel | ||
cython | ||
versioneer | ||
numpy | ||
]; | ||
|
||
dependencies = [ | ||
numpy | ||
amulet-nbt | ||
pymctranslate | ||
portalocker | ||
amulet-leveldb | ||
platformdirs | ||
lz4 | ||
]; | ||
|
||
optional-dependencies = { | ||
dev = [ | ||
black | ||
pre-commit | ||
]; | ||
docs = [ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
]; | ||
}; | ||
|
||
pythonRelaxDeps = [ "platformdirs" ]; | ||
|
||
pythonImportsCheck = [ "amulet" ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
preCheck = '' | ||
# Required for tests that want to write to the home directory | ||
export HOME=$(mktemp -d) | ||
''; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "Python library for reading and writing the Minecraft save formats"; | ||
homepage = "https://github.com/Amulet-Team/Amulet-Core"; | ||
changelog = "https://github.com/Amulet-Team/Amulet-Core/releases/tag/${version}"; | ||
license = with lib.licenses; [ amulet ]; | ||
maintainers = with lib.maintainers; [ pluiedev ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters