%global forgeurl https://github.com/gatagat/lap/ %global commit 600c210d9bef793ee0fe502cbc350e676a6e083a %global _description %{expand: This package provides the 'lap' Python library, a Linear Assignment Problem solver using the Jonker-Volgenant algorithm. It is required by applications like Beets for efficient tag matching.} Name: python-lap Version: 0.5.12 Release: %autorelease Summary: Linear Assignment Problem solver for Python License: BSD-2-Clause %{forgemeta} URL: %{forgeurl} Source0: %{forgesource} BuildRequires: python3-devel BuildRequires: gcc-c++ BuildRequires: tox %description %_description This package provides the 'lap' Python library, a Linear Assignment Problem solver using the Jonker-Volgenant algorithm. It is required by applications like Beets for efficient tag matching. %package -n python3-lap Summary: $(Summary) %description -n python3-lap %_description %generate_buildrequires %pyproject_buildrequires -t %prep %{forgesetup} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l lap %check %pyproject_check_import -t # Set up test environment %py3_test_envvars # Clean up any pytest-specific environment variables unset PYTEST_ADDOPTS unset PYTEST_XDIST_AUTO_NUM_WORKERS # Run tests directly from the installed location cd %{buildroot} %{python3} -c "import lap.tests.test_lapmod" %{python3} -c "import lap.tests.test_lapjv" %{python3} -c "import lap.tests.test_arr_loop" %{python3} -c "import lap.tests.test_simple" %{python3} -c "import lap.tests.test_utils" %files -n python3-lap -f %{pyproject_files} %changelog %autochangelog