%global pypi_name mnamer Name: python-%{pypi_name} Version: 2.5.4 Release: %autorelease Summary: Media file renamer and organizion tool License: MIT URL: https://github.com/jkwill87/mnamer # PyPI doesn't include tests so use the github tarball instead Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: sed %global _description %{expand: mnamer (media renamer) is an intelligent and highly configurable media organization utility. It parses media filenames for metadata, searches the web to fill in the blanks, and then renames and moves them. Currently it has integration support with TVDb and TvMaze for television episodes and TMDb and OMDb for movies.} %description %_description %package -n %{pypi_name} Summary: %{summary} %description -n %{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} # Relax version pins sed -i requirements.txt \ -e 's:^guessit.*$:guessit:' \ -e 's:^teletype.*$:teletype:' \ %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check # Disable tests that require network access %pytest -m 'not network' -k 'not test_id and not test_no_matches_found and not test_complex_metadata and not test_absolute_path and not test_no_guess and not test_ignore and not test_multi_part_episode and not test_format_specifiers and not test_multiple_nested_directories and not test_format_id' %files -n %{pypi_name} -f %{pyproject_files} %license license.txt %doc readme.md %{_bindir}/%{pypi_name} %changelog %autochangelog