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 3c6cbf8 commit 5310756
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dissect/archive/c_wim.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@
} WIMHASH;
"""

c_wim = cstruct()
c_wim.load(wim_def)
c_wim = cstruct().load(wim_def)

WIM_IMAGE_TAG = b"MSWIM\x00\x00\x00"
HEADER_FLAG = c_wim.HEADER_FLAG
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
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ minversion = 4.4.3
requires = virtualenv>=20.16.6

[testenv]
extras = full
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 .[full]
commands =
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
coverage report
Expand Down

0 comments on commit 5310756

Please sign in to comment.