Skip to content

Commit

Permalink
Compatibility with cstruct v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper committed May 24, 2024
1 parent b28a604 commit dcbe273
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
4 changes: 2 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>3,<5",
"dissect.util>3.4,<4",
]
dynamic = ["version"]

Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ deps =
pytest
pytest-cov
coverage
# Unfortunately, tox does not allow separate installation flags for the project
# dependencies and the test dependencies. When running tox, we want to install the
# project dependencies with the --pre flag, so that we get the latest version of all
# dependencies. We do the installation step ourselves for this reason.
skip_install = true
commands_pre =
pip install --pre -e .
commands =
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
coverage report
Expand Down

0 comments on commit dcbe273

Please sign in to comment.