Skip to content

Commit 3f0b0d3

Browse files
committed
Compatibility with cstruct v4
1 parent d259c51 commit 3f0b0d3

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

dissect/vmfs/c_vmfs.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import stat
22
import struct
33

4-
from dissect import cstruct
4+
from dissect.cstruct import cstruct
55

66
vmfs_def = """
77
/* === System file addresses === */
@@ -368,8 +368,7 @@
368368
};
369369
"""
370370

371-
c_vmfs = cstruct.cstruct()
372-
c_vmfs.load(vmfs_def)
371+
c_vmfs = cstruct().load(vmfs_def)
373372

374373
ADDRESS_TYPE_MASK = 7
375374
ResourceType = c_vmfs.ResourceType

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ classifiers = [
2525
"Topic :: Utilities",
2626
]
2727
dependencies = [
28-
"dissect.cstruct>=3.0.dev,<4.0.dev",
29-
"dissect.util>=3.0.dev,<4.0.dev",
28+
"dissect.cstruct>3,<5",
29+
"dissect.util>2,<4",
3030
]
3131
dynamic = ["version"]
3232

tox.ini

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ deps =
1515
pytest
1616
pytest-cov
1717
coverage
18+
# Unfortunately, tox does not allow separate installation flags for the project
19+
# dependencies and the test dependencies. When running tox, we want to install the
20+
# project dependencies with the --pre flag, so that we get the latest version of all
21+
# dependencies. We do the installation step ourselves for this reason.
22+
skip_install = true
23+
commands_pre =
24+
pip install --pre -e .
1825
commands =
1926
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
2027
coverage report

0 commit comments

Comments
 (0)