python3Packages.kaitaistruct: 0.10 -> 0.11

- Release:
https://github.com/kaitai-io/kaitai_struct_python_runtime/releases/tag/v0.11

- Changes:
https://github.com/kaitai-io/kaitai_struct_python_runtime/compare/0.10...v0.11

- Resolves:
https://github.com/NixOS/nixpkgs/issues/442639

- Notes on `mitmproxy`:
- 'mitmproxy' locks this package to v0.10.
- To keep the package working, added 'kaitaistruct' to 'relaxedPythonDeps'.
- The 'mitmproxy' tests still pass with this change.

- Notes on patches:
- The `sed` command is brittle as the line number to insert the
package definition for `kaitai-compress` to can change between
versions.
- To make it more robust, a patch file has been added.

Changed files
+16 -3
pkgs
development
python-modules
+11
pkgs/development/python-modules/kaitaistruct/01-add-kaitai-compress.patch
···
···
+
diff --git a/setup.cfg b/setup.cfg
+
--- a/setup.cfg
+
+++ b/setup.cfg
+
@@ -30,6 +30,7 @@ classifiers =
+
[options]
+
zip_safe = True
+
include_package_data = True
+
+packages = kaitai/compress
+
py_modules = kaitaistruct
+
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
+
install_requires =
+4 -3
pkgs/development/python-modules/kaitaistruct/default.nix
···
in
buildPythonPackage rec {
pname = "kaitaistruct";
-
version = "0.10";
pyproject = true;
src = fetchPypi {
inherit pname version;
-
hash = "sha256-oETe4pFz1q+6zye8rDna+JtlTdQYz6AJq4LZF4qa5So=";
};
preBuild = ''
ln -s ${kaitai_compress}/python/kaitai kaitai
-
sed '32ipackages = kaitai/compress' -i setup.cfg
'';
build-system = [ setuptools ];
···
in
buildPythonPackage rec {
pname = "kaitaistruct";
+
version = "0.11";
pyproject = true;
src = fetchPypi {
inherit pname version;
+
hash = "sha256-BT7nZCiOeLjlOs90jpczJorL1Xm42CpCexgFRTYl10s=";
};
+
patches = [ ./01-add-kaitai-compress.patch ];
+
preBuild = ''
ln -s ${kaitai_compress}/python/kaitai kaitai
'';
build-system = [ setuptools ];
+1
pkgs/development/python-modules/mitmproxy/default.nix
···
"cryptography"
"flask"
"h2"
"passlib"
"pyopenssl"
"tornado"
···
"cryptography"
"flask"
"h2"
+
"kaitaistruct"
"passlib"
"pyopenssl"
"tornado"