diff -pruN 0.4.0-3/.github/dependabot.yml 0.4.1-1/.github/dependabot.yml
--- 0.4.0-3/.github/dependabot.yml	1970-01-01 00:00:00.000000000 +0000
+++ 0.4.1-1/.github/dependabot.yml	2025-05-31 21:19:12.000000000 +0000
@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
diff -pruN 0.4.0-3/.github/workflows/lint.yml 0.4.1-1/.github/workflows/lint.yml
--- 0.4.0-3/.github/workflows/lint.yml	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/.github/workflows/lint.yml	1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-name: Lint
-
-on:
-  pull_request:
-    branches:
-      - master
-
-jobs:
-  lint-pre-commit:
-    runs-on: ubuntu-latest
-    name: Run pre-commit
-    steps:
-    - uses: actions/checkout@v4
-    - name: Set up Python
-      uses: actions/setup-python@v5
-      with:
-        python-version: "3.12"
-    - name: Run pre-commit
-      run: |
-        pip install pre-commit
-        pre-commit run -a --show-diff-on-failure
diff -pruN 0.4.0-3/.github/workflows/tests.yml 0.4.1-1/.github/workflows/tests.yml
--- 0.4.0-3/.github/workflows/tests.yml	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/.github/workflows/tests.yml	2025-05-31 21:19:12.000000000 +0000
@@ -15,18 +15,23 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-20.04, ubuntu-22.04]
+        os: [ubuntu-22.04, ubuntu-24.04]
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Install System Python
         run: |
-          sudo apt install python3-dev python3-pip
+          sudo apt install python3-dev python3-pip python3-venv
+      - name: Build venv
+        run: |
+          python -m venv .venv
+          . .venv/bin/activate
+          echo PATH=$PATH >> $GITHUB_ENV
       - name: Install Testing Requirements
         run: python3 -m pip install nox
       - name: Run Tests
         run: python3 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -40,9 +45,9 @@ jobs:
         os: [windows-latest, macos-latest, ubuntu-latest]
     steps:
       - name: Checkout project
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
       - name: Install Python
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           python-version: '3.x'
       - name: Install Testing Requirements
@@ -50,7 +55,7 @@ jobs:
       - name: Run tests
         run: python -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -66,8 +71,8 @@ jobs:
       matrix:
         os: [ubuntu-latest, windows-latest, macos-latest]
     steps:
-      - uses: actions/checkout@v3
-      - uses: conda-incubator/setup-miniconda@v2
+      - uses: actions/checkout@v4
+      - uses: conda-incubator/setup-miniconda@v3
         with:
           auto-update-conda: true
           auto-activate-base: true
@@ -77,25 +82,11 @@ jobs:
       - name: Run Tests
         run: python -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
 
-  rhel7:
-    name: rhel7-system-python
-    runs-on: ubuntu-latest
-    container: "centos:7"
-    steps:
-      - name: Install System Python and Git
-        run: yum install -y python3-devel python3-pip python3 git
-      - uses: actions/checkout@v3
-      - name: Install Testing Requirements
-        run: python3 -m pip install nox
-      - name: Run Tests
-        run: python3 -m nox -e tests
-      # we don't upload coverage here because codecov's uploader doesn't support OS's this old
-
   rhel8-system-python:
     name: rhel8-system-python
     runs-on: ubuntu-latest
@@ -103,13 +94,13 @@ jobs:
     steps:
       - name: Install System Python and Git
         run: yum install -y python3-devel python3-pip python3 git
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Install Testing Requirements
         run: python3 -m pip install nox
       - name: Run Tests
         run: python3 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -121,13 +112,13 @@ jobs:
     steps:
       - name: Install Python 3.8 and Git from AppStream
         run: yum install -y python38-devel python38-pip python38-pip-wheel python38 git
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Install Testing Requirements
         run: python3.8 -m pip install nox
       - name: Run Tests
         run: python3.8 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -139,13 +130,13 @@ jobs:
     steps:
       - name: Install Python 3.9 and Git from AppStream
         run: yum install -y python39-devel python39-pip python39-pip-wheel python39 git
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Install Testing Requirements
         run: python3.9 -m pip install nox
       - name: Run Tests
         run: python3.9 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -157,13 +148,13 @@ jobs:
     steps:
       - name: Install System Python and Git
         run: yum install -y python3-devel python3-pip python3 git
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Install Testing Requirements
         run: python3 -m pip install nox
       - name: Run Tests
         run: python3 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -179,56 +170,28 @@ jobs:
       matrix:
         msystem:
           - MSYS
