%global _empty_manifest_terminate_build 0 Name: python-gachapy Version: 1.0.0 Release: 1 Summary: A gacha engine built in Python for developing gacha games License: MIT License URL: https://github.com/jakejack13/gachapy Source0: https://mirrors.nju.edu.cn/pypi/web/packages/bd/c2/bbf93a4c03c4a56c4f3946459d8e7a3eeed838d4aa71ba5f191765feed21/gachapy-1.0.0.tar.gz BuildArch: noarch %description # GachaPy A Python engine for gacha games ### What is this? gachapy is a collection of both low and high level objects that can be used as a framework to create gacha games. It contains a Controller class for high level management of the game, abstracting away the nitty gritty of item and player management. Controllers can be saved and loaded through the loader library of functions to and from JSON formatted files. More information can be found in the documentation below. ### Install through pip ```pip install gachapy``` [gachapy PyPi page](https://pypi.org/project/gachapy/) ### Documentation [gachapy documentation](https://gachapy.readthedocs.io/) ### Example Application ```python import gachapy # Creating controller controller = gachapy.Controller() # Add items to game with differing rarities controller.add_new_item("apple","a",2) controller.add_new_item("banana","b",3) controller.add_new_item("carrot","c",10) # Create new banner with the items that have already been added and cost of 5 controller.add_new_banner("food","f",["a","b","c"],5,"1 + 1 / R") # Create new player with 100 starting money and no starting items controller.add_new_player("jacob","j",100) # Player "jacob" pulls from banner "food" controller.pull("j","f") # Get player "jacob" jacob = controller.find_player_by_id("j") # Show information about "jacob" print(jacob) # Save controller into respective files gachapy.save_controller(controller,"save.json") ``` More examples can be found in the `examples/` directory %package -n python3-gachapy Summary: A gacha engine built in Python for developing gacha games Provides: python-gachapy BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-gachapy # GachaPy A Python engine for gacha games ### What is this? gachapy is a collection of both low and high level objects that can be used as a framework to create gacha games. It contains a Controller class for high level management of the game, abstracting away the nitty gritty of item and player management. Controllers can be saved and loaded through the loader library of functions to and from JSON formatted files. More information can be found in the documentation below. ### Install through pip ```pip install gachapy``` [gachapy PyPi page](https://pypi.org/project/gachapy/) ### Documentation [gachapy documentation](https://gachapy.readthedocs.io/) ### Example Application ```python import gachapy # Creating controller controller = gachapy.Controller() # Add items to game with differing rarities controller.add_new_item("apple","a",2) controller.add_new_item("banana","b",3) controller.add_new_item("carrot","c",10) # Create new banner with the items that have already been added and cost of 5 controller.add_new_banner("food","f",["a","b","c"],5,"1 + 1 / R") # Create new player with 100 starting money and no starting items controller.add_new_player("jacob","j",100) # Player "jacob" pulls from banner "food" controller.pull("j","f") # Get player "jacob" jacob = controller.find_player_by_id("j") # Show information about "jacob" print(jacob) # Save controller into respective files gachapy.save_controller(controller,"save.json") ``` More examples can be found in the `examples/` directory %package help Summary: Development documents and examples for gachapy Provides: python3-gachapy-doc %description help # GachaPy A Python engine for gacha games ### What is this? gachapy is a collection of both low and high level objects that can be used as a framework to create gacha games. It contains a Controller class for high level management of the game, abstracting away the nitty gritty of item and player management. Controllers can be saved and loaded through the loader library of functions to and from JSON formatted files. More information can be found in the documentation below. ### Install through pip ```pip install gachapy``` [gachapy PyPi page](https://pypi.org/project/gachapy/) ### Documentation [gachapy documentation](https://gachapy.readthedocs.io/) ### Example Application ```python import gachapy # Creating controller controller = gachapy.Controller() # Add items to game with differing rarities controller.add_new_item("apple","a",2) controller.add_new_item("banana","b",3) controller.add_new_item("carrot","c",10) # Create new banner with the items that have already been added and cost of 5 controller.add_new_banner("food","f",["a","b","c"],5,"1 + 1 / R") # Create new player with 100 starting money and no starting items controller.add_new_player("jacob","j",100) # Player "jacob" pulls from banner "food" controller.pull("j","f") # Get player "jacob" jacob = controller.find_player_by_id("j") # Show information about "jacob" print(jacob) # Save controller into respective files gachapy.save_controller(controller,"save.json") ``` More examples can be found in the `examples/` directory %prep %autosetup -n gachapy-1.0.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-gachapy -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon May 29 2023 Python_Bot - 1.0.0-1 - Package Spec generated