%global forgeurl https://github.com/zulip/python-zulip-api/ %global tag 0.9.0 %forgemeta Name: python-zulip-api Version: %{tag} Release: %{autorelease} Summary: The Zulip API Python bindings License: Apache-2.0 URL: %{forgeurl} Source: %{forgesource} BuildArch: noarch BuildRequires: python3-devel %global _description %{summary} %description %{_description} %package -n python3-zulip Summary: %{summary} %description -n python3-zulip %_description %prep %forgesetup #prep the requirements.txt file #remove workspace packages sed -i -e '/^-e/d' requirements.txt #packages for type-checking/linting arent needed sed -i -e '/types/d' requirements.txt sed -i -e '/lint/d' requirements.txt #remove version bounding sed -i -e 's/.=.*//g' requirements.txt # remove myp package due to it not being packaged and optional sed -i -e '/myp/d' requirements.txt # setup.py files have dependencies in a way that cannot be build together. # concat the req into a file and strip the workspace packages # sed -i -e '/zulip/d' req.txt %pyproject_buildrequires -N ./requirements.txt ( cd zulip %pyproject_buildrequires cd ../zulip_bots %pyproject_buildrequires cd ../zulip_botserver %pyproject_buildrequires cd .. ) | grep -vE '\bzulip\b' %build %pyproject_wheel %install %pyproject_install #not doing tests as need internet %files -n python3-zulip %doc README.md %license THIRDPARTY %license LICENSE %license LICENSE %{_bindir}/zulip* %{_datadir}/zulip/ # % files -n python3-zulip_bots # % files -n python3-zulip_botserver %changelog %autochangelog