python3Packages.cryptoparser: 1.0.0 -> 1.0.2, add ngi team (#475787)

This commit is contained in:
Aleksana
2026-01-01 11:01:53 +00:00
committed by GitHub
2 changed files with 24 additions and 42 deletions

View File

@@ -4,29 +4,35 @@
attrs,
buildPythonPackage,
cryptodatahub,
fetchPypi,
python-dateutil,
fetchFromGitLab,
fetchpatch2,
pyfakefs,
pythonOlder,
setuptools,
setuptools-scm,
unittestCheckHook,
urllib3,
}:
buildPythonPackage rec {
pname = "cryptoparser";
version = "1.0.0";
version = "1.0.2";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-bEvhMVcm9sXlfhxUD2K4N10nusgxpGYFJQLtJE1/qok=";
src = fetchFromGitLab {
owner = "coroner";
repo = "cryptoparser";
tag = "v${version}";
hash = "sha256-CsG4hfA3pfE7FwxNfaUTLMS8RV0tv1czoHdIlolUX34=";
};
patches = [
# https://gitlab.com/coroner/cryptoparser/-/merge_requests/2
./fix-dirs-exclude.patch
(fetchpatch2 {
url = "https://gitlab.com/coroner/cryptoparser/-/merge_requests/2.diff";
hash = "sha256-T8dK6OMR41XUMrZ6B7ZybEtljZJOR2QbCiZl04dT3wA=";
})
];
build-system = [
@@ -38,16 +44,18 @@ buildPythonPackage rec {
asn1crypto
attrs
cryptodatahub
python-dateutil
urllib3
];
postInstall = ''
find $out -name "__pycache__" -type d | xargs rm -rv
env.PYTHONDONTWRITEBYTECODE = 1;
# Prevent creating more binary byte code later (e.g. during
# pythonImportsCheck)
export PYTHONDONTWRITEBYTECODE=1
nativeCheckInputs = [
pyfakefs
unittestCheckHook
];
postInstall = ''
find $out -name __pycache__ -type d | xargs rm -rv
'';
pythonImportsCheck = [ "cryptoparser" ];
@@ -55,8 +63,9 @@ buildPythonPackage rec {
meta = {
description = "Security protocol parser and generator";
homepage = "https://gitlab.com/coroner/cryptoparser";
changelog = "https://gitlab.com/coroner/cryptoparser/-/blob/v${version}/CHANGELOG.md";
changelog = "https://gitlab.com/coroner/cryptoparser/-/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ kranzes ];
teams = with lib.teams; [ ngi ];
};
}

View File

@@ -1,27 +0,0 @@
From 512b5d6e30784594db46bcd0071d63da7065e478 Mon Sep 17 00:00:00 2001
From: Ivan Mincik <ivan.mincik@gmail.com>
Date: Wed, 17 Sep 2025 14:09:31 +0200
Subject: [PATCH] Fix directories exclude from package
* correctly exclude submodules directory
* also exclude docs directory
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 73897d6..74d43e4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -75,7 +75,7 @@ technical_name = 'cryptoparser'
license-files = ['LICENSE.txt']
[tool.setuptools.packages.find]
-exclude = ['submodules']
+exclude = ['submodules*', 'docs']
[tool.tox]
envlist = [
--
GitLab