2025-02-10 13:52:30 +00:00
|
|
|
#
|
2025-02-10 14:00:51 +00:00
|
|
|
# spec file for package python-fawltydeps
|
2025-02-10 13:52:30 +00:00
|
|
|
#
|
2025-08-15 08:32:52 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
2025-02-10 13:52:30 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2025-08-15 08:48:48 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
2025-02-10 13:52:30 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
|
|
|
Name: python-fawltydeps
|
- update to 0.20.0:
* When FawltyDeps finds a 3rd-party `import` that is not
declared, it will output that import name as an undeclared
dependency. But as we've talked about before, _import_ names
in Python are not necessarily synonymous with the _package_
names that you would have to declare in order to make those
import names available.
* For example, if you `import sklearn` in your code, it might
not be obvious that the corresponding dependency declaration
should be `scikit-learn`, and not `sklearn`.
* Starting with this version, if you run FawltyDeps with the
`--detailed` option, _and_ if there happens to be one or more
(undeclared) packages in your Python environment that provide
the relevant import name, then FawltyDeps will suggest these
packages as potential solutions to your undeclared
dependency.
* By default (and before this release) FawltyDeps looks at the
paths on the command-line to deduce where 1st-party imports
(i.e. your project's own modules) can be found. In some
corner cases this deduction fails, and the result is
typically that a 1st-party import is flagged by FawltyDeps as
an undeclared dependency.
* The new `--base-dir` allows you to control where FawltyDeps
looks for 1st-party imports, and it can help fix those cases
where the default deduction fails, for example in cases where
you are passing individual file names (instead of directory
names) on the FawltyDeps command line.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fawltydeps?expand=0&rev=9
2025-07-13 12:16:48 +00:00
|
|
|
Version: 0.20.0
|
2025-02-10 13:52:30 +00:00
|
|
|
Release: 0
|
2025-02-10 14:48:10 +00:00
|
|
|
Summary: Find undeclared and unused 3rd-party dependencies in your Python project
|
2025-02-10 13:52:30 +00:00
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/tweag/FawltyDeps
|
|
|
|
Source: https://github.com/tweag/FawltyDeps/archive/refs/tags/v%{version}.tar.gz#/fawltydeps-%{version}.tar.gz
|
2025-02-10 14:00:51 +00:00
|
|
|
BuildRequires: %{python_module PyYAML >= 6.0.1}
|
2025-08-15 08:48:48 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.9.2}
|
2025-02-10 13:52:30 +00:00
|
|
|
BuildRequires: %{python_module importlib-metadata >= 6.6.0}
|
|
|
|
BuildRequires: %{python_module isort > 5.10}
|
2025-02-10 14:00:51 +00:00
|
|
|
BuildRequires: %{python_module nox}
|
2025-02-10 13:52:30 +00:00
|
|
|
BuildRequires: %{python_module packaging >= 24.0}
|
|
|
|
BuildRequires: %{python_module pip-requirements-parser >= 32.0.1}
|
2025-02-10 14:00:51 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2025-02-10 14:43:52 +00:00
|
|
|
BuildRequires: %{python_module poetry-core}
|
2025-02-10 13:52:30 +00:00
|
|
|
BuildRequires: %{python_module pydantic >= 1.10.4}
|
2025-02-10 14:00:51 +00:00
|
|
|
BuildRequires: fdupes
|
2025-08-15 08:48:48 +00:00
|
|
|
# Section TEST dependencies
|
|
|
|
BuildRequires: %{python_module pytest >= 7.1.0}
|
|
|
|
BuildRequires: %{python_module hypothesis}
|
|
|
|
#
|
2025-02-10 14:48:00 +00:00
|
|
|
Requires: python-PyYAML >= 6.0.1
|
|
|
|
Requires: python-importlib-metadata >= 6.6.0
|
|
|
|
Requires: python-isort > 5.10
|
2025-08-15 08:32:52 +00:00
|
|
|
Requires: python-packaging
|
2025-02-10 13:52:30 +00:00
|
|
|
Requires: python-pip-requirements-parser
|
2025-08-15 08:32:52 +00:00
|
|
|
Requires: python-pydantic
|
2025-08-15 08:48:48 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
Requires: alts
|
|
|
|
BuildRequires: alts
|
|
|
|
%else
|
2025-02-10 13:52:30 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2025-08-15 08:48:48 +00:00
|
|
|
%endif
|
2025-02-10 14:00:51 +00:00
|
|
|
Suggests: python-uv
|
2025-02-10 13:52:30 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Find undeclared and unused 3rd-party dependencies in your Python project.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n FawltyDeps-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
%install
|
|
|
|
%pyproject_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/fawltydeps
|
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
|
|
|
|
|
|
|
%check
|
|
|
|
# integration testsuite requires network for downloading project tarballs
|
|
|
|
# disable tests that require network
|
|
|
|
skiptests="test_resolve_dependencies_install_deps__via_local_cache"
|
|
|
|
skiptests+=" or test_resolve_dependencies_install_deps__raises_unresolved_error_on_install_failure"
|
|
|
|
skiptests+=" or test_resolve_dependencies_install_deps__unresolved_error_only_warns_failing_packages"
|
|
|
|
skiptests+=" or test_resolve_dependencies_install_deps_on_mixed_packages__raises_unresolved_error"
|
|
|
|
skiptests+=" or test_resolve_dependencies__generates_expected_mappings"
|
|
|
|
%pytest -k "not ($skiptests)"
|
|
|
|
|
2025-08-15 08:48:48 +00:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative fawltydeps
|
|
|
|
|
2025-02-10 13:52:30 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative fawltydeps
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative fawltydeps
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/fawltydeps
|
|
|
|
%{python_sitelib}/fawltydeps
|
|
|
|
%{python_sitelib}/fawltydeps-%{version}.dist-info
|
|
|
|
|
|
|
|
%changelog
|