%global forgeurl https://github.com/barrust/mediawiki %global srcname pymediawiki Version: 0.7.1 %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Python wrapper and parser for MediaWiki API License: MIT URL: %{forgeurl} Source0: %{forgesource} # Proposed upstream to conform to PEP517 # https://github.com/barrust/mediawiki/pull/117 Patch: mediawiki_0.7.1-pep517.patch BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: Pymediawiki is a python wrapper and parser for the MediaWiki API. The goal is to allow users to quickly and efficiently pull data from the MediaWiki site of their choice instead of worrying about dealing directly with the API. As such, it does not force the use of a particular MediaWiki site. It defaults to Wikipedia but other MediaWiki sites can also be used.} %description %_description %package -n python3-%{srcname} Summary: %{summary} # Importable module is named mediawiki %py_provides python3-mediawiki %description -n python3-%{srcname} %_description %prep %forgesetup %patch -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files mediawiki %check %pyproject_check_import # tests provided in sources uses internet connection %files -n python3-%{srcname} -f %{pyproject_files} %changelog %autochangelog