+          - MINGW32
           - MINGW64
+          - UCRT64
     steps:
-      - name: Install msys2 (MINGW64)
-        if: matrix.msystem == 'MINGW64'
+      - name: Install msys2
         uses: msys2/setup-msys2@v2
         with:
-          msystem: MINGW64
-          install: >-
-            mingw-w64-x86_64-toolchain
-            mingw-w64-x86_64-python
-            mingw-w64-x86_64-python-pip
-            mingw-w64-x86_64-python-setuptools
-            mingw-w64-x86_64-python-wheel
+          msystem: ${{ matrix.msystem }}
+          pacboy: >-
+            gnupg
+            python:p
+            python-pip:p
           update: true
-      - name: Install msys2 (MSYS)
-        if: matrix.msystem == 'MSYS'
-        uses: msys2/setup-msys2@v2
-        with:
-          msystem: MSYS
-          install: >-
-            msys2-devel
-            git
-            python
-            python-devel
-            python-pip
-            python-setuptools
-          update: true
-      - name: Install wheel package (MSYS)
-        if: matrix.msystem == 'MSYS'
-        run: pip install --no-build-isolation wheel
-      - uses: actions/checkout@v3
-      - name: Install package
-        run: pip install --no-build-isolation .
-      - name: Print libpython
-        run: |
-          echo 'NAMES'
-          find_libpython -v --candidate-names
-          echo 'PATHS'
-          find_libpython -v --candidate-paths
-          echo 'LOCATION'
-          find_libpython -v
-      - name: Install Testing Requirements
-        run: pip install --no-build-isolation pytest pytest-cov
-      - name: Run Tests
+      - uses: actions/checkout@v4
+      - name: Run tests
         run: |
-          pytest --cov --cov-branch tests/
-          pytest --cov --cov-branch --cov-append --doctest-modules $(python -c 'import find_libpython; print(find_libpython.__file__)')
-          coverage xml -o coverage.xml
+          python -m venv .venv
+          . .venv/bin/activate
+          pip install nox
+          nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -244,17 +207,17 @@ jobs:
           apk upgrade
       - name: Install System Python and Git
         run: |
-          apk add python3 python3-dev py3-pip py3-nox git
+          apk add python3 python3-dev py3-pip py3-nox py3-attrs git
       - name: Download Source
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
       - name: Run Tests
         run: |
           nox -e tests
-      # - name: Upload to codecov
-      #   uses: codecov/codecov-action@v4
-      #   with:
-      #     token: ${{ secrets.CODECOV_TOKEN }}
-      #     verbose: true
+      - name: Upload to codecov
+        uses: codecov/codecov-action@v4
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          verbose: true
 
   homebrew:
     name: homebrew-system-python
@@ -264,7 +227,12 @@ jobs:
         run: |
           brew install python git
       - name: Download Source
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
+      - name: Build venv
+        run: |
+          python3 -m venv .venv
+          . .venv/bin/activate
+          echo PATH=$PATH >> $GITHUB_ENV
       - name: Install Testing Requirements
         run: |
           python3 -m pip install nox
@@ -272,7 +240,7 @@ jobs:
         run: |
           python3 -m nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
@@ -288,7 +256,7 @@ jobs:
         run: |
           pacman --noconfirm -Sy python python-pip git
       - name: Download Source
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
       - name: Create and activate environment
         run: |
           python -m venv .venv
