Skip to content

Commit

Permalink
Changes to use pyproject.toml and updated pylintrc to version 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Dec 28, 2023
1 parent d149aff commit 1ced24c
Show file tree
Hide file tree
Showing 14 changed files with 214 additions and 343 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential python3 python3-dev libbde-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libfwsi-python3 libhmac-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3-acstore python3-artifacts python3-cffi-backend python3-cryptography python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-distutils python3-dtfabric python3-idna python3-pytsk3 python3-pyxattr python3-setuptools python3-yaml
apt-get install -y build-essential python3 python3-dev libbde-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libfwsi-python3 libhmac-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3-acstore python3-artifacts python3-cffi-backend python3-cryptography python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-distutils python3-dtfabric python3-idna python3-pip python3-pytsk3 python3-pyxattr python3-setuptools python3-wheel python3-yaml
- name: Run tests
env:
LANG: en_US.UTF-8
Expand All @@ -69,6 +69,9 @@ jobs:
LANG: en_US.UTF-8
run: |
if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi
- name: Update setuptools
run: |
python3 -m pip install -U setuptools
- name: Build source distribution
run: |
python3 ./setup.py sdist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
include:
- python-version: '3.8'
- python-version: '3.11'
toxenv: 'docs'
container:
image: ubuntu:22.04
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
matrix:
include:
- python-version: '3.7'
toxenv: 'py37'
toxenv: 'py37,wheel'
- python-version: '3.8'
toxenv: 'py38'
toxenv: 'py38,wheel'
- python-version: '3.9'
toxenv: 'py39'
toxenv: 'py39,wheel'
- python-version: '3.10'
toxenv: 'py310'
toxenv: 'py310,wheel'
- python-version: '3.11'
toxenv: 'py311'
toxenv: 'py311,wheel'
- python-version: '3.12'
toxenv: 'py312,wheel'
container:
image: ubuntu:22.04
steps:
Expand Down Expand Up @@ -58,8 +60,8 @@ jobs:
strategy:
matrix:
include:
- python-version: '3.8'
toxenv: 'py38,coverage'
- python-version: '3.10'
toxenv: 'coverage'
container:
image: ubuntu:22.04
steps:
Expand Down
13 changes: 8 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pylint 2.17.x configuration file
# Pylint 3.0.x configuration file
#
# This file is generated by l2tdevtools update-dependencies.py, any dependency
# related changes should be made in dependencies.ini.
Expand Down Expand Up @@ -85,15 +85,14 @@ limit-inference-results=100

# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
# load-plugins=
load-plugins=pylint.extensions.docparams

# Pickle collected data for later comparisons.
persistent=yes

# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.11
py-version=3.12

# Discover python modules and packages in the file system subtree.
# recursive=no
Expand Down Expand Up @@ -441,6 +440,7 @@ confidence=HIGH,
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".

disable=assignment-from-none,
bad-inline-option,
consider-using-f-string,
Expand Down Expand Up @@ -468,6 +468,8 @@ disable=assignment-from-none,
too-many-return-statements,
too-many-statements,
unsubscriptable-object,
use-implicit-booleaness-not-comparison-to-string,
use-implicit-booleaness-not-comparison-to-zero,
useless-object-inheritance,
useless-suppression,
use-symbolic-message-instead
Expand Down Expand Up @@ -522,8 +524,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
# used to format the message information. See doc for all details.
msg-template=

# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# Set the output format. Available formats are: text, parseable, colorized,
# json2 (improved json format), json (old json format) and msvs (visual
# studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=

Expand Down
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/conf.py
fail_on_warning: false

