summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Meliza <dan@meliza.org>2017-10-02 12:15:36 -0400
committerMario Mulansky <mario.mulansky@gmx.net>2017-10-04 21:03:20 -0700
commitecd4b5f0f7e93859c1262593e2c09e1eb6775819 (patch)
treeb7c86e256ed73c4900659252758d8381046488ca
parentb5d6cd7bfab62fd7fb96570cf99b87aeed419a4d (diff)
defer numpy import to allow install_requires to do its job (fixes #24)
-rw-r--r--Changelog6
-rw-r--r--setup.py11
2 files changed, 15 insertions, 2 deletions
diff --git a/Changelog b/Changelog
index 2be5e52..21b7cb0 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+PySpike v0.5:
+ * First beta release
+ * Python 2.6 support removed
+ * Python 3.6 support added
+ * several bugfixes
+
PySpike v0.4:
* Python 3 support (thanks to Igor Gnatenko)
* list interface to SpikeTrain class
diff --git a/setup.py b/setup.py
index f2315f2..afcfa16 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,6 @@ Distributed under the BSD License
from setuptools import setup, find_packages
from distutils.extension import Extension
import os.path
-import numpy
try:
from Cython.Distutils import build_ext
@@ -21,6 +20,14 @@ except ImportError:
else:
use_cython = True
+
+class numpy_include(object):
+ """Defers import of numpy until install_requires is through"""
+ def __str__(self):
+ import numpy
+ return numpy.get_include()
+
+
if os.path.isfile("pyspike/cython/cython_add.c") and \
os.path.isfile("pyspike/cython/cython_profiles.c") and \
os.path.isfile("pyspike/cython/cython_distances.c"):
@@ -58,7 +65,7 @@ setup(
version='0.5.2',
cmdclass=cmdclass,
ext_modules=ext_modules,
- include_dirs=[numpy.get_include()],
+ include_dirs=[numpy_include()],
description='A Python library for the numerical analysis of spike\
train similarity',
author='Mario Mulansky',