@@ -301,7 +269,7 @@ jobs:
         run: |
           nox -e tests
       - name: Upload to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           verbose: true
diff -pruN 0.4.0-3/.pre-commit-config.yaml 0.4.1-1/.pre-commit-config.yaml
--- 0.4.0-3/.pre-commit-config.yaml	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/.pre-commit-config.yaml	2025-05-31 21:19:12.000000000 +0000
@@ -1,22 +1,38 @@
+repos:
 
+- repo: "https://github.com/pre-commit/pre-commit-hooks"
+  rev: v5.0.0
+  hooks:
+  - id: trailing-whitespace
+  - id: end-of-file-fixer
+  - id: mixed-line-ending
+    args:
+      - --fix=lf
+  - id: fix-byte-order-marker
+  - id: check-merge-conflict
+
+- repo: https://github.com/henryiii/validate-pyproject-schema-store
+  rev: "2025.05.12"
+  hooks:
+    - id: validate-pyproject
+
+- repo: https://github.com/codespell-project/codespell
+  rev: v2.4.1
+  hooks:
+  - id: codespell
+    additional_dependencies:
+    - tomli
 
-repos:
 - repo: https://github.com/astral-sh/ruff-pre-commit
-  rev: "v0.3.2"
+  rev: v0.11.11
   hooks:
     # Run the linter.
-    - id: "ruff"
+    - id: ruff-check
       args:
-      - "--fix"
-      - "--exit-non-zero-on-fix"
+      - --fix
+      - --exit-non-zero-on-fix
     # Run the formatter.
     - id: ruff-format
 
-- repo: "https://github.com/pre-commit/pre-commit-hooks"
-  rev: "v4.5.0"
-  hooks:
-  - id: "trailing-whitespace"
-  - id: "mixed-line-ending"
-    args:
-    - "--fix=lf"
-  - id: "end-of-file-fixer"
+ci:
+  autofix_prs: false
diff -pruN 0.4.0-3/debian/changelog 0.4.1-1/debian/changelog
--- 0.4.0-3/debian/changelog	2024-07-28 04:37:31.000000000 +0000
+++ 0.4.1-1/debian/changelog	2025-09-30 14:08:30.000000000 +0000
@@ -1,3 +1,12 @@
+find-libpython (0.4.1-1) unstable; urgency=medium
+
+  * New upstream version 0.4.1
+  * Drop redundant Rules-Requires-Root field
+  * d/control: update standards version to 4.7.2
+  * Update copyright years
+
+ -- أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>  Tue, 30 Sep 2025 16:08:30 +0200
+
 find-libpython (0.4.0-3) unstable; urgency=medium
 
   * d/control: add libpython3-dev to python3-find-libpython dependencies
diff -pruN 0.4.0-3/debian/control 0.4.1-1/debian/control
--- 0.4.0-3/debian/control	2024-07-28 04:37:31.000000000 +0000
+++ 0.4.1-1/debian/control	2025-09-30 14:08:30.000000000 +0000
@@ -11,10 +11,9 @@ Build-Depends:
  python3-all,
  python3-setuptools,
  python3-setuptools-scm,
-Standards-Version: 4.6.2.0
+Standards-Version: 4.7.2
 Testsuite: autopkgtest-pkg-pybuild
 Homepage: https://github.com/ktbarrett/find_libpython
-Rules-Requires-Root: no
 Vcs-Git: https://salsa.debian.org/python-team/packages/find-libpython.git
 Vcs-Browser: https://salsa.debian.org/python-team/packages/find-libpython
 
