commit 9976583789efe5b7815911781354367fd8360357
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sun Sep 1 17:16:56 2024 +0100
Patch to use python3
convert_to_py3.patch | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
mimms.spec | 19 ++++++++-----
2 files changed, 91 insertions(+), 7 deletions(-)
---
diff --git a/convert_to_py3.patch b/convert_to_py3.patch
new file mode 100644
index 0000000..45eccb1
--- /dev/null
+++ b/convert_to_py3.patch
@@ -0,0 +1,79 @@
+diff -uNrp a/libmimms/core.py b/libmimms/core.py
+--- a/libmimms/core.py 2008-05-12 01:53:08.000000000 +0100
++++ b/libmimms/core.py 2024-09-01 17:06:28.465911780 +0100
+@@ -26,7 +26,7 @@ import sys
+
+ from optparse import OptionParser
+ from time import time
+-from urlparse import urlparse
++from urllib.parse import urlparse
+
+ from . import libmms
+
+@@ -99,7 +99,7 @@ def download(options):
+ "Using the given options, download the stream to a file."
+
+ status = "Connecting ..."
+- if not options.quiet: print status,
++ if not options.quiet: print(status, end=' ')
+ sys.stdout.flush()
+
+ stream = libmms.Stream(options.url, options.bandwidth)
+@@ -117,7 +117,7 @@ def download(options):
+
+ clear = " " * len(status)
+ status = "%s => %s" % (options.url, filename)
+- if not options.quiet: print "\r", clear, "\r", status
++ if not options.quiet: print("\r", clear, "\r", status)
+ sys.stdout.flush()
+
+ timeout_timer = Timer()
+@@ -171,7 +171,7 @@ def download(options):
+ seconds_to_string(remaining)
+ )
+
+- if not options.quiet: print "\r", clear, "\r", status,
++ if not options.quiet: print("\r", clear, "\r", status,
end=' ')
+ sys.stdout.flush()
+
+ if options.time and timeout_timer.elapsed() > (options.time*60):
+@@ -231,19 +231,20 @@ def run(argv):
+ download(options)
+ except Timeout:
+ if not options.quiet:
+- print
+- print "Download stopped after user-specified timeout."
++ print()
++ print("Download stopped after user-specified timeout.")
+ except NotResumeableError:
+ if not options.quiet:
+- print
+- print >> sys.stderr, "Non-seekable streams cannot be resumed."
++ print()
++ print("Non-seekable streams cannot be resumed.", file=sys.stderr)
+ except KeyboardInterrupt:
+ if not options.quiet:
+- print
+- print >> sys.stderr, "Download aborted by user."
+- except libmms.Error, e:
+- print >> sys.stderr, "libmms error:", e.message
++ print()
++ print("Download aborted by user.", file=sys.stderr)
++ except libmms.Error as e:
++ print("libmms error:", e.message, file=sys.stderr)
+ else:
+ if not options.quiet:
+- print
+- print "Download complete!"
++ print()
++ print("Download complete!")
++
+diff -uNrp a/mimms b/mimms
+--- a/mimms 2008-05-12 01:53:08.000000000 +0100
++++ b/mimms 2024-09-01 17:10:20.195006924 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.5
++#!/usr/bin/python3
+ # -*- coding: utf-8 -*-
+ #
+ # mimms - mms stream downloader
diff --git a/mimms.spec b/mimms.spec
index a8a8851..851f321 100644
--- a/mimms.spec
+++ b/mimms.spec
@@ -1,12 +1,14 @@
Summary: MMS stream downloader
Name: mimms
Version: 3.2.1
-Release: 25%{?dist}
+Release: 26%{?dist}
License: GPLv3+
Group: Applications/Multimedia
URL:
http://savannah.nongnu.org/projects/mimms/
Source:
http://download.savannah.gnu.org/releases/mimms/mimms-%{version}.tar.bz2
-BuildRequires: python2-devel
+Patch0: convert_to_py3.patch
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
Requires: libmms >= 0.4
BuildArch: noarch
@@ -15,23 +17,26 @@ mimms is a program designed to allow you to download streams using the
MMS
protocol and save them to your computer, as opposed to watching them live.
%prep
-%setup -q
+%autosetup -p1
%build
-%py2_build
+%py3_build
%install
-%py2_install
+%py3_install
%files
%doc AUTHORS NEWS README
%license COPYING
%{_bindir}/mimms
-%{python2_sitelib}/mimms-*.egg-info
-%{python2_sitelib}/libmimms/
+%{python3_sitelib}/mimms-*.egg-info
+%{python3_sitelib}/libmimms/
%{_mandir}/man1/mimms.1*
%changelog
+* Sun Sep 01 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3.2.1-26
+- Patch to use python3
+
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
3.2.1-25
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild