Package Details: deptry 0.23.0-1

Git Clone URL: https://aur.archlinux.org/deptry.git (read-only, click to copy)
Package Base: deptry
Description: Find unused, missing and transitive dependencies in a Python project
Upstream URL: https://github.com/fpgmaas/deptry
Licenses: MIT
Submitter: carsme
Maintainer: carsme
Last Packager: carsme
Votes: 1
Popularity: 0.001305
First Submitted: 2024-03-16 15:40 (UTC)
Last Updated: 2025-01-28 18:47 (UTC)

Latest Comments

yochananmarqos commented on 2025-01-29 02:16 (UTC)

@carsme: The tests pass in a clean chroot, however if one builds with makepkg and happens to have python-beautifulsoup4 installed, they fail for some reason:

========================================== FAILURES ==========================================
_______________________________________ test_top_level _______________________________________

    def test_top_level() -> None:
        # Test if no error is raised, argument is accepted.
        dependency = Dependency("beautifulsoup4", Path("pyproject.toml"))
        dependency.top_levels = {"bs4"}
        module = ModuleBuilder("bs4", {"foo", "bar"}, frozenset(), [dependency]).build()
>       assert module.package is None
E       AssertionError: assert 'bs4' is None
E        +  where 'bs4' = Module 'bs4'.package

tests/unit/test_module.py:25: AssertionError
================================== short test summary info ===================================
FAILED tests/unit/test_module.py::test_top_level - AssertionError: assert 'bs4' is None
================== 1 failed, 184 passed, 1 skipped, 1 deselected in 57.16s ===================

¯\_(ツ)_/¯

yochananmarqos commented on 2024-03-19 16:05 (UTC)

@carsme: Ah, you're right about the dependencies. Not sure how I missed that.

carsme commented on 2024-03-19 15:58 (UTC)

@yochananmarqos I'm afraid I cannot reproduce the issue with installer. Regarding the deps, from looking at pyproject.toml I believe the following is the case:

  • colorama is only needed on Windows.
  • tomli is only needed for Python < 3.11.

They are unfortunately still reported as missing by namcap.

yochananmarqos commented on 2024-03-19 01:16 (UTC) (edited on 2024-03-19 01:18 (UTC) by yochananmarqos)

@carsme: For some reason the Python module is not being installed by Installer. I added this to the package() function to compensate for now:

local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cp -vr "python/$pkgname"/* "${pkgdir}${site_packages}/$pkgname/"

It's also missing dependencies on python-colorama & python-tomli.