From 205d36a31c98af37f729e4d0d4e8551210bb4b81 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 26 May 2026 16:44:48 +0200 Subject: [PATCH 1/4] Changes for deployment --- .github/workflows/build_wheel.yml | 73 +++++++++++++++++++++++++++++++ appveyor.yml | 29 +----------- dfdatetime.ini | 12 ----- pyproject.toml | 8 ++++ 4 files changed, 82 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/build_wheel.yml delete mode 100644 dfdatetime.ini diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml new file mode 100644 index 0000000..613c2da --- /dev/null +++ b/.github/workflows/build_wheel.yml @@ -0,0 +1,73 @@ +# Build Python sdist and wheel. +name: build_wheels +on: + pull_request: + push: + release: + types: [published] + # Allow trigger via API + workflow_dispatch: +permissions: read-all +jobs: + build_sdist: + name: Build sdist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Install build dependencies + run: | + sudo apt update + sudo apt -y install python3-build + - name: Build sdist + run: | + python -m build --sdist + - uses: actions/upload-artifact@v7 + with: + name: cibw-sdist + path: dist/*.tar.gz + build_sdist: + name: Build wheel + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Install build dependencies + run: | + sudo apt update + sudo apt -y install python3-build python3-wheel + - name: Build sdist + run: | + python -m build --wheel + - uses: actions/upload-artifact@v7 + with: + name: cibw-wheels + path: dist/*.whl + upload_test_pypi: + needs: [build_sdist, build_wheels] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v8 + with: + pattern: cibw-* + path: dist + merge-multiple: true + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + upload_pypi: + needs: [upload_test_pypi] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v8 + with: + pattern: cibw-* + path: dist + merge-multiple: true + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/appveyor.yml b/appveyor.yml index 67ef6c2..7be562b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,4 @@ environment: - PYPI_TOKEN: - secure: /FwQrmudDyj+Mu3DaxLEo23Y6/OEgdHJqyWyZTjkJKje8pxCOrUorN8ZlXRGXbd3UA60emClt0M+SI+xqyA/qkpqZTgd5CKohpVAGH2EfzRc/zwJSGJ4tmZmMVAG8ayk6N9zFxCeC+y0BgZPQnj/Eq/RfuS4YIuaKutIUa5gTMmhWpODFKGV/2Wx1w67xWxAoONfEC5j0Gu3R274SS7FfBb4qWyIiBIJMwHGjlgp1Onk8KlpCLauZv8/hGfQDmWEdZ+mjcsTYyQYr1xfr1/FjQ== matrix: - DESCRIPTION: "Run tests on Windows with 32-bit Python 3.14" MACHINE_TYPE: "x86" @@ -16,39 +14,14 @@ environment: PYTHON_VERSION: "3.14" L2TBINARIES_TRACK: "dev" TARGET: tests - - DESCRIPTION: "Build wheel on Windows with 32-bit Python 3.14" - MACHINE_TYPE: "amd64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - PYTHON: "C:\\Python314-x64" - PYTHON_VERSION: "3.14" - L2TBINARIES_TRACK: "dev" - TARGET: wheel - - DESCRIPTION: "Build wheel on Windows with 64-bit Python 3.14" - MACHINE_TYPE: "amd64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - PYTHON: "C:\\Python314-x64" - PYTHON_VERSION: "3.14" - L2TBINARIES_TRACK: "dev" - TARGET: wheel install: -- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools twine wheel" +- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools" - ps: .\config\appveyor\install.ps1 -build_script: -- cmd: IF [%TARGET%]==[wheel] ( - "%PYTHON%\\python.exe" -m build --wheel ) - test_script: - cmd: IF [%TARGET%]==[tests] ( "%PYTHON%\\python.exe" run_tests.py && IF EXIST "tests\\end-to-end.py" ( set PYTHONPATH=. && "%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) ) - -artifacts: -- path: dist\*.whl - -deploy_script: -- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:MACHINE_TYPE -eq "x86") { - Invoke-Expression "${env:PYTHON}\\python.exe -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" } diff --git a/dfdatetime.ini b/dfdatetime.ini deleted file mode 100644 index e0fb912..0000000 --- a/dfdatetime.ini +++ /dev/null @@ -1,12 +0,0 @@ -[project] -name: dfdatetime -status: alpha -name_description: dfDateTime -maintainer: Log2Timeline maintainers -git_url: https://github.com/log2timeline/dfdatetime.git -homepage_url: https://github.com/log2timeline/dfdatetime -description_short: Digital Forensics date and time (dfDateTime). -description_long: dfDateTime, or Digital Forensics date and time, provides date and time objects - to preserve accuracy and precision. -pypi_token: /FwQrmudDyj+Mu3DaxLEo23Y6/OEgdHJqyWyZTjkJKje8pxCOrUorN8ZlXRGXbd3UA60emClt0M+SI+xqyA/qkpqZTgd5CKohpVAGH2EfzRc/zwJSGJ4tmZmMVAG8ayk6N9zFxCeC+y0BgZPQnj/Eq/RfuS4YIuaKutIUa5gTMmhWpODFKGV/2Wx1w67xWxAoONfEC5j0Gu3R274SS7FfBb4qWyIiBIJMwHGjlgp1Onk8KlpCLauZv8/hGfQDmWEdZ+mjcsTYyQYr1xfr1/FjQ== - diff --git a/pyproject.toml b/pyproject.toml index 8b057c8..345494b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,5 +33,13 @@ black = true non-cap = ["bytes:", "dfDateTime", "float:", "int:", "str:"] non-strict = true +[tool.l2tdevtools] +name = "dfDateTime" +status = "alpha" +description = """ +dfDateTime, or Digital Forensics date and time, provides date and time objects \ +to preserve accuracy and precision. \ +""" + [tool.setuptools] package-dir = {"dfdatetime" = "dfdatetime"} From 344082cbc7bf4642eed203bed576b451c1dc81eb Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 26 May 2026 16:57:44 +0200 Subject: [PATCH 2/4] Changes for deployment --- .github/workflows/build_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 613c2da..18ccc0c 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -25,7 +25,7 @@ jobs: with: name: cibw-sdist path: dist/*.tar.gz - build_sdist: + build_wheel: name: Build wheel runs-on: ubuntu-latest steps: @@ -42,7 +42,7 @@ jobs: name: cibw-wheels path: dist/*.whl upload_test_pypi: - needs: [build_sdist, build_wheels] + needs: [build_sdist, build_wheel] runs-on: ubuntu-latest environment: pypi permissions: From 91adb779a22a752472ebc1cf551bb708a9799a66 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 26 May 2026 16:59:07 +0200 Subject: [PATCH 3/4] Changes for deployment --- .github/workflows/build_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 18ccc0c..3ac7de1 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -34,7 +34,7 @@ jobs: run: | sudo apt update sudo apt -y install python3-build python3-wheel - - name: Build sdist + - name: Build wheel run: | python -m build --wheel - uses: actions/upload-artifact@v7 From ac21f45eeba1d3e8550a61b34ffe8934cc66345d Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 26 May 2026 17:16:54 +0200 Subject: [PATCH 4/4] Changes for deployment --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7be562b..8fd32db 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,9 +16,10 @@ environment: TARGET: tests install: -- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools" - ps: .\config\appveyor\install.ps1 +build: off + test_script: - cmd: IF [%TARGET%]==[tests] ( "%PYTHON%\\python.exe" run_tests.py &&