From efcd39f1edaa03d73c828b6a99c2b9197ffbbf09 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 25 Nov 2025 11:43:52 +0100 Subject: [PATCH 1/2] Migrated setup.cfg to pyproject.toml --- MANIFEST.in | 3 +-- README => README.md | 0 pyproject.toml | 26 ++++++++++++++++++++++++++ requirements.txt | 0 setup.cfg | 33 --------------------------------- setup.py | 8 -------- test_requirements.txt | 0 tox.ini | 6 +----- 8 files changed, 28 insertions(+), 48 deletions(-) rename README => README.md (100%) delete mode 100644 requirements.txt delete mode 100644 setup.cfg delete mode 100755 setup.py delete mode 100644 test_requirements.txt diff --git a/MANIFEST.in b/MANIFEST.in index b987d748..977870f7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,6 @@ -include ACKNOWLEDGEMENTS AUTHORS LICENSE README +include ACKNOWLEDGEMENTS AUTHORS LICENSE README.md include dependencies.ini run_tests.py utils/__init__.py utils/dependencies.py include utils/check_dependencies.py -include requirements.txt test_requirements.txt exclude .gitignore exclude *.pyc recursive-include config * diff --git a/README b/README.md similarity index 100% rename from README rename to README.md diff --git a/pyproject.toml b/pyproject.toml index 9787c3bd..72c69c17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,29 @@ [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" + +[project] +name = "dfdatetime" +version = "20251125" +description = "Digital Forensics date and time (dfDateTime)" +maintainers = [ + { name = "Log2Timeline maintainers", email = "log2timeline-maintainers@googlegroups.com" }, +] +license = "Apache-2.0" +license-files = ["ACKNOWLEDGEMENTS", "AUTHORS", "LICENSE"] +readme = "README.md" +classifiers = [ + "Development Status :: 3 - Alpha", + "Programming Language :: Python", +] +requires-python = ">=3.10" + +[project.urls] +Documentation = "https://dfdatetime.readthedocs.io/en/latest" +Homepage = "https://github.com/log2timeline/dfdatetime" +Repository = "https://github.com/log2timeline/dfdatetime" + +[tool.setuptools.packages.find] +where = ["."] +include = ["dfdatetime"] +exclude = ["docs", "tests", "tests.*", "utils"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e90b5d57..00000000 --- a/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = dfdatetime -version = 20251124 -description = Digital Forensics date and time (dfDateTime). -long_description = dfDateTime, or Digital Forensics date and time, provides date and time objects to preserve accuracy and precision. -long_description_content_type = text/plain -url = https://github.com/log2timeline/dfdatetime -maintainer = Log2Timeline maintainers -maintainer_email = log2timeline-maintainers@googlegroups.com -license = Apache License, Version 2.0 -license_files = - ACKNOWLEDGEMENTS - AUTHORS - LICENSE - README -classifiers = - Development Status :: 3 - Alpha - Programming Language :: Python - -[options] -install_requires = file:requirements.txt -package_dir = - dfdatetime = dfdatetime -packages = find: -python_requires = >=3.10 - -[options.packages.find] -exclude = - docs - tests - tests.* - utils -where = . diff --git a/setup.py b/setup.py deleted file mode 100755 index 232fc4fe..00000000 --- a/setup.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -"""Installation and deployment script.""" - -from setuptools import setup - - -setup() diff --git a/test_requirements.txt b/test_requirements.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tox.ini b/tox.ini index c51b2469..3ac87166 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,6 @@ passenv = setenv = PYTHONPATH = {toxinidir} deps = - -rrequirements.txt - -rtest_requirements.txt coverage: coverage wheel: build @@ -43,10 +41,8 @@ passenv = setenv = PYTHONPATH = {toxinidir} deps = - -rrequirements.txt - -rtest_requirements.txt pylint >= 3.3.0, < 3.4.0 setuptools >= 65 commands = pylint --version - pylint --rcfile=.pylintrc dfdatetime setup.py tests + pylint --rcfile=.pylintrc dfdatetime tests From 72a635bdae39d06fbd5131a9d8e26eee1bfae425 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 25 Nov 2025 12:19:54 +0100 Subject: [PATCH 2/2] Migrated setup.cfg to pyproject.toml --- MANIFEST.in | 3 +-- config/dpkg/changelog | 4 ++-- dfdatetime/__init__.py | 2 +- utils/dependencies.py | 2 +- utils/update_release.sh | 10 +++++----- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 977870f7..3447ab69 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,5 @@ exclude *.pyc recursive-include config * recursive-exclude dfdatetime *.pyc # The test scripts are not required in a binary distribution package they -# are considered source distribution files and excluded in find_package() -# in setup.py. +# are considered source distribution files and excluded by find_package(). recursive-include tests *.py diff --git a/config/dpkg/changelog b/config/dpkg/changelog index ec5ebc3a..61415c98 100644 --- a/config/dpkg/changelog +++ b/config/dpkg/changelog @@ -1,5 +1,5 @@ -dfdatetime (20251124-1) unstable; urgency=low +dfdatetime (20251125-1) unstable; urgency=low * Auto-generated - -- Log2Timeline maintainers Mon, 24 Nov 2025 13:07:20 +0100 + -- Log2Timeline maintainers Tue, 25 Nov 2025 12:19:10 +0100 diff --git a/dfdatetime/__init__.py b/dfdatetime/__init__.py index 9ac1004b..c8fd7367 100644 --- a/dfdatetime/__init__.py +++ b/dfdatetime/__init__.py @@ -25,4 +25,4 @@ from dfdatetime import webkit_time -__version__ = '20251124' +__version__ = '20251125' diff --git a/utils/dependencies.py b/utils/dependencies.py index a2c40405..4767e851 100644 --- a/utils/dependencies.py +++ b/utils/dependencies.py @@ -26,7 +26,7 @@ class DependencyDefinition(object): skip_check (bool): True if the dependency should be skipped by the CheckDependencies or CheckTestDependencies methods of DependencyHelper. skip_requires (bool): True if the dependency should be excluded from - requirements.txt or setup.py install_requires. + pyproject.toml dependencies. version_property (str): name of the version attribute or function. """ diff --git a/utils/update_release.sh b/utils/update_release.sh index 286d9b44..86433f7f 100755 --- a/utils/update_release.sh +++ b/utils/update_release.sh @@ -3,16 +3,16 @@ # Script that makes changes in preparation of a new release, such as updating # the version and documentation. -EXIT_FAILURE=1; -EXIT_SUCCESS=0; +EXIT_FAILURE=1 +EXIT_SUCCESS=0 VERSION=$(date -u +"%Y%m%d") # Update the Python module version. sed "s/__version__ = '[0-9]*'/__version__ = '${VERSION}'/" -i dfdatetime/__init__.py -# Update the version in the setuptools configuration. -sed "s/version = [0-9]*/version = ${VERSION}/" -i setup.cfg +# Update the version in the pyproject configuration. +sed "s/version = \"[0-9]*\"/version = \"${VERSION}\"/" -i pyproject.toml # Ensure shebangs of Python scripts are consistent. find . -name \*.py -exec sed '1s?^#!.*$?#!/usr/bin/env python3?' -i {} \; @@ -31,5 +31,5 @@ EOT # Regenerate the API documentation. tox -edocs -exit ${EXIT_SUCCESS}; +exit ${EXIT_SUCCESS}