Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Adds check for nupic.research.bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
scottpurdy committed Dec 16, 2016
1 parent 5c3edea commit 9ab2b22
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions setup.py
@@ -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:
#
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9ab2b22

Please sign in to comment.