%global _empty_manifest_terminate_build 0 Name: python-peace-performance-python Version: 2.0.0 Release: 1 Summary: Rust binding for python. To calculate star ratings and performance points for all osu! gamemodes, and quickly parse Beatmap into python objects. License: MIT License Copyright (c) 2021 Pure-Peace Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. URL: https://github.com/Pure-Peace/peace-performance-python Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a6/74/f2234c1a41410aafedae2c7e4fd711bb9c0163c7c3ad5f26a950c573631f/peace-performance-python-2.0.0.tar.gz Requires: python3-typing-extensions Requires: python3-pytest Requires: python3-pytest-cov[all] Requires: python3-setuptools-rust Requires: python3-maturin Requires: python3-pytest-benchmark Requires: python3-pytest-benchmark[histogram] %description ## Beatmap parse ### Examples ```python from peace_performance_python.prelude import * from tests import join_beatmap, HITORIGOTO # *No longer available by default (compile without `rust_logger` features enabled)* # Initialize Rust logger (optional) ''' set_log_level('trace') init_logger() ''' def main(): path = join_beatmap(HITORIGOTO) # Load beatmap b = Beatmap(path) print('\n>>>>> Beatmap:', b) print('\n>>>>> Beatmap.hit_objects (0-3):', b.hit_objects[:3]) print('\n>>>>> Beatmap.timing_points:', b.timing_points) print('\n>>>>> Beatmap.difficulty_points (0-3):', b.difficulty_points[:3]) print('\n>>>>> Beatmap.hit_objects[0].pos:', b.hit_objects[0].pos) print('\n>>>>> Beatmap.hit_objects[3].kind:', b.hit_objects[3].kind) print('\n>>>>> Beatmap.hit_objects[3].kind.curve_points:', b.hit_objects[3].kind.curve_points) pos_0 = b.hit_objects[0].pos pos_1 = b.hit_objects[1].pos print('\n>>>>> Beatmap object(0):', b.hit_objects[0]) print('\n>>>>> Beatmap object(1):', b.hit_objects[1]) print('\n>>>>> Beatmap object pos(0):', pos_0) print('\n>>>>> Beatmap object pos(1):', pos_1) print('\n>>>>> Beatmap object pos(0) length, squared:', pos_0.length, pos_0.length_squared) print('\n>>>>> Beatmap object pos(0 and 1) distance:', pos_0.distance(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) add:', pos_0.add(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) sub:', pos_0.sub(pos_1)) if __name__ == '__main__': main() ``` ### Running results ```rust TRACE peace_performance_python::methods::common > function=sync_read_file duration=78.3µs TRACE peace_performance_python::methods::pp > function=sync_parse_beatmap duration=193.4µs >>>>> Beatmap: >>>>> Beatmap.hit_objects (0-3): [ , , ] >>>>> Beatmap.timing_points: [] >>>>> Beatmap.difficulty_points (0-3): [ , , ] >>>>> Beatmap.hit_objects[0].pos: >>>>> Beatmap.hit_objects[3].kind: >>>>> Beatmap.hit_objects[3].kind.curve_points: [ , , ] >>>>> Beatmap object(0): >>>>> Beatmap object(1): >>>>> Beatmap object pos(0): >>>>> Beatmap object pos(1): >>>>> Beatmap object pos(0) length, squared: 142.9405517578125 20432.0 >>>>> Beatmap object pos(0 and 1) distance: 277.5625915527344 >>>>> Beatmap object pos(0 and 1) add: >>>>> Beatmap object pos(0 and 1) sub: %package -n python3-peace-performance-python Summary: Rust binding for python. To calculate star ratings and performance points for all osu! gamemodes, and quickly parse Beatmap into python objects. Provides: python-peace-performance-python BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-peace-performance-python ## Beatmap parse ### Examples ```python from peace_performance_python.prelude import * from tests import join_beatmap, HITORIGOTO # *No longer available by default (compile without `rust_logger` features enabled)* # Initialize Rust logger (optional) ''' set_log_level('trace') init_logger() ''' def main(): path = join_beatmap(HITORIGOTO) # Load beatmap b = Beatmap(path) print('\n>>>>> Beatmap:', b) print('\n>>>>> Beatmap.hit_objects (0-3):', b.hit_objects[:3]) print('\n>>>>> Beatmap.timing_points:', b.timing_points) print('\n>>>>> Beatmap.difficulty_points (0-3):', b.difficulty_points[:3]) print('\n>>>>> Beatmap.hit_objects[0].pos:', b.hit_objects[0].pos) print('\n>>>>> Beatmap.hit_objects[3].kind:', b.hit_objects[3].kind) print('\n>>>>> Beatmap.hit_objects[3].kind.curve_points:', b.hit_objects[3].kind.curve_points) pos_0 = b.hit_objects[0].pos pos_1 = b.hit_objects[1].pos print('\n>>>>> Beatmap object(0):', b.hit_objects[0]) print('\n>>>>> Beatmap object(1):', b.hit_objects[1]) print('\n>>>>> Beatmap object pos(0):', pos_0) print('\n>>>>> Beatmap object pos(1):', pos_1) print('\n>>>>> Beatmap object pos(0) length, squared:', pos_0.length, pos_0.length_squared) print('\n>>>>> Beatmap object pos(0 and 1) distance:', pos_0.distance(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) add:', pos_0.add(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) sub:', pos_0.sub(pos_1)) if __name__ == '__main__': main() ``` ### Running results ```rust TRACE peace_performance_python::methods::common > function=sync_read_file duration=78.3µs TRACE peace_performance_python::methods::pp > function=sync_parse_beatmap duration=193.4µs >>>>> Beatmap: >>>>> Beatmap.hit_objects (0-3): [ , , ] >>>>> Beatmap.timing_points: [] >>>>> Beatmap.difficulty_points (0-3): [ , , ] >>>>> Beatmap.hit_objects[0].pos: >>>>> Beatmap.hit_objects[3].kind: >>>>> Beatmap.hit_objects[3].kind.curve_points: [ , , ] >>>>> Beatmap object(0): >>>>> Beatmap object(1): >>>>> Beatmap object pos(0): >>>>> Beatmap object pos(1): >>>>> Beatmap object pos(0) length, squared: 142.9405517578125 20432.0 >>>>> Beatmap object pos(0 and 1) distance: 277.5625915527344 >>>>> Beatmap object pos(0 and 1) add: >>>>> Beatmap object pos(0 and 1) sub: %package help Summary: Development documents and examples for peace-performance-python Provides: python3-peace-performance-python-doc %description help ## Beatmap parse ### Examples ```python from peace_performance_python.prelude import * from tests import join_beatmap, HITORIGOTO # *No longer available by default (compile without `rust_logger` features enabled)* # Initialize Rust logger (optional) ''' set_log_level('trace') init_logger() ''' def main(): path = join_beatmap(HITORIGOTO) # Load beatmap b = Beatmap(path) print('\n>>>>> Beatmap:', b) print('\n>>>>> Beatmap.hit_objects (0-3):', b.hit_objects[:3]) print('\n>>>>> Beatmap.timing_points:', b.timing_points) print('\n>>>>> Beatmap.difficulty_points (0-3):', b.difficulty_points[:3]) print('\n>>>>> Beatmap.hit_objects[0].pos:', b.hit_objects[0].pos) print('\n>>>>> Beatmap.hit_objects[3].kind:', b.hit_objects[3].kind) print('\n>>>>> Beatmap.hit_objects[3].kind.curve_points:', b.hit_objects[3].kind.curve_points) pos_0 = b.hit_objects[0].pos pos_1 = b.hit_objects[1].pos print('\n>>>>> Beatmap object(0):', b.hit_objects[0]) print('\n>>>>> Beatmap object(1):', b.hit_objects[1]) print('\n>>>>> Beatmap object pos(0):', pos_0) print('\n>>>>> Beatmap object pos(1):', pos_1) print('\n>>>>> Beatmap object pos(0) length, squared:', pos_0.length, pos_0.length_squared) print('\n>>>>> Beatmap object pos(0 and 1) distance:', pos_0.distance(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) add:', pos_0.add(pos_1)) print('\n>>>>> Beatmap object pos(0 and 1) sub:', pos_0.sub(pos_1)) if __name__ == '__main__': main() ``` ### Running results ```rust TRACE peace_performance_python::methods::common > function=sync_read_file duration=78.3µs TRACE peace_performance_python::methods::pp > function=sync_parse_beatmap duration=193.4µs >>>>> Beatmap: >>>>> Beatmap.hit_objects (0-3): [ , , ] >>>>> Beatmap.timing_points: [] >>>>> Beatmap.difficulty_points (0-3): [ , , ] >>>>> Beatmap.hit_objects[0].pos: >>>>> Beatmap.hit_objects[3].kind: >>>>> Beatmap.hit_objects[3].kind.curve_points: [ , , ] >>>>> Beatmap object(0): >>>>> Beatmap object(1): >>>>> Beatmap object pos(0): >>>>> Beatmap object pos(1): >>>>> Beatmap object pos(0) length, squared: 142.9405517578125 20432.0 >>>>> Beatmap object pos(0 and 1) distance: 277.5625915527344 >>>>> Beatmap object pos(0 and 1) add: >>>>> Beatmap object pos(0 and 1) sub: %prep %autosetup -n peace-performance-python-2.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-peace-performance-python -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 2.0.0-1 - Package Spec generated