python:
install:
- requirements: docs/requirements.txt
39 changes: 28 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
environment:
matrix:
- DESCRIPTION: "Windows with 32-bit Python 3.11"
- DESCRIPTION: "Run tests on Windows with 32-bit Python 3.11"
MACHINE_TYPE: "x86"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python311"
PYTHON_VERSION: "3.11"
L2TBINARIES_TRACK: "dev"
- DESCRIPTION: "Windows with 64-bit Python 3.11"
TARGET: tests
- DESCRIPTION: "Run tests on Windows with 64-bit Python 3.11"
MACHINE_TYPE: "amd64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11"
L2TBINARIES_TRACK: "dev"
- DESCRIPTION: "Mac OS with Python 3.11"
TARGET: tests
- DESCRIPTION: "Build wheel on Windows with 32-bit Python 3.11"
MACHINE_TYPE: "amd64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11"
L2TBINARIES_TRACK: "dev"
TARGET: wheel
- DESCRIPTION: "Build wheel on Windows with 64-bit Python 3.11"
MACHINE_TYPE: "amd64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11"
L2TBINARIES_TRACK: "dev"
TARGET: wheel
- DESCRIPTION: "Run tests on Mac OS with Python 3.11"
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
TARGET: tests

install:
- cmd: "%PYTHON%\\python.exe -m pip install -U pip setuptools twine wheel"
- cmd: "%PYTHON%\\python.exe -m pip install pywin32 WMI"
- cmd: "%PYTHON%\\python.exe %PYTHON%\\Scripts\\pywin32_postinstall.py -install"
- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools twine wheel"
- ps: If ($isWindows) { .\config\appveyor\install.ps1 }
- sh: config/appveyor/install.sh

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

test_script:
- cmd: "%PYTHON%\\python.exe run_tests.py"
- cmd: IF EXIST "tests\\end-to-end.py" (
set PYTHONPATH=. &&
"%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" )
- 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" ) )
- sh: config/appveyor/runtests.sh

artifacts:
Expand Down
2 changes: 1 addition & 1 deletion config/appveyor/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If ($Dependencies.Length -gt 0)

$env:PYTHONPATH = "..\l2tdevtools"

$Output = Invoke-Expression -Command "& '${env:PYTHON}\python.exe' ..\l2tdevtools\tools\update.py --download-directory dependencies --machine-type ${env:MACHINE_TYPE} --msi-targetdir ${env:PYTHON} --track ${env:L2TBINARIES_TRACK} ${Dependencies} 2>&1" | %{ "$_" }
$Output = Invoke-Expression -Command "& '${env:PYTHON}\python.exe' ..\l2tdevtools\tools\update.py --download-directory dependencies --machine-type ${env:MACHINE_TYPE} --track ${env:L2TBINARIES_TRACK} ${Dependencies} 2>&1" | %{ "$_" }
Write-Host (${Output} | Out-String)
}

3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
certifi >= 2023.11.17
docutils
Markdown
recommonmark
sphinx >= 4.1.0, < 5.2.0
sphinx >= 4.1.0
sphinx-markdown-tables
sphinx-rtd-theme >= 0.5.1
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pip >= 7.0.0
PyYAML >= 3.10
acstore >= 20230101
artifacts >= 20220219
Expand Down
152 changes: 106 additions & 46 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
[metadata]
license_files = LICENSE
name = winregrc
version = 20231228
description = Windows Registry resources (winregrc)
long_description = winregrc is a Python module part of winreg-kb to allow reuse of Windows Registry resources.
long_description_content_type = text/plain
url = https://github.com/libyal/winreg-kb
maintainer = Joachim Metz
maintainer_email = joachim.metz@gmail.com
license = Apache License, Version 2.0
license_files =
ACKNOWLEDGEMENTS
AUTHORS
LICENSE
README
classifiers =
Development Status :: 2 - Pre-Alpha
Programming Language :: Python

[options]
install_requires = file:requirements.txt
package_dir =
winregrc = winregrc
packages = find:
python_requires = >=3.7
scripts =
scripts/appcompatcache.py
scripts/application_identifiers.py
scripts/cached_credentials.py
scripts/catalog.py
scripts/environment_variables.py
scripts/eventlog_providers.py
scripts/knownfolders.py
scripts/mounted_devices.py
scripts/mru.py
scripts/msie_zone_info.py
scripts/profiles.py
scripts/programscache.py
scripts/sam.py
scripts/services.py
scripts/shellfolders.py
scripts/srum_extensions.py
scripts/sysinfo.py
scripts/syskey.py
scripts/task_cache.py
scripts/time_zones.py
scripts/type_libraries.py
scripts/usbstor.py
scripts/userassist.py

