Permalink
Browse files

Adds check for nupic.research.bindings

  • Loading branch information...
1 parent 5c3edea commit 9ab2b22f65cc244168c8f8a938ea8d4d2c33fc51 @scottpurdy scottpurdy committed Dec 16, 2016
Showing with 12 additions and 2 deletions.
  1. +12 −2 setup.py
View
@@ -1,6 +1,6 @@
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
-# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
+# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
@@ -51,7 +51,17 @@ def nupicBindingsPrereleaseInstalled():
@return: boolean
"""
try:
- nupicDistribution = pkg_resources.get_distribution("nupic.bindings")
+ nupicDistribution = pkg_resources.get_distribution(distributionName)
+ if pkg_resources.parse_version(nupicDistribution.version).is_prerelease:
+ # A pre-release dev version of nupic.bindings is installed.
+ return True
+ except pkg_resources.DistributionNotFound:
+ pass # Silently ignore. The absence of nupic.bindings will be handled by
+ # setuptools by default
+
+ # Also check for nupic.research.bindings
+ try:
+ nupicDistribution = pkg_resources.get_distribution("nupic.research.bindings")
if pkg_resources.parse_version(nupicDistribution.version).is_prerelease:
# A pre-release dev version of nupic.bindings is installed.
return True

0 comments on commit 9ab2b22

Please sign in to comment.