diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5834fde..e88fccf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,9 @@ jobs: runs-on: macos-latest strategy: matrix: - python-version: ['3.11'] + include: + - python-version: '3.11' + toxenv: 'py311' steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -15,22 +17,16 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install build dependencies run: | - brew update - brew install autoconf automake gettext pkgconfig + brew update -q + brew install -q autoconf automake gettext gnu-sed pkgconfig python@${{ matrix.python-version }} tox brew link --force gettext ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize - - name: Build Python module + - name: Build and test Python module run: | python setup.py update export CXXFLAGS="-std=c++14" python setup.py build - # Need to build sdist here to prevent: - # No local packages or working download links found for pytsk3==VERSION - python setup.py sdist - python setup.py install - - name: Test Python module - run: | - python run_tests.py + tox -e${{ matrix.toxenv }} build_ubuntu: runs-on: ubuntu-22.04 strategy: diff --git a/class_parser.py b/class_parser.py index 81515c2..febd172 100644 --- a/class_parser.py +++ b/class_parser.py @@ -235,7 +235,7 @@ DEBUG = 0 # The pytsk3 version. -VERSION = "20230928" +VERSION = "20230930" # These functions are used to manage library memory. FREE = "aff4_free" diff --git a/dpkg/changelog b/dpkg/changelog index 1a9e730..a12569b 100644 --- a/dpkg/changelog +++ b/dpkg/changelog @@ -1,5 +1,5 @@ -pytsk3 (20230928-1) unstable; urgency=low +pytsk3 (20230930-1) unstable; urgency=low * Auto-generated - -- Joachim Metz Thu, 28 Sep 2023 12:43:50 -0100 + -- Joachim Metz Sat, 30 Sep 2023 10:50:56 -0100 diff --git a/setup.cfg b/setup.cfg index 0696b48..464a1ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pytsk3 -version = 20230125 +version = 20230930 description = Python bindings for the SleuthKit long_description = Python bindings for the SleuthKit author = Michael Cohen diff --git a/setup.py b/setup.py index ce43d62..10e569b 100755 --- a/setup.py +++ b/setup.py @@ -333,8 +333,14 @@ def run(self): subprocess.check_call(["./bootstrap"], cwd="sleuthkit") # Now derive the version based on the date. - with open("version.txt", "w") as fd: - fd.write(self.version) + with open("setup.cfg", "r", encoding="utf-8") as file_object: + setup_cfg_lines = file_object.readlines() + + with open("setup.cfg", "w", encoding="utf-8") as file_object: + for line in setup_cfg_lines: + if line.startswith("version = "): + line = "version = {0:s}\n".format(self.version) + file_object.write(line) libtsk_path = os.path.join("sleuthkit", "tsk") diff --git a/tox.ini b/tox.ini index 5711d2b..effc9b4 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,6 @@ deps = setuptools wheel commands = - python -m pip wheel --no-build-isolation --wheel-dir=dist pytsk3 + python -m build --no-isolation --outdir=dist --wheel python -m pip install --no-index --find-links=dist pytsk3 python run_tests.py diff --git a/version.txt b/version.txt deleted file mode 100644 index 47cdec1..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -20230928 \ No newline at end of file