<commit_before>from distutils.core import setup
import BiblioPixelAnimations
import urllib2, json
head = urllib2.urlopen("https://api.github.com/repos/ManiacalLabs/BiblioPixelAnimations/git/refs/head").read()
head_data = json.loads(head)
_ver = "9.9.9b"
if len(head_data) > 0:
    _ver = head_data[0]["object"]["sha"]

if not 'pip' in __file__:
    print """
    This installer MUST be run from pip!
    Please install using the following command:
    pip install git+https://github.com/ManiacalLabs/BiblioPixelAnimations.git --upgrade
    """
else:
    setup(
        name='BiblioPixelAnimations',
        version=_ver,
        description='BiblioPixelAnimations is an animation repository for animation classes that work with BiblioPixel: http://github.com/maniacallabs/BiblioPixel',
        author='<NAME>',
        author_email='<EMAIL>',
        url='http://github.com/maniacallabs/BiblioPixelAnimations/',
        license='MIT',
        packages=['BiblioPixelAnimations', 'BiblioPixelAnimations.matrix', 'BiblioPixelAnimations.strip'],<commit_msg>adding try/except to install<commit_after>from distutils.core import setup
import BiblioPixelAnimations
import urllib2, json
_ver = "BAD_INSTALL"

try:
    head = urllib2.urlopen("https://api.github.com/repos/ManiacalLabs/BiblioPixelAnimations/git/refs/head").read()
    head_data = json.loads(head)
    if len(head_data) > 0:
        _ver = head_data[0]["object"]["sha"]
except:
    pass

if not 'pip' in __file__:
    print """
    This installer MUST be run from pip!
    Please install using the following command:
    pip install git+https://github.com/ManiacalLabs/BiblioPixelAnimations.git --upgrade
    """
else:
    setup(
        name='BiblioPixelAnimations',
        version=_ver,
        description='BiblioPixelAnimations is an animation repository for animation classes that work with BiblioPixel: http://github.com/maniacallabs/BiblioPixel',
        author='<NAME>',
        author_email='<EMAIL>',
        url='http://github.com/maniacallabs/BiblioPixelAnimations/',
        license='MIT',
        packages=['BiblioPixelAnimations', 'BiblioPixelAnimations.matrix', 'BiblioPixelAnimations.strip'],
{'fraction_non_alphanumeric': 0.12055427251732101, 'fraction_numerical': 0.005080831408775982, 'mean_word_length': 4.002309468822171, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '270309', 'n_tokens_mistral': 695, 'n_tokens_neox': 669, 'n_words': 139}