<commit_before>#!/usr/bin/env python

import os, re, sys
from distutils.version import LooseVersion
from distutils.core import setup
from setuptools import find_packages
from arm.prompt import query_true_false


VERSIONFILE="arm/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
    verstr = mo.group(1)
else:
    raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))


dependencies = [
    'ansible',
    'requests',
    'gitpython==0.3.2.RC1',
    'semantic_version',
    'colorama'
]

links = [

]

# pycrypto is a dependency of ansible & git-python and has issues compiling on OSX with XCode 5.1 and above.
# display warning. need to set this before running setup for ansible-role-manager
# >> export ARCHFLAGS='-Wno-error=unused-command-line-argument-hard-error-in-future'
if 'install' in sys.argv:
    import subprocess
    try:
        p = subprocess.Popen(['xcodebuild','-version'], stdout=subprocess.PIPE)
        out, err = p.communicate()
        ver_re = re.compile('(?P<version>\d(.\d){0,2})')
        ver_match = ver_re.search(out)
        if not os.environ.get('ARCHFLAGS',False) \
           and ver_match \
           and LooseVersion('5.1') <= LooseVersion(ver_match.groupdict()['version']):
            
            print "Warning :"
            print "\t`pycrypto` on OSX with XCode 5.1 and above will not compile without ARCHFLAGS being set."
            print "\tsee http://mirskytech.github.io/ansible-role-manager/installation.html"
            if not query_true_false("Would you like to continue?", default='y'):
                exit(0)
    
    except OSError as e:
        # we're probably not running on OSX
        pass

with open('README.rst') as file:
    long_description = file.read()

setup(name='ansible-role-manager',
      version=verstr,
      description='A tool for installing and managing Ansible roles, playbooks & modules.',
      author='<NAME>',
      author_email='<EMAIL>',
      scripts=['bin/arm'],
      url='http://mirskytech.github.io/ansible-role-manager/',
      packages=find_packages(),
      include_package_data=True,
      install_requires=dependencies,
      dependency_links = links,<commit_msg>print mac osx warning, don't offer option to exit<commit_after>#!/usr/bin/env python

import os, re, sys
from distutils.version import LooseVersion
from distutils.core import setup
from setuptools import find_packages


VERSIONFILE="arm/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
    verstr = mo.group(1)
else:
    raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))


dependencies = [
    'ansible',
    'requests',
    'gitpython==0.3.2.RC1',
    'semantic_version',
    'colorama'
]

links = [

]

# pycrypto is a dependency of ansible & git-python and has issues compiling on OSX with XCode 5.1 and above.
# display warning. need to set this before running setup for ansible-role-manager
# >> export ARCHFLAGS='-Wno-error=unused-command-line-argument-hard-error-in-future'
if 'install' in sys.argv:
    import subprocess
    try:
        p = subprocess.Popen(['xcodebuild','-version'], stdout=subprocess.PIPE)
        out, err = p.communicate()
        ver_re = re.compile('(?P<version>\d(.\d){0,2})')
        ver_match = ver_re.search(out)
        if not os.environ.get('ARCHFLAGS',False) \
           and ver_match \
           and LooseVersion('5.1') <= LooseVersion(ver_match.groupdict()['version']):
            
            print "Warning :"
            print "\t`pycrypto` on OSX with XCode 5.1 and above will not compile without ARCHFLAGS being set."
            print "\tsee http://mirskytech.github.io/ansible-role-manager/installation.html"
    
    except OSError as e:
        # we're probably not running on OSX
        pass

with open('README.rst') as file:
    long_description = file.read()

setup(name='ansible-role-manager',
      version=verstr,
      description='A tool for installing and managing Ansible roles, playbooks & modules.',
      author='<NAME>',
      author_email='<EMAIL>',
      scripts=['bin/arm'],
      url='http://mirskytech.github.io/ansible-role-manager/',
      packages=find_packages(),
      include_package_data=True,
      install_requires=dependencies,
      dependency_links = links,
{'fraction_non_alphanumeric': 0.13436866981769074, 'fraction_numerical': 0.006076975016880486, 'mean_word_length': 3.1110083256244216, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, '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': '7668552', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1400, 'n_words': 348}