diff --git a/dissect/fat/c_exfat.py b/dissect/fat/c_exfat.py index 9ec94e0..1cda56e 100644 --- a/dissect/fat/c_exfat.py +++ b/dissect/fat/c_exfat.py @@ -1,6 +1,6 @@ -from dissect import cstruct +from dissect.cstruct import cstruct -c_exfat_def = """ +exfat_def = """ enum entry_types : uint8 { allocation_bitmap = 0x81, upcase_table = 0x82, @@ -139,8 +139,7 @@ """ # default endianess is LE so we keep it that way. -c_exfat = cstruct.cstruct() -c_exfat.load(c_exfat_def) +c_exfat = cstruct().load(exfat_def) EOC = 0xFFFFFFFF # indicates end of cluster chain FID = 0xFFFFFFF8 # indicates start of FAT diff --git a/dissect/fat/c_fat.py b/dissect/fat/c_fat.py index f031b55..74eaeb0 100644 --- a/dissect/fat/c_fat.py +++ b/dissect/fat/c_fat.py @@ -1,7 +1,7 @@ -from dissect import cstruct +from dissect.cstruct import cstruct # https://ogris.de/fatrepair/fat.c -c_fat_def = """ +fat_def = """ #define ATTR_READ_ONLY 0x01 #define ATTR_HIDDEN 0x02 #define ATTR_SYSTEM 0x04 @@ -90,8 +90,7 @@ }; """ # noqa: E501 -c_fat = cstruct.cstruct() -c_fat.load(c_fat_def) +c_fat = cstruct().load(fat_def) Fattype = c_fat.Fattype diff --git a/pyproject.toml b/pyproject.toml index 376f006..12df85a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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>=4.dev,<5", + "dissect.util>=3,<4", ] dynamic = ["version"] @@ -35,6 +35,12 @@ homepage = "https://dissect.tools" documentation = "https://docs.dissect.tools/en/latest/projects/dissect.fat" repository = "https://github.com/fox-it/dissect.fat" +[project.optional-dependencies] +dev = [ + "dissect.cstruct>=4.0.dev,<5.0.dev", + "dissect.util>=3.0.dev,<4.0.dev", +] + [tool.black] line-length = 120 diff --git a/tox.ini b/tox.ini index 67e8e8a..7bd2890 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,7 @@ minversion = 4.4.3 requires = virtualenv>=20.16.6 [testenv] +extras = dev deps = pytest pytest-cov