Skip to content

Commit cc47b05

Browse files
authored
Applied updates (#1275)
1 parent 625bd54 commit cc47b05

9 files changed

Lines changed: 90 additions & 37 deletions

File tree

.github/workflows/build_wheel.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Build Python sdist and wheel.
2+
name: build_wheels
3+
on:
4+
pull_request:
5+
push:
6+
release:
7+
types: [published]
8+
# Allow trigger via API
9+
workflow_dispatch:
10+
permissions: read-all
11+
jobs:
12+
build_sdist:
13+
name: Build sdist
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
- name: Install build dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt -y install python3-build
21+
- name: Build sdist
22+
run: |
23+
python -m build --sdist
24+
- uses: actions/upload-artifact@v7
25+
with:
26+
name: cibw-sdist
27+
path: dist/*.tar.gz
28+
build_wheel:
29+
name: Build wheel
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v6
33+
- name: Install build dependencies
34+
run: |
35+
sudo apt update
36+
sudo apt -y install python3-build python3-wheel
37+
- name: Build wheel
38+
run: |
39+
python -m build --wheel
40+
- uses: actions/upload-artifact@v7
41+
with:
42+
name: cibw-wheels
43+
path: dist/*.whl
44+
upload_test_pypi:
45+
needs: [build_sdist, build_wheel]
46+
runs-on: ubuntu-latest
47+
environment: pypi
48+
permissions:
49+
id-token: write
50+
if: github.event_name == 'release' && github.event.action == 'published'
51+
steps:
52+
- uses: actions/download-artifact@v8
53+
with:
54+
pattern: cibw-*
55+
path: dist
56+
merge-multiple: true
57+
- uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
repository-url: https://test.pypi.org/legacy/
60+
upload_pypi:
61+
needs: [upload_test_pypi]
62+
runs-on: ubuntu-latest
63+
environment: pypi
64+
permissions:
65+
id-token: write
66+
if: github.event_name == 'release' && github.event.action == 'published'
67+
steps:
68+
- uses: actions/download-artifact@v8
69+
with:
70+
pattern: cibw-*
71+
path: dist
72+
merge-multiple: true
73+
- uses: pypa/gh-action-pypi-publish@release/v1

appveyor.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,15 @@ environment:
1414
PYTHON_VERSION: "3.14"
1515
L2TBINARIES_TRACK: "dev"
1616
TARGET: tests
17-
- DESCRIPTION: "Build wheel on Windows with 32-bit Python 3.14"
18-
MACHINE_TYPE: "amd64"
19-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
20-
PYTHON: "C:\\Python314-x64"
21-
PYTHON_VERSION: "3.14"
22-
L2TBINARIES_TRACK: "dev"
23-
TARGET: wheel
24-
- DESCRIPTION: "Build wheel on Windows with 64-bit Python 3.14"
25-
MACHINE_TYPE: "amd64"
26-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
27-
PYTHON: "C:\\Python314-x64"
28-
PYTHON_VERSION: "3.14"
29-
L2TBINARIES_TRACK: "dev"
30-
TARGET: wheel
3117

3218
install:
33-
- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools twine wheel"
19+
- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools wheel"
3420

35-
build_script:
36-
- cmd: IF [%TARGET%]==[wheel] (
37-
"%PYTHON%\\python.exe" -m build --wheel )
21+
build: off
3822

3923
test_script:
4024
- cmd: IF [%TARGET%]==[tests] (
4125
"%PYTHON%\\python.exe" run_tests.py &&
4226
IF EXIST "tests\\end-to-end.py" (
4327
set PYTHONPATH=. &&
4428
"%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) )
45-
46-
artifacts:
47-
- path: dist\*.whl

l2tdevtools.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

l2tdevtools/build_helpers/wheel.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ def Build(self, source_helper_object):
191191
class ConfigureMakeWheelBuildHelper(WheelBuildHelper):
192192
"""Helper to build Python wheel packages (.whl).
193193
194-
Builds wheel packages for projects that use configure/make as their build
195-
system.
194+
Builds wheel packages for projects that use configure/make as their build system.
196195
"""
197196

198197
def Build(self, source_helper_object):

pyproject.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "l2tdevtools"
7-
version = "20260526"
7+
version = "20260527"
88
description = "Development tools for the log2timeline projects"
99
maintainers = [
1010
{ name = "Log2Timeline maintainers", email = "log2timeline-maintainers@googlegroups.com" },
@@ -33,5 +33,17 @@ force-exclude = """
3333
)
3434
"""
3535

36+
[tool.docformatter]
37+
black = true
38+
non-cap = ["str:"]
39+
non-strict = true
40+
41+
[tool.l2tdevtools]
42+
name = "log2timeline development tools"
43+
status = "alpha"
44+
description = """
45+
Development tools for the log2timeline projects. \
46+
"""
47+
3648
[tool.setuptools]
3749
package-dir = {"l2tdevtools" = "l2tdevtools"}

tests/dependency_writers/appveyor_yml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class AppveyorYMLTest(test_lib.BaseTestCase):
1414

1515
def testInitialize(self):
1616
"""Tests that the writer can be initialized."""
17-
1817
l2tdevtools_path = "/fake/l2tdevtools/"
1918
project_definition = project.ProjectHelper(l2tdevtools_path)
2019
dependencies_file = self._GetTestFilePath(["dependencies.ini"])

tests/dependency_writers/dependencies_py.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class DependenciesPyWriterTest(test_lib.BaseTestCase):
1414

1515
def testInitialize(self):
1616
"""Tests that the writer can be initialized."""
17-
1817
l2tdevtools_path = "/fake/l2tdevtools/"
1918
project_definition = project.ProjectHelper(l2tdevtools_path)
2019
dependencies_file = self._GetTestFilePath(["dependencies.ini"])

tests/dependency_writers/dpkg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class DPKGCompatWriterTest(test_lib.BaseTestCase):
1515

1616
def testInitialize(self):
1717
"""Tests that the writer can be initialized."""
18-
1918
l2tdevtools_path = "/fake/l2tdevtools/"
2019
project_definition = project.ProjectHelper(l2tdevtools_path)
2120
dependencies_file = self._GetTestFilePath(["dependencies.ini"])
@@ -38,7 +37,6 @@ class DPKGControlWriterTest(test_lib.BaseTestCase):
3837

3938
def testInitialize(self):
4039
"""Tests that the writer can be initialized."""
41-
4240
l2tdevtools_path = "/fake/l2tdevtools/"
4341
project_definition = project.ProjectHelper(l2tdevtools_path)
4442
dependencies_file = self._GetTestFilePath(["dependencies.ini"])

tools/stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def _WritePullRequests(self, project_name, pulls_json, output_writer):
277277
pulls_json (list[object]): JSON formatted pull objects.
278278
output_writer (OutputWriter): output writer.
279279
"""
280+
280281
# https://developer.github.com/v3/pulls/#list-pull-requests
281282
# [{
282283
# "created_at": creation date and time of the CL.

0 commit comments

Comments
 (0)