## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname scrape-schema-recipe %global forgeurl https://github.com/micahcochran/scrape-schema-recipe Version: 0.2.2 %global tag %{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Scrape recipes from HTML into Python dictionaries License: Apache-2.0 URL: %{forgeurl} # Prepare source offline to not include files with proprietary licenses Source0: %{srcname}-cleaned-%{version}.tar.gz Source1: prepare.sh # Modify function not to return names of removed files Patch: example-names.patch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildArch: noarch %global _description %{expand: Scrapes recipes from HTML https://schema.org/Recipe (Microdata/JSON-LD) into Python dictionaries.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p 1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files scrape_schema_recipe -l %check %pyproject_check_import # Do not run tests that require network access and # that cannot use data that cannot be redistributed # in Fedora sed -i 's/DISABLE_NETWORK_TESTS = False/DISABLE_NETWORK_TESTS = True/g'\ test_scrape.py k="${k-}${k+ and }not TestUnsetTimeDate" k="${k-}${k+ and }not TestTypeList" k="${k-}${k+ and }not (TestEscaping and test_unescape_ingredients)" k="${k-}${k+ and }not (TestEscaping and test_unescape_name_description)" k="${k-}${k+ and }not (TestLoads and test_loads)" k="${k-}${k+ and }not (TestUnMigratedSchema and test_recipe1)" k="${k-}${k+ and }not (TestUnMigratedSchema and test_recipe2)" k="${k-}${k+ and }not (TestExampleOutput and test_example_output)" k="${k-}${k+ and }not (TestGraph and test_graph)" k="${k-}${k+ and }not (TestParsingFileMicroData and test_name)" k="${k-}${k+ and }not (TestParsingFileMicroData and test_num_recipes)" k="${k-}${k+ and }not (TestParsingFileMicroData and test_recipe_keys)" k="${k-}${k+ and }not (TestParsingFileMicroData and test_recipe_yield)" k="${k-}${k+ and }not (TestParsingFileMicroData and test_totalTime_sum)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_category)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_duration)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_ingredients)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_instructions)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_name)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_num_recipes)" k="${k-}${k+ and }not (TestParsingFileLDJSON and test_recipe_keys)" k="${k-}${k+ and }not (TestTimeDelta and test_timedelta)" k="${k-}${k+ and }not (TestTimeDelta and test_totalTime_sum)" k="${k-}${k+ and }not (TestDateTime and test_datetime_tz_python_obj)" k="${k-}${k+ and }not (TestDateTime and test_datetime_tz_python_obj_isodate)" k="${k-}${k+ and }not (TestDateTime and test_publish_date_python_obj)" k="${k-}${k+ and }not (TestPythonObjects and testDateTypes)" k="${k-}${k+ and }not (TestPythonObjects and testDatesEqual)" k="${k-}${k+ and }not (TestPythonObjects and testDurationEqual)" k="${k-}${k+ and }not (TestPythonObjects and testDurationTypes)" %py3_test_envvars %pytest -k "${k-}" %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Wed Nov 13 2024 John Doe - 0.2.2-1 - Uncommitted changes ## END: Generated by rpmautospec