diff --git a/README.rst b/README.rst index 9bbd7c6..a8dbb3c 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -ATRCopy +atrcopy ======= Utilities to list files on and extract files from Atari 8-bit emulator disk @@ -7,7 +7,13 @@ images. Eventually, I hope to add support for these images to pyfilesystem. Prerequisites ------------- -Starting with ATRcopy 2.0, numpy is required. +Starting with atrcopy 2.0, numpy is required. + +The standard python install tool, pip, does not seem to be able to handle the +automatic installation of numpy, so to install atrcopy, use:: + + pip install numpy + pip install atrcopy References diff --git a/atrcopy.py b/atrcopy.py index 2f024b8..c33d937 100755 --- a/atrcopy.py +++ b/atrcopy.py @@ -5,7 +5,10 @@ __version__ = "2.1.0" import types -import numpy as np +try: + import numpy as np +except ImportError: + raise RuntimeError("atrcopy %s requires numpy" % __version__) class AtrError(RuntimeError): diff --git a/setup.py b/setup.py index 4f5d179..9d761cb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,12 @@ try: except ImportError: from distutils.core import setup -import atrcopy +try: + import atrcopy + version = atrcopy.__version__ +except RuntimeError, e: + # If numpy isn't present, pull the version number from the error string + version = str(e).split()[1] classifiers = [ "Programming Language :: Python :: 2", @@ -19,7 +24,7 @@ with open("README.rst", "r") as fp: long_description = fp.read() setup(name="atrcopy", - version=atrcopy.__version__, + version=version, author="Rob McMullen", author_email="feedback@playermissile.com>", url="https://github.com/robmcmullen/atrcopy",