diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pyfxr.spec | 285 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 287 insertions, 0 deletions
@@ -0,0 +1 @@ +/pyfxr-0.3.0.tar.gz diff --git a/python-pyfxr.spec b/python-pyfxr.spec new file mode 100644 index 0000000..7762848 --- /dev/null +++ b/python-pyfxr.spec @@ -0,0 +1,285 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyfxr +Version: 0.3.0 +Release: 1 +Summary: SFXR clone using Pygame and Cython +License: BSD License +URL: https://github.com/lordmauve/pyfxr +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b6/37/b1900946ed517d00b3fbdbb10bd9cb2644ed29e9e6778949dd422fd9ec44/pyfxr-0.3.0.tar.gz + +Requires: python3-pygame + +%description +# pyfxr + +Sound effects generation for Python, compatible with Pygame and Pyglet. + + +## Installation + +`pyfxr` is on PyPI and pre-compiled for Mac, Windows and Linux. You can install +the library with + +``` +pip install pyfxr +``` + +## Documentation + +[Full API documentation](https://pyfxr.readthedocs.io/) + + +## Pygame Usage + +``` +# Set mixer to 44kHz mono +pygame.mixer.pre_init(44100, channels=1) + +# Generate a sound +tone = pygame.mixer.Sound( + buffer=pyfxr.pluck(duration=1.0, pitch='A4') +) + +# Play it +tone.play() +``` + +## Usage with Pyglet + +``` +# Generate a random explosion sound +explosion = pyglet.media.StaticSource(pyfxr.explosion()) + +# Play it +explosion.play() +``` + +## Usage with sounddevice + +``` +import sounddevice +import pyfxr + +sounddevice.play(pyfxr.jump(), pyfxr.SAMPLE_RATE) +``` + +## GUI + +A Pygame GUI is in development, to explore the feature set and create music! + +To install the Pygame-based GUI along with the library, use: + +``` +pip install pyfxr[gui] +``` + +Then you can run the GUI by running `pyfxr`. + + + + + + + + +%package -n python3-pyfxr +Summary: SFXR clone using Pygame and Cython +Provides: python-pyfxr +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-pyfxr +# pyfxr + +Sound effects generation for Python, compatible with Pygame and Pyglet. + + +## Installation + +`pyfxr` is on PyPI and pre-compiled for Mac, Windows and Linux. You can install +the library with + +``` +pip install pyfxr +``` + +## Documentation + +[Full API documentation](https://pyfxr.readthedocs.io/) + + +## Pygame Usage + +``` +# Set mixer to 44kHz mono +pygame.mixer.pre_init(44100, channels=1) + +# Generate a sound +tone = pygame.mixer.Sound( + buffer=pyfxr.pluck(duration=1.0, pitch='A4') +) + +# Play it +tone.play() +``` + +## Usage with Pyglet + +``` +# Generate a random explosion sound +explosion = pyglet.media.StaticSource(pyfxr.explosion()) + +# Play it +explosion.play() +``` + +## Usage with sounddevice + +``` +import sounddevice +import pyfxr + +sounddevice.play(pyfxr.jump(), pyfxr.SAMPLE_RATE) +``` + +## GUI + +A Pygame GUI is in development, to explore the feature set and create music! + +To install the Pygame-based GUI along with the library, use: + +``` +pip install pyfxr[gui] +``` + +Then you can run the GUI by running `pyfxr`. + + + + + + + + +%package help +Summary: Development documents and examples for pyfxr +Provides: python3-pyfxr-doc +%description help +# pyfxr + +Sound effects generation for Python, compatible with Pygame and Pyglet. + + +## Installation + +`pyfxr` is on PyPI and pre-compiled for Mac, Windows and Linux. You can install +the library with + +``` +pip install pyfxr +``` + +## Documentation + +[Full API documentation](https://pyfxr.readthedocs.io/) + + +## Pygame Usage + +``` +# Set mixer to 44kHz mono +pygame.mixer.pre_init(44100, channels=1) + +# Generate a sound +tone = pygame.mixer.Sound( + buffer=pyfxr.pluck(duration=1.0, pitch='A4') +) + +# Play it +tone.play() +``` + +## Usage with Pyglet + +``` +# Generate a random explosion sound +explosion = pyglet.media.StaticSource(pyfxr.explosion()) + +# Play it +explosion.play() +``` + +## Usage with sounddevice + +``` +import sounddevice +import pyfxr + +sounddevice.play(pyfxr.jump(), pyfxr.SAMPLE_RATE) +``` + +## GUI + +A Pygame GUI is in development, to explore the feature set and create music! + +To install the Pygame-based GUI along with the library, use: + +``` +pip install pyfxr[gui] +``` + +Then you can run the GUI by running `pyfxr`. + + + + + + + + +%prep +%autosetup -n pyfxr-0.3.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-pyfxr -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.0-1 +- Package Spec generated @@ -0,0 +1 @@ +391444886435516f7269af19406cea8e pyfxr-0.3.0.tar.gz |