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
28 changes: 1 addition & 27 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -16,39 +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"
- ps: .\config\appveyor\install.ps1

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

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" }
12 changes: 0 additions & 12 deletions dfdatetime.ini

This file was deleted.

8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Loading