From 3441b3c5a77014a8b767f3ea15cfe76e97866af1 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Oct 18 2016 17:24:18 +0000 Subject: update README.rst, createdb.py, dev-data.py for python3 * renamed calls to 'raw_input' to 'input' in dev-data.py --- diff --git a/README.rst b/README.rst index d895e7c..c22ab33 100644 --- a/README.rst +++ b/README.rst @@ -26,7 +26,7 @@ Get it running * Install the needed system libraries:: - sudo dnf install git python-virtualenv libgit2-devel \ + sudo dnf install git python3-virtualenv libgit2-devel \ libjpeg-devel gcc libffi-devel redhat-rpm-config .. note:: Do note the version of libgit2 that you install, for example diff --git a/createdb.py b/createdb.py index eb78c78..60c6841 100644 --- a/createdb.py +++ b/createdb.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # These two lines are needed to run on EL6 __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4'] diff --git a/dev-data.py b/dev-data.py index 293d094..a7a56f8 100644 --- a/dev-data.py +++ b/dev-data.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Populate the pagure db with some dev data. """ import sys @@ -40,7 +40,7 @@ def empty_dev_db(metadata, engine): print('WARNING: Deleting all data from ', pagure.APP.config['DB_URL']) # Dangerous: this will wipe the data from the table but keep the schema print('') - response = raw_input('Do you want to continue yes or no? ') + response = input('Do you want to continue yes or no? ') if 'yes'.startswith(response.lower()): for tbl in reversed(metadata.sorted_tables): if tbl.fullname != 'acls': @@ -447,22 +447,22 @@ if __name__ == "__main__": session = pagure.SESSION invalid_option = ['pingou', 'bar@pingou.com', 'foo', 'foo@bar.com'] print("") - user_name = raw_input( + user_name = input( "Enter your username so we can add you into the test data: ") while user_name in invalid_option: print("Reserved names: " + str(invalid_option)) - user_name = raw_input( + user_name = input( "Enter your username so we can add you into the test data: ") if not user_name.replace(" ", ""): user_name = 'pythagoras' print("") - user_email = raw_input("Enter your user email: ") + user_email = input("Enter your user email: ") while user_email in invalid_option: print("Reserved names: " + str(invalid_option)) - user_email = raw_input("Enter your user email: ") + user_email = input("Enter your user email: ") if not user_email.replace(" ", ""): user_email = 'pythagoras@math.com'