https://bugzilla.redhat.com/show_bug.cgi?id=2322082
--- Comment #5 from Benson Muite benson_muite@emailplus.org --- Thanks for the feedback.
you should change
%pyproject_save_files scrape_schema_recipe -L
to
%pyproject_save_files scrape_schema_recipe -l
so that the build will fail if the license file disappears in a future update.
Done
You don’t need this:
rm -r scrape_schema_recipe.egg-info
It was never really necessary (although it became widespread because it was included in the output of pyp2rpm), but it is *especially* unnecessary with pyproject-rpm-macros since they always install a .dist-info directory, not egg-info, so it’s impossible for any bundled egg-info to be used by accident.
Removed.
The %forgeurl, and therefore the URL, is incorrect; replace this
%global forgeurl https://github.com/michacochran/scrape-schema-recipe
with
%global forgeurl https://github.com/micahcochran/scrape-schema-recipe
Thanks. Fixed.
- You’re right to remove test data with license issues before uploading to the
lookaside cache, and the basic approach is sound, but there are still test data files with issues – unclear, proprietary or otherwise unacceptable licenses.
For example, sweetestkitchen-truffles.html is CC-BY-NC-3.0, which is not-allowed in Fedora.
That is unfortunate. Really tasty! But if it needs to go, it needs to go.
I believe it’s necessary to remove the entire contents of scrape_schema_recipe/test_data/, except __init__.py.
Done.
I also think it would make sense to patch scrape_schema_recipe/example_output.py to match the test data removals. You could change
example_names = tuple(_ex_name_filename.keys())
to
example_names = ()
Done.
Notes:
Instead of patching out the tests you need to skip (which will be annoying to rebase if even a single byte of the tests in question changes), you could decorate them with unittest.skip – reducing the number of potentially-conflicting lines – or, even easier, you could use pytest as the runner and just skip the tests that way.
BuildRequires: %{py3_dist pytest}
[…]
# These tests require test data that we could not redistribute: k="${k-}${k+ and }not TestUnsetTimeDate" k="${k-}${k+ and }not TestTypeList" k="${k-}${k+ and }not (TestEscaping and test_unescape_ingredients)"
%pytest -k "${k-}"
Then you would be able to drop tests_without_proprietary_licensed_data.patch entirely.
Done. There are a few more tests that need to be excluded.
Updated: spec: https://download.copr.fedorainfracloud.org/results/fed500/gourmand/fedora-ra... srpm: https://download.copr.fedorainfracloud.org/results/fed500/gourmand/fedora-ra...