File python-netutils.spec of Package failed_python-netutils
```spec
#
# spec file for package python-netutils
#
# Copyright (c) 2025 SUSE LLC
#
# 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.
%define modname netutils
Name: python-netutils
Version: 1.8.1
Release: 1.1
Summary: Network utilities for Python
License: MIT
URL: https://github.com/networktocode/netutils
Source0: %{modname}-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-passlib # Added dependency for passlib
Requires: python3-passlib # Added runtime dependency for passlib
%description
Python-netutils is a collection of utilities for working with network devices and data.
%prep
%setup -q -n %{modname}-%{version}
%build
%pyproject_build
%install
%pyproject_install
%check
export PYTHONPATH=%{buildroot}%{python3_sitelib}
pytest-%{python3_version} --ignore=_build.python311 --ignore=_build.python312 --ignore=_build.python313 -v -k 'not (test_is_fqdn_resolvable or test_fqdn_to_ip or test_tcp_ping or test_sphinx_build)'
%files
%license LICENSE
%doc README.md CHANGELOG.md
%{python3_sitelib}/%{modname}
%{python3_sitelib}/%{modname}*.egg-info
%changelog
* Fri Aug 08 2025 Your Name <your.email@example.com> - 1.8.1-1.1
- Fixed compatibility with Python 3.13 by replacing 'crypt' module with 'passlib'.
- Added 'python3-passlib' as a build and runtime dependency.
```
---
### Explanation of Changes:
1. **`netutils/password.py`:**
- Replaced the deprecated `crypt` module with `passlib.hash`, which provides equivalent functionality for hashing and verifying passwords.
- Updated the functions to use `passlib` methods (`md5_crypt` and `sha256_crypt`) for Cisco Type 5 and Type 9 encryption.
2. **`python-netutils.spec`:**
- Added `python3-passlib` as both a `BuildRequires` and `Requires` dependency to ensure the library is available during the build and at runtime.
### Next Steps:
After applying these changes, rebuild the package using the same build environment. The issue should be resolved, and the `%check` phase should complete successfully.