Skip to content

Commit

Permalink
Compatibility with cstruct v4 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper authored Jun 4, 2024
1 parent b28a604 commit 69b296e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 3 additions & 4 deletions dissect/esedb/c_esedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from collections import namedtuple
from typing import Union

from dissect import cstruct
from dissect.cstruct import cstruct

# https://github.com/microsoft/Extensible-Storage-Engine
c_esedb_def = """
esedb_def = """
#define MAX_COMPUTERNAME_LENGTH 15
typedef int64 DBTIME;
Expand Down Expand Up @@ -427,8 +427,7 @@
};
""" # noqa E501

c_esedb = cstruct.cstruct()
c_esedb.load(c_esedb_def)
c_esedb = cstruct().load(esedb_def)

ulDAEMagic = 0x89ABCDEF
pgnoFDPMSO = 4
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
"Topic :: Utilities",
]
dependencies = [
"dissect.cstruct>=3.4.dev,<4.0.dev",
"dissect.util>=3.5.dev,<4.0.dev",
"dissect.cstruct>=4.dev,<5",
"dissect.util>=3.5,<4",
]
dynamic = ["version"]

Expand All @@ -35,6 +35,12 @@ homepage = "https://dissect.tools"
documentation = "https://docs.dissect.tools/en/latest/projects/dissect.esedb"
repository = "https://github.com/fox-it/dissect.esedb"

[project.optional-dependencies]
dev = [
"dissect.cstruct>=4.0.dev,<5.0.dev",
"dissect.util>=3.5.dev,<4.0.dev",
]

[tool.black]
line-length = 120

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ minversion = 4.4.3
requires = virtualenv>=20.16.6

[testenv]
extras = dev
deps =
pytest
pytest-cov
Expand Down

0 comments on commit 69b296e

Please sign in to comment.