<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

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

version = open('VERSION').read().replace('\n', '')
readme = open('README.rst').read()

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist')
    print("You probably want to also tag the version now:")
    print("  git tag -a %s -m 'version %s'" % (version, version))
    print("  git push --tags")
    sys.exit()

setup(
    name='django-cruds-adminlte',
    version=version,
    description="""django-cruds-adminlte is simple drop-in django app that creates CRUD for faster prototyping.""",  # noqa
    test_suite="runtests.run_tests",
    long_description=readme,
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/oscarmlage/django-cruds-adminlte',
    packages=[
        'cruds_adminlte',
        'cruds_adminlte.templatetags',
    ],
    include_package_data=True,
    install_requires=[
        'django-crispy-forms',
        'djangoajax',
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-cruds-adminlte',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
)
<commit_msg>Use git commit for versioning builds<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
from codecs import open
import subprocess


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

version = open('VERSION').read().replace('\n', '')
readme = open('README.rst').read()


if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist')
    print("You probably want to also tag the version now:")
    print("  git tag -a %s -m 'version %s'" % (version, version))
    print("  git push --tags")
    sys.exit()
else:
    if os.path.exists(os.path.join(os.path.dirname(__file__), '.git')):
        cmd = 'git rev-parse --verify --short HEAD'.split(' ')
        git_hash = subprocess.check_output(cmd).decode().replace('\n', '')
        version = "%s+git.%s" % (version, git_hash)


setup(
    name='django-cruds-adminlte',
    version=version,
    description="""django-cruds-adminlte is simple drop-in django app that creates CRUD for faster prototyping.""",  # noqa
    test_suite="runtests.run_tests",
    long_description=readme,
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/oscarmlage/django-cruds-adminlte',
    packages=[
        'cruds_adminlte',
        'cruds_adminlte.templatetags',
    ],
    include_package_data=True,
    install_requires=[
        'django-crispy-forms',
        'djangoajax',
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-cruds-adminlte',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
)

{'fraction_non_alphanumeric': 0.15478164731896074, 'fraction_numerical': 0.006080707573244887, 'mean_word_length': 2.9294245385450597, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6354301', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1125, 'n_words': 271}