[options.package_data]
winregrc =
*.yaml

[options.packages.find]
exclude =
docs
tests
tests.*
utils
where = .

[sdist]
template = MANIFEST.in
Expand All @@ -12,52 +71,53 @@ manifest = MANIFEST.test_data
[bdist_rpm]
release = 1
packager = Joachim Metz <joachim.metz@gmail.com>
doc_files = ACKNOWLEDGEMENTS
AUTHORS
LICENSE
README
doc_files =
ACKNOWLEDGEMENTS
AUTHORS
LICENSE
README
build_requires = python3-setuptools
requires = libbde-python3 >= 20220121
libcreg-python3 >= 20200725
libewf-python3 >= 20131210
libfcrypto-python3 >= 20221229
libfsapfs-python3 >= 20201107
libfsext-python3 >= 20220112
libfsfat-python3 >= 20220816
libfshfs-python3 >= 20220115
libfsntfs-python3 >= 20211229
libfsxfs-python3 >= 20220113
libfvde-python3 >= 20220121
libfwnt-python3 >= 20210717
libfwsi-python3 >= 20150606
libhmac-python3 >= 20230205
libluksde-python3 >= 20220121
libmodi-python3 >= 20210405
libphdi-python3 >= 20220110
libqcow-python3 >= 20201213
libregf-python3 >= 20201002
libsigscan-python3 >= 20230109
libsmdev-python3 >= 20140529
libsmraw-python3 >= 20140612
libvhdi-python3 >= 20201014
libvmdk-python3 >= 20140421
libvsgpt-python3 >= 20211115
libvshadow-python3 >= 20160109
libvslvm-python3 >= 20160109
python3-acstore >= 20230101
python3-artifacts >= 20220219
python3-cffi >= 1.9.1
python3-cryptography >= 2.0.2
python3-dfdatetime >= 20221112
python3-dfimagetools >= 20220129
python3-dfvfs >= 20221224
python3-dfwinreg >= 20211207
python3-dtfabric >= 20220219
python3-idna >= 2.5
python3-pytsk3 >= 20210419
python3-pyxattr >= 0.7.2
python3-pyyaml >= 3.10
requires =
libbde-python3 >= 20220121
libcreg-python3 >= 20200725
libewf-python3 >= 20131210
libfcrypto-python3 >= 20221229
libfsapfs-python3 >= 20201107
libfsext-python3 >= 20220112
libfsfat-python3 >= 20220816
libfshfs-python3 >= 20220115
libfsntfs-python3 >= 20211229
libfsxfs-python3 >= 20220113
libfvde-python3 >= 20220121
libfwnt-python3 >= 20210717
libfwsi-python3 >= 20150606
libhmac-python3 >= 20230205
libluksde-python3 >= 20220121
libmodi-python3 >= 20210405
libphdi-python3 >= 20220110
libqcow-python3 >= 20201213
libregf-python3 >= 20201002
libsigscan-python3 >= 20230109
libsmdev-python3 >= 20140529
libsmraw-python3 >= 20140612
libvhdi-python3 >= 20201014
libvmdk-python3 >= 20140421
libvsgpt-python3 >= 20211115
libvshadow-python3 >= 20160109
libvslvm-python3 >= 20160109
python3-acstore >= 20230101
python3-artifacts >= 20220219
python3-cffi >= 1.9.1
python3-cryptography >= 2.0.2
python3-dfdatetime >= 20221112
python3-dfimagetools >= 20220129
python3-dfvfs >= 20221224
python3-dfwinreg >= 20211207
python3-dtfabric >= 20220219
python3-idna >= 2.5
python3-pytsk3 >= 20210419
python3-pyxattr >= 0.7.2
python3-pyyaml >= 3.10

[bdist_wheel]
universal = 1

0 comments on commit 1ced24c

Please sign in to comment.