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

"""Setup script for the package."""

import os
import sys
import logging

import setuptools


PACKAGE_NAME = 'gitman'
MINIMUM_PYTHON_VERSION = '3.5'


def check_python_version():
    """Exit when the Python version is too low."""
    if sys.version < MINIMUM_PYTHON_VERSION:
        sys.exit("Python {0}+ is required.".format(MINIMUM_PYTHON_VERSION))


def read_package_variable(key, filename='__init__.py'):
    """Read the value of a variable from the package without importing."""
    module_path = os.path.join(PACKAGE_NAME, filename)
    with open(module_path) as module:
        for line in module:
            parts = line.strip().split(' ', 2)
            if parts[:-1] == [key, '=']:
                return parts[-1].strip("'")
    logging.warning("'%s' not found in '%s'", key, module_path)
    return None


def build_description():
    """Build a description for the project from documentation files."""
    try:
        readme = open("README.rst").read()
        changelog = open("CHANGELOG.rst").read()
    except IOError:
        return "<placeholder>"
    else:
        return readme + '\n' + changelog


check_python_version()

setuptools.setup(
    name=read_package_variable('__project__'),
    version=read_package_variable('__version__'),

    description=read_package_variable('DESCRIPTION'),
    url='https://jacebrowning/gitman',
    author='<NAME>',
    author_email='<EMAIL>',

    packages=setuptools.find_packages(),

    entry_points={'console_scripts': [
        read_package_variable('CLI') + ' = gitman.cli:main',
        'git-' + read_package_variable('PLUGIN') + ' = gitman.plugin:main',
        # Legacy entry points:
        'gdm = gitman.cli:main',
    ]},

    long_description=build_description(),
    license='MIT',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',<commit_msg>Fixed url to point at full URL<commit_after>#!/usr/bin/env python

"""Setup script for the package."""

import os
import sys
import logging

import setuptools


PACKAGE_NAME = 'gitman'
MINIMUM_PYTHON_VERSION = '3.5'


def check_python_version():
    """Exit when the Python version is too low."""
    if sys.version < MINIMUM_PYTHON_VERSION:
        sys.exit("Python {0}+ is required.".format(MINIMUM_PYTHON_VERSION))


def read_package_variable(key, filename='__init__.py'):
    """Read the value of a variable from the package without importing."""
    module_path = os.path.join(PACKAGE_NAME, filename)
    with open(module_path) as module:
        for line in module:
            parts = line.strip().split(' ', 2)
            if parts[:-1] == [key, '=']:
                return parts[-1].strip("'")
    logging.warning("'%s' not found in '%s'", key, module_path)
    return None


def build_description():
    """Build a description for the project from documentation files."""
    try:
        readme = open("README.rst").read()
        changelog = open("CHANGELOG.rst").read()
    except IOError:
        return "<placeholder>"
    else:
        return readme + '\n' + changelog


check_python_version()

setuptools.setup(
    name=read_package_variable('__project__'),
    version=read_package_variable('__version__'),

    description=read_package_variable('DESCRIPTION'),
    url='https://github.com/jacebrowning/gitman',
    author='<NAME>',
    author_email='<EMAIL>',

    packages=setuptools.find_packages(),

    entry_points={'console_scripts': [
        read_package_variable('CLI') + ' = gitman.cli:main',
        'git-' + read_package_variable('PLUGIN') + ' = gitman.plugin:main',
        # Legacy entry points:
        'gdm = gitman.cli:main',
    ]},

    long_description=build_description(),
    license='MIT',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
{'fraction_non_alphanumeric': 0.13878326996197718, 'fraction_numerical': 0.003326996197718631, 'mean_word_length': 3.2386706948640485, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '7668476', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1252, 'n_words': 299}