From f6cd164400924a3d2fff21ea9986c0eb6b339461 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 7 Jun 2015 00:18:34 -0400 Subject: [PATCH] Add Python 3 support (closes #16) --- README.md | 2 +- gitup/config.py | 6 +++++- setup.py | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 849a4fb..0d4e9da 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ directories, and more, hopefully providing a great way to get everything up-to-date for short periods of internet access between long periods of none. gitup should work on OS X, Linux, and Windows. You should have the latest -version of git and at least Python 2.7 installed. +version of git and either Python 2.7 or Python 3 installed. # Installation diff --git a/gitup/config.py b/gitup/config.py index c34dcb4..0120680 100644 --- a/gitup/config.py +++ b/gitup/config.py @@ -5,9 +5,13 @@ from __future__ import print_function -import ConfigParser as configparser import os +try: + import configparser +except ImportError: # Python 2 + import ConfigParser as configparser + from colorama import Fore, Style __all__ = ["get_bookmarks", "add_bookmarks", "delete_bookmarks", diff --git a/setup.py b/setup.py index d61a0d9..2098ffd 100644 --- a/setup.py +++ b/setup.py @@ -35,8 +35,14 @@ setup( "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", + "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Version Control" ] )