Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -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_wheel:
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 wheel
run: |
python -m build --wheel
- uses: actions/upload-artifact@v7
with:
name: cibw-wheels
path: dist/*.whl
upload_test_pypi:
needs: [build_sdist, build_wheel]
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
23 changes: 2 additions & 21 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,15 @@ 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 wheel"

build_script:
- cmd: IF [%TARGET%]==[wheel] (
"%PYTHON%\\python.exe" -m build --wheel )
build: off

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
9 changes: 0 additions & 9 deletions l2tdevtools.ini

This file was deleted.

3 changes: 1 addition & 2 deletions l2tdevtools/build_helpers/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ def Build(self, source_helper_object):
class ConfigureMakeWheelBuildHelper(WheelBuildHelper):
"""Helper to build Python wheel packages (.whl).

Builds wheel packages for projects that use configure/make as their build
system.
Builds wheel packages for projects that use configure/make as their build system.
"""

def Build(self, source_helper_object):
Expand Down
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "l2tdevtools"
version = "20260526"
version = "20260527"
description = "Development tools for the log2timeline projects"
maintainers = [
{ name = "Log2Timeline maintainers", email = "log2timeline-maintainers@googlegroups.com" },
Expand Down Expand Up @@ -33,5 +33,17 @@ force-exclude = """
)
"""

[tool.docformatter]
black = true
non-cap = ["str:"]
non-strict = true

[tool.l2tdevtools]
name = "log2timeline development tools"
status = "alpha"
description = """
Development tools for the log2timeline projects. \
"""

[tool.setuptools]
package-dir = {"l2tdevtools" = "l2tdevtools"}
1 change: 0 additions & 1 deletion tests/dependency_writers/appveyor_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class AppveyorYMLTest(test_lib.BaseTestCase):

def testInitialize(self):
"""Tests that the writer can be initialized."""

l2tdevtools_path = "/fake/l2tdevtools/"
project_definition = project.ProjectHelper(l2tdevtools_path)
dependencies_file = self._GetTestFilePath(["dependencies.ini"])
Expand Down
1 change: 0 additions & 1 deletion tests/dependency_writers/dependencies_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class DependenciesPyWriterTest(test_lib.BaseTestCase):

def testInitialize(self):
"""Tests that the writer can be initialized."""

l2tdevtools_path = "/fake/l2tdevtools/"
project_definition = project.ProjectHelper(l2tdevtools_path)
dependencies_file = self._GetTestFilePath(["dependencies.ini"])
Expand Down
2 changes: 0 additions & 2 deletions tests/dependency_writers/dpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class DPKGCompatWriterTest(test_lib.BaseTestCase):

def testInitialize(self):
"""Tests that the writer can be initialized."""

l2tdevtools_path = "/fake/l2tdevtools/"
project_definition = project.ProjectHelper(l2tdevtools_path)
dependencies_file = self._GetTestFilePath(["dependencies.ini"])
Expand All @@ -38,7 +37,6 @@ class DPKGControlWriterTest(test_lib.BaseTestCase):

def testInitialize(self):
"""Tests that the writer can be initialized."""

l2tdevtools_path = "/fake/l2tdevtools/"
project_definition = project.ProjectHelper(l2tdevtools_path)
dependencies_file = self._GetTestFilePath(["dependencies.ini"])
Expand Down
1 change: 1 addition & 0 deletions tools/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def _WritePullRequests(self, project_name, pulls_json, output_writer):
pulls_json (list[object]): JSON formatted pull objects.
output_writer (OutputWriter): output writer.
"""

# https://developer.github.com/v3/pulls/#list-pull-requests
# [{
# "created_at": creation date and time of the CL.
Expand Down
Loading