From 030fb072510968b7a2230f310ea08993561f828b Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 18 Dec 2013 09:39:02 +0400 Subject: [PATCH 1/1] Allow installation without m_lib Move __version__ out of mimedecode.py to __version__.py. --- TODO | 3 --- __version__.py | 4 ++++ mimedecode.py | 5 +---- setup.py | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 __version__.py diff --git a/TODO b/TODO index 3c2ca65..4c62d20 100644 --- a/TODO +++ b/TODO @@ -1,4 +1 @@ -Move __version__ out of mimedecode.py to allow installation without m_lib. - - setuptools/easy_install; pip. diff --git a/__version__.py b/__version__.py new file mode 100644 index 0000000..0677d7e --- /dev/null +++ b/__version__.py @@ -0,0 +1,4 @@ +__version__ = "2.1.4" +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2001-2013 PhiloSoft Design" +__license__ = "GNU GPL" diff --git a/mimedecode.py b/mimedecode.py index 8fa6921..6c3ff71 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -2,10 +2,7 @@ """Decode MIME message""" -__version__ = "2.1.4" -__author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2001-2013 PhiloSoft Design" -__license__ = "GNU GPL" +from __version__ import __version__, __author__, __copyright__, __license__ import sys, os diff --git a/setup.py b/setup.py index 32b1a1e..c7352fd 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #! /usr/bin/env python from distutils.core import setup -from mimedecode import __version__, __copyright__ +from __version__ import __version__, __copyright__, __license__ setup(name = "mimedecode", version = __version__, @@ -10,7 +10,7 @@ setup(name = "mimedecode", author = "Oleg Broytman", author_email = "phd@phdru.name", url = "http://phdru.name/Software/Python/#mimedecode", - license = "GPL", + license = __license__, platforms = "All", scripts = ['mimedecode.py'] ) -- 2.39.2