Skip to content

Commit

Permalink
Changes for CI tests (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Sep 30, 2023
1 parent 5033b62 commit dfa12f4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion class_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
DEBUG = 0

# The pytsk3 version.
VERSION = "20230928"
VERSION = "20230930"

# These functions are used to manage library memory.
FREE = "aff4_free"
Expand Down
4 changes: 2 additions & 2 deletions dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytsk3 (20230928-1) unstable; urgency=low
pytsk3 (20230930-1) unstable; urgency=low

* Auto-generated

-- Joachim Metz <[email protected]> Thu, 28 Sep 2023 12:43:50 -0100
-- Joachim Metz <[email protected]> Sat, 30 Sep 2023 10:50:56 -0100
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion version.txt

This file was deleted.

0 comments on commit dfa12f4

Please sign in to comment.