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

import ast
import os
import sys


class MetadataFinder(ast.NodeVisitor):
    def __init__(self):
        self.version = None
        self.summary = None
        self.author = None
        self.email = None
        self.uri = None
        self.licence = None

    def visit_Assign(self, node):
        if node.targets[0].id == '__version__':
            self.version = node.value.s
        elif node.targets[0].id == '__summary__':
            self.summary = node.value.s
        elif node.targets[0].id == '__author__':
            self.author = node.value.s
        elif node.targets[0].id == '__email__':
            self.email = node.value.s
        elif node.targets[0].id == '__uri__':
            self.uri = node.value.s
        elif node.targets[0].id == '__license__':
            self.license = node.value.s


with open(os.path.join('djstripe', '__init__.py')) as open_file:
    finder = MetadataFinder()
    finder.visit(ast.parse(open_file.read()))

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload --sign')
    os.system('python setup.py bdist_wheel upload --sign')
    sys.exit()

if sys.argv[-1] == 'tag':
    print("Tagging the version on github:")
    os.system("git tag -a %s -m 'version %s'" % (finder.version, finder.version))
    os.system("git push --tags")
    sys.exit()

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

INSTALL_REQUIRES = [
    'django!=1.9,>=1.8',
    'django-braces>=1.8.1',
    'django-model-utils>=2.3.1',
    'django-polymorphic>=0.7.1',
    'jsonfield>=1.0.3',
    'pytz>=2015.4',
    'stripe>=1.24.1',
    'tqdm>=4.5.0',
]

setup(
    name='dj-stripe',
    version=finder.version,
    description=finder.summary,
    long_description=readme + '\n\n' + history,
    author=finder.author,
    author_email=finder.email,
    url=finder.uri,
    packages=[
        'djstripe',
    ],
    package_dir={'djstripe': 'djstripe'},<commit_msg>Update install_requires in setup.py<commit_after>#!/usr/bin/env python

import ast
import os
import sys


class MetadataFinder(ast.NodeVisitor):
    def __init__(self):
        self.version = None
        self.summary = None
        self.author = None
        self.email = None
        self.uri = None
        self.licence = None

    def visit_Assign(self, node):
        if node.targets[0].id == '__version__':
            self.version = node.value.s
        elif node.targets[0].id == '__summary__':
            self.summary = node.value.s
        elif node.targets[0].id == '__author__':
            self.author = node.value.s
        elif node.targets[0].id == '__email__':
            self.email = node.value.s
        elif node.targets[0].id == '__uri__':
            self.uri = node.value.s
        elif node.targets[0].id == '__license__':
            self.license = node.value.s


with open(os.path.join('djstripe', '__init__.py')) as open_file:
    finder = MetadataFinder()
    finder.visit(ast.parse(open_file.read()))

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload --sign')
    os.system('python setup.py bdist_wheel upload --sign')
    sys.exit()

if sys.argv[-1] == 'tag':
    print("Tagging the version on github:")
    os.system("git tag -a %s -m 'version %s'" % (finder.version, finder.version))
    os.system("git push --tags")
    sys.exit()

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

INSTALL_REQUIRES = [
    'django!=1.9,>=1.8',  # Django has a regression in 1.9, see #275
    'django-braces>=1.9.0',
    'django-model-utils>=2.5.2',
    'django-polymorphic>=1.0',
    'jsonfield>=1.0.3',
    'pytz>=2016.6.1',
    'stripe>=1.41.1',
    'tqdm>=4.8.4',
    'python-doc-inherit~=0.3.0',
    'mock-django~=0.6.10',
]

setup(
    name='dj-stripe',
    version=finder.version,
    description=finder.summary,
    long_description=readme + '\n\n' + history,
    author=finder.author,
    author_email=finder.email,
    url=finder.uri,
    packages=[
        'djstripe',
    ],
    package_dir={'djstripe': 'djstripe'},
{'fraction_non_alphanumeric': 0.16550764951321278, 'fraction_numerical': 0.019471488178025034, 'mean_word_length': 2.5928393005828476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '1473897', 'n_tokens_mistral': 1543, 'n_tokens_neox': 1487, 'n_words': 290}