14
0

- Do not use %_libdir, it doesn't expand correctly on 64 bit arches.

- Run a portion of the testsuite.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-mpv?expand=0&rev=46
This commit is contained in:
2025-02-14 03:27:20 +00:00
committed by Git OBS Bridge
commit e9976df702
6 changed files with 394 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,2 @@
# this is actually necessary
addFilter("explicit-lib-dependency .*libmpv")

298
python-python-mpv.changes Normal file
View File

@@ -0,0 +1,298 @@
-------------------------------------------------------------------
Fri Feb 14 03:26:31 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Do not use %_libdir, it doesn't expand correctly on 64 bit arches.
- Run a portion of the testsuite.
-------------------------------------------------------------------
Mon Jun 24 15:32:51 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.0.7:
* Fix race condition in property observer code leading to
futures.InvalidStateError
* bump min python to 3.9
-------------------------------------------------------------------
Wed May 22 17:35:36 UTC 2024 - Mia Herkt <mia@0x0.st>
- Update to version 1.0.6
* Fix loadfile for mpv v0.38.0
* Add play_bytes convenience function
* Add play_context convenience function
-------------------------------------------------------------------
Sun Nov 19 06:30:55 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 1.0.5
* Make release script properly update version in mpv.py
* Fix typo in README
-------------------------------------------------------------------
Sun Jul 23 04:43:23 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 1.0.4
* Add missing fields to MpvEventEndFile
* Add field "playlist_entry_id" to MpvEventEndFile
* Add 'self' to mouse function
* Replace xvfbwrapper with PyVirtualDisplay
* Add __version__ field to module
-------------------------------------------------------------------
Mon Feb 27 14:53:53 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Add version requirement for setuptools
-------------------------------------------------------------------
Mon Feb 27 11:45:28 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 1.0.3
* Move to new old pypi project name
-------------------------------------------------------------------
Sun Feb 26 14:44:26 UTC 2023 - Luigi Baldoni <aloisio@gmx.com>
- Update to version v1.0.2
* Update license header with dual-license information
* Update package metadata
* Migrate away from setup.py and use PEP 612-style
pyproject.toml
* Update setup.cfg for new syntax
* Fix typo in repr format string
* tests: Add strategic sleeps to reduce likelihood of race
condition during test teardown
* Fix package upgrade
* Cleanup pipeline
* Skip Python 3.7
* Add Windows test
* Run on Python 3.7 - 3.10
* Rename job
* Use newer actions
* Skip unreliable test in CI
* Use xvfb-run to run tests
* Upgrade pip
* Remove starter
* Remove unused variables
* Use two blank lines between classes and functions
* Comment error prone test
* Fix environment variable
* Start Xvfb before running tests
* Add test workflow
* Add requirements file
* Remove unused imports
* Fix show_text level default parameter
* Fix observe_property() docstring
* Fix external subtitles example
* Fix typo in function name
* Update branch name references
* Error for known-incompatible libmpv
* Fix license field in setup.py
- Switch to new license
-------------------------------------------------------------------
Sun Apr 24 16:53:52 UTC 2022 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 1.0.1
* Fix setup.py for PyPI upload
version 1.0.0:
* Add cancel handling to streams
* Remove outdated OpenGL examples from README
* Add event queue overflow handling
* Finish event infrastructure rework.
* Finish rewriting event infrastructure
* Continue reworking event infrastrucutre.
* Use mock.Mock to mock Xvfbwrapper on Windows
* Update event wrapper classes
* Remove deprecated libmpv API
* add albumart arg to video_add
* Windows test workaround
* Remove MpvSubApi wrapper
* Remove dropped mpv-2 api methods.
* Add some useful input commands
* Add keyword argument command interface
* setup.py: Update license information
* Update copyright headers
* Use upstream license
* tests: Suppress video output on wayland systems
* Add missing new event types
* Add future-based async command API
* mpv.py: add default error handler for failed async commands
* mpv.py: add support for asynchronous commands
* Default to node_command and rename old command to
string_command
* mpv.py: change mpv_detach_destroy to mpv_destroy
* porcelain: Add fancy wait_for_event/property future handling
* Bump minimum python version to 3.7
* README: Add skip silence example
* tests: Fix flaky sub_add test
* tests: Add wait_for_shutdown unit test
* tests: Switch to pytest, remove devnull hack
* Add timeouts and error forwarding to
wait_for_{property,event} condit…
* Fix segmentation fault in unit tests on wayland
* use daemon = True instead of setDaemon
* test_property_observer_decorator: bump sleep to 0.1s
* Fix handling of c_void_p args in MpvRenderParam.__init__()
* Update PyGObject example with locale fixup workaround
* mpv.py: update: Use ctypes.memmove to speed up
* Add dfaker's imgui/OpenGL demo
* README: Add Robozman's PyQt5/QML/OpenGL render context
example
-------------------------------------------------------------------
Wed Mar 2 15:50:32 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- Dynamically add a dependency to the libmpv version that was
present during build. Allows to dynamically move between various
so versions (e.g. libmpv1 to libmpv2).
-------------------------------------------------------------------
Sun Jul 26 06:26:13 UTC 2020 - aloisio@gmx.com
- Update to version 0.5.2
* Fixing typo in keep_playlist causing NameError
-------------------------------------------------------------------
Mon Jul 20 14:50:15 UTC 2020 - aloisio@gmx.com
- Update to version 0.5.1
* mpv.py: terminate: Raise warning when called from event
thread.
* mpv.py: add wait_for_shutdown
* mpv.py: add check_core_alive, check core in __getattr__,
__setattr__
-------------------------------------------------------------------
Mon Jul 20 07:38:56 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.5.0
* mpv.py: add prepare_and_wait_for_property
* mpv.py: Update copyright date
* mpv.py: Add docstrings to new additions to API
* Sprinkle some thread safety over event loop, add
*wait_for_event
* mpv.py: improve shutdown handling, replace wait_for_playback
-------------------------------------------------------------------
Fri Jul 17 05:17:54 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.4.8
* README: add video overlay example
* mpv.py: add wait_until_paused, wait_until_playing
* mpv.py: Add overlay support
* mpv.py: add some missing commands
* added "python_requires"
* remove superfluous whitespaces
-------------------------------------------------------------------
Sun Jul 12 12:05:20 UTC 2020 - aloisio@gmx.com
- Update to version 0.4.7
* README: Add detail on subtitle handling
* Fix handling of dashed options in loadfile.
* update README with inserting subtitles
* Add release script
-------------------------------------------------------------------
Sun Apr 5 11:47:16 UTC 2020 - aloisio@gmx.com
- Update to version v0.4.6
* Make tests run headless using xvfbwrapper
* Add some high-level API information to README
* README: Add info on GUI modes
* README: add render context gtk example
* Initial libmpv/render.h mapping
* Add GTK/OpenGL example (#100)
-------------------------------------------------------------------
Thu Mar 19 05:09:56 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to version 0.4.5:
* Windows: Use cytpes.load_library to look for DLL
-------------------------------------------------------------------
Wed Dec 4 08:40:49 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.4.4.
* Allow mpv-1.dll to be placed in python script directory (#96)
* tests: Silence libmpv during unittests
* Fix Python 3.5 compatibility
-------------------------------------------------------------------
Mon Dec 2 08:22:36 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.4.1
* Add stream protocol handling
-------------------------------------------------------------------
Tue Nov 26 12:42:09 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.4.0
* key bindings: Introduce key char parameter
* README - vo "opengl" doesn't exist anymore
-------------------------------------------------------------------
Sun Nov 10 16:05:24 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.3.10
* Use stride//4 rather than the returned image w
* README: Add cosven's QT/OpenGL example
* fix: getProcAddr function should return a function or 0
* Readme: Add PyGtk embedding example
- Spec cleanup
-------------------------------------------------------------------
Tue Dec 4 12:53:06 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Thu Jul 26 18:38:59 UTC 2018 - aloisio@gmx.com
- Update to version 0.3.9 (no changelog supplied)
-------------------------------------------------------------------
Tue May 8 15:55:55 UTC 2018 - aloisio@gmx.com
- Update to version 0.3.8 (no changelog supplied)
-------------------------------------------------------------------
Fri Nov 24 14:03:25 UTC 2017 - aloisio@gmx.com
- Update to version 0.3.6
* Fixed TypeError: _handle_key_binding_message() signature
incompatibility with mpv < v0.15.0
* Nicer API names for add/multiply/cycle property
* Wrap all docstrings to 120 char line width
* Reformat doctrings to follow PEP 257 and use reStructuredText
* Fix add, cycle and multiply command.
* README: loop -> loop_playlist
* Add on_key_press
* Fix key binding registration for bound methods, add unit tests
* Fix window dragging while using custom key bindings
* mpv, mpv-test: Fix vim mode lines
* setup.py: Add pillow extra dependency
* Restore compatibility with older libmpv versions
* Re-nerf property observer tests
* mpv-test.py: Add more thorough property tests
* mpv.py: Un-break property write access
* Add pillow-based screenshot_raw command
* Move to fully FORMAT_NODE-based API
* mpv module: Remove load_lua
* MPV constructor: Add loglevel argument
* Fix register_event_callback to work with methods
* Remove debug hack accidentially left in the code
* Fix message handler registration and advanced README example
* setup.py: Small syntax fixes
* tests: Add test for multi-valued property-mapped options
* Add support for string-array options
* Fix racy property tests
* README: Add version compatibility blurb
- Spec cleanup
-------------------------------------------------------------------
Mon Jun 19 16:17:47 UTC 2017 - aloisio@gmx.com
- Initial package (0.2.3)

67
python-python-mpv.spec Normal file
View File

@@ -0,0 +1,67 @@
#
# spec file for package python-python-mpv
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-python-mpv
Version: 1.0.7
Release: 0
Summary: Python interface to the mpv media player
License: GPL-2.0-or-later OR LGPL-2.1-or-later
URL: https://github.com/jaseg/python-mpv
Source0: https://files.pythonhosted.org/packages/source/p/python-mpv/python_mpv-%{version}.tar.gz
Source99: %{name}-rpmlintrc
BuildRequires: %{python_module PyVirtualDisplay}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools >= 61}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Needed to be able to set the proper dependency to the library
BuildRequires: mpv-devel
# workaround via define needed as python_subpackages wants to interpret Requires: lines
# do not use %_libdir
Requires: %(rpm -q --queryformat "%%{NAME}" -f $(readlink -f /usr/lib*/libmpv.so))
BuildArch: noarch
%python_subpackages
%description
A ctypes-based python interface to the mpv media player.
It gives more or less full control of all features of the player,
just like the lua interface does.
%prep
%setup -q -n python_mpv-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest -k 'test_array_property_bounce'
%files %{python_files}
%license LICENSE.GPL LICENSE.LGPL
%doc README.rst
%{python_sitelib}/mpv.py
%{python_sitelib}/__pycache__/mpv.cpython*pyc
%{python_sitelib}/python_mpv-%{version}.dist-info
%changelog

3
python_mpv-1.0.7.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afc2f2677b08dcccf1e9e7a76d64ee4f603541cf6a750ebf4cce957be90ec836
size 51712