commit 6c66f7548ae28327416e5727815ff3503d847cb6
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Mar 28 02:21:28 2019 +0000
In Python 3 iwe need add the b flag
f2d2726d6e884d81c86adaafe2effbc53ee6220e.patch | 41 ++++++++++++++++++++++++++
rpmfusion-packager.spec | 7 ++++-
2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/f2d2726d6e884d81c86adaafe2effbc53ee6220e.patch
b/f2d2726d6e884d81c86adaafe2effbc53ee6220e.patch
new file mode 100644
index 0000000..a6d0439
--- /dev/null
+++ b/f2d2726d6e884d81c86adaafe2effbc53ee6220e.patch
@@ -0,0 +1,41 @@
+commit f2d2726d6e884d81c86adaafe2effbc53ee6220e
+Author: Sérgio M. Basto <sergio(a)serjux.com>
+Date: Thu Mar 28 02:08:18 2019 +0000
+
+ In Python 3 add the b flag, also changes from 2to3
+
+ In Python 3 it makes a difference whether you open the file in binary or text mode.
Just add the b flag to make it binary
+ This works in Python 2 too.
+
https://stackoverflow.com/questions/47027254/typeerror-write-argument-mus...
+
+diff --git a/src/rpmfusion-packager-setup.py.in b/src/rpmfusion-packager-setup.py.in
+index cf8de8f..9184292 100644
+--- a/src/rpmfusion-packager-setup.py.in
++++ b/src/rpmfusion-packager-setup.py.in
+@@ -17,7 +17,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with rpmfusion-packager. If not, see <
http://www.gnu.org/licenses/>.
+
+-from __future__ import print_function
++
+ from builtins import input
+ import os
+ import sys
+@@ -26,7 +26,7 @@ import subprocess
+
+ def download(location, file):
+ """Save data at location to file. WARNING: Overwrites
files!"""
+- fh = open(file, 'w')
++ fh = open(file, 'wb')
+ curl = pycurl.Curl()
+ curl.setopt(pycurl.URL, location)
+ curl.setopt(pycurl.FOLLOWLOCATION, 1)
+@@ -51,7 +51,7 @@ if __name__ == "__main__":
+ USERHOME = os.path.expanduser('~')
+ print('Setting up RPM Fusion packager environment')
+ if not os.path.isfile(os.path.join(USERHOME, '.rpmfusion.user')):
+- username = input('Enter your RPM Fusion username: ')
++ username = eval(input('Enter your RPM Fusion username: '))
+ fh = open(os.path.join(USERHOME, '.rpmfusion.user'), 'w')
+ fh.write(username)
+ fh.close()
diff --git a/rpmfusion-packager.spec b/rpmfusion-packager.spec
index 8e81974..0f991fa 100644
--- a/rpmfusion-packager.spec
+++ b/rpmfusion-packager.spec
@@ -7,12 +7,13 @@
Name: rpmfusion-packager
Version: 0.6.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Tools for setting up a rpmfusion maintainer environment
License: GPLv2+
URL:
https://github.com/rpmfusion-infra/rpmfusion-packager
Source0: %url/archive/v%{version}/rpmfusion-packager-%{version}.tar.gz
+Patch1: f2d2726d6e884d81c86adaafe2effbc53ee6220e.patch
BuildArch: noarch
@@ -75,6 +76,7 @@ Provides rpmfusion-cert and the rpmfusion_cert python library
%prep
%setup -q
+%patch1 -p1
autoreconf -i
@@ -111,6 +113,9 @@ autoreconf -i
%endif
%changelog
+* Thu Mar 28 2019 Sérgio Basto <sergio(a)serjux.com> - 0.6.3-4
+- In Python 3 iwe need add the b flag
+
* Thu Mar 28 2019 Sérgio Basto <sergio(a)serjux.com> - 0.6.3-3
- python3-rpmfusion-cert obsoletes rpmfusion-cert to fix upgrade path