diff -pruN 0.4.0-3/debian/copyright 0.4.1-1/debian/copyright
--- 0.4.0-3/debian/copyright	2024-07-28 04:37:31.000000000 +0000
+++ 0.4.1-1/debian/copyright	2025-09-30 14:08:30.000000000 +0000
@@ -9,7 +9,7 @@ Copyright: 2018, Takafumi Arakaki
 License: MIT
 
 Files: debian/*
-Copyright: 2023-2024 أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>
+Copyright: 2023-2025 أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>
 License: MIT
 
 License: MIT
diff -pruN 0.4.0-3/debian/gitlab-ci.yml 0.4.1-1/debian/gitlab-ci.yml
--- 0.4.0-3/debian/gitlab-ci.yml	2024-07-28 04:37:31.000000000 +0000
+++ 0.4.1-1/debian/gitlab-ci.yml	2025-09-30 14:08:30.000000000 +0000
@@ -4,4 +4,3 @@ include:
 
 variables:
  RELEASE: 'unstable'
- SALSA_CI_DISABLE_APTLY: 0
diff -pruN 0.4.0-3/noxfile.py 0.4.1-1/noxfile.py
--- 0.4.0-3/noxfile.py	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/noxfile.py	2025-05-31 21:19:12.000000000 +0000
@@ -10,7 +10,7 @@ coverage_file = "coverage.xml"
 @nox.session
 def tests(session):
     # install current module and runtime dependencies
-    session.install(".")
+    session.install("-e", ".")
 
     # install testing dependencies
     session.install(*test_reqs)
diff -pruN 0.4.0-3/src/find_libpython/__init__.py 0.4.1-1/src/find_libpython/__init__.py
--- 0.4.0-3/src/find_libpython/__init__.py	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/src/find_libpython/__init__.py	2025-05-31 21:19:12.000000000 +0000
@@ -251,6 +251,9 @@ def candidate_paths(suffix=_SHLIB_SUFFIX
     _append_truthy(lib_dirs, _get_config_var("LIBPL"))
     _append_truthy(lib_dirs, _get_config_var("srcdir"))
     _append_truthy(lib_dirs, _get_config_var("LIBDIR"))
+    if _is_windows or _is_mingw or _is_cygwin:
+        # On Windows DLLs go in bin/ while static libraries go in lib/
+        _append_truthy(lib_dirs, _get_config_var("BINDIR"))
 
     # LIBPL seems to be the right config_var to use.  It is the one
     # used in python-config when shared library is not enabled:
@@ -312,7 +315,7 @@ def _normalize_path(path, suffix=_SHLIB_
 
     Parameters
     ----------
-    path : str ot None
+    path : str or None
         A candidate path to a shared library.
     """
     if not path:
@@ -414,11 +417,11 @@ def _cli_find_libpython(cli_op, verbose)
 
 
 def _log_platform_info():
-    _logger.debug("_is_windows = %s", _is_windows)
-    _logger.debug("_is_apple = %s", _is_apple)
-    _logger.debug("_is_mingw = %s", _is_mingw)
-    _logger.debug("_is_msys = %s", _is_cygwin)
-    _logger.debug("_is_posix = %s", _is_posix)
+    print(f"is_windows = {_is_windows}")
+    print(f"is_apple = {_is_apple}")
+    print(f"is_mingw = {_is_mingw}")
+    print(f"is_msys = {_is_cygwin}")
+    print(f"is_posix = {_is_posix}")
 
 
 def main(args=None):
diff -pruN 0.4.0-3/src/find_libpython/_version.py 0.4.1-1/src/find_libpython/_version.py
--- 0.4.0-3/src/find_libpython/_version.py	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/src/find_libpython/_version.py	2025-05-31 21:19:12.000000000 +0000
@@ -1 +1 @@
-__version__ = "0.4.0"
+__version__ = "0.4.1"
diff -pruN 0.4.0-3/tests/test_find_libpython.py 0.4.1-1/tests/test_find_libpython.py
--- 0.4.0-3/tests/test_find_libpython.py	2024-03-13 16:58:39.000000000 +0000
+++ 0.4.1-1/tests/test_find_libpython.py	2025-05-31 21:19:12.000000000 +0000
@@ -2,6 +2,7 @@ import ctypes
 import sys
 
 import pytest
+
 from find_libpython import (
     _get_proc_library,
     _is_cygwin,
