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 859a2f5 commit ab0f4e1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 2 additions & 3 deletions dissect/cim/c_cim.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import namedtuple

from dissect import cstruct
from dissect.cstruct import cstruct

cim_def = """
// Mapping
Expand Down Expand Up @@ -195,8 +195,7 @@
};
"""

c_cim = cstruct.cstruct()
c_cim.load(cim_def, compiled=True)
c_cim = cstruct().load(cim_def)

DATA_PAGE_SIZE = 0x2000

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.0.dev,<4.0.dev",
"dissect.util>=3.0.dev,<4.0.dev",
"dissect.cstruct>3,<5",
"dissect.util>2,<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 ab0f4e1

Please sign in to comment.