<commit_before>from setuptools import setup, find_packages

setup(
    name='smartmin',
    version=__import__('smartmin').__version__,
    license="BSD",

    install_requires=[
        "django>=1.7",
        "django-guardian==1.3",
        "django_compressor",
        "pytz",
        "xlrd",
        "xlwt",
    ],

    description="Scaffolding system for Django object management.",
    long_description=open('README.rst').read(),

    author='Nyaruka Ltd',
    author_email='<EMAIL>',

    url='http://github.com/nyaruka/smartmin',
    download_url='http://github.com/nyaruka/smartmin/downloads',

    include_package_data=True,

    packages=find_packages(),<commit_msg>Read requirements from file to reduce duplication<commit_after>from setuptools import setup, find_packages


def _is_requirement(line):
    """Returns whether the line is a valid package requirement."""
    line = line.strip()
    return line and not line.startswith("#")


def _read_requirements(filename):
    """Parses a file for pip installation requirements."""
    with open(filename) as requirements_file:
        contents = requirements_file.read()
    return [line.strip() for line in contents.splitlines() if _is_requirement(line)]


setup(
    name='smartmin',
    version=__import__('smartmin').__version__,
    license="BSD",

    install_requires=_read_requirements("requirements/base.txt"),
    tests_require=_read_requirements("requirements/tests.txt"),

    description="Scaffolding system for Django object management.",
    long_description=open('README.rst').read(),

    author='Nyaruka Ltd',
    author_email='<EMAIL>',

    url='http://github.com/nyaruka/smartmin',
    download_url='http://github.com/nyaruka/smartmin/downloads',

    include_package_data=True,

    packages=find_packages(),
{'fraction_non_alphanumeric': 0.13169642857142858, 'fraction_numerical': 0.002232142857142857, 'mean_word_length': 4.1082621082621085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, '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': '5761767', 'n_tokens_mistral': 546, 'n_tokens_neox': 526, 'n_words': 101}