diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-29 12:27:10 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 12:27:10 +0000 |
| commit | 1caa6d1f7727bd3849628d4bb03ae60b5ab6bd8e (patch) | |
| tree | d238f98ae79b561752a60eeb814fe70e52173be9 | |
| parent | c5bae6316b73184c5a0ffb756bc504ac43420617 (diff) | |
automatic import of python-gachapy
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-gachapy.spec | 216 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 218 insertions, 0 deletions
@@ -0,0 +1 @@ +/gachapy-1.0.0.tar.gz diff --git a/python-gachapy.spec b/python-gachapy.spec new file mode 100644 index 0000000..be9953d --- /dev/null +++ b/python-gachapy.spec @@ -0,0 +1,216 @@ +%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 <Python_Bot@openeuler.org> - 1.0.0-1 +- Package Spec generated @@ -0,0 +1 @@ +34e13b9ba12cf78b897692ee8787ae52 gachapy-1.0.0.tar.gz |
