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

from setuptools import setup
import dbkit

setup(
    name='dbkit',
    version=dbkit.__version__,
    description='DB-API made easier',
    long_description=open('README').read(),
    url='https://github.com/kgaughan/dbkit/',
    license='MIT',
    py_modules=['dbkit'],

    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
    ],

    author=dbkit.__author__,
    author_email=dbkit.__email__
)<commit_msg>Record metadata in one spot only and avoid importing dbkit.<commit_after>#!/usr/bin/env python

from setuptools import setup
import re


def read(filename):
    with open(filename, 'r') as fh:
        return fh.read()


def get_metadata(module_path):
    """Extract the metadata from a module file."""
    matches = re.finditer(
        r"^__(\w+?)__ *= *'(.*?)'$",
        read(module_path),
        re.MULTILINE)
    return dict(
        (match.group(1), match.group(2).decode('unicode_escape'))
        for match in matches)


META = get_metadata('dbkit.py')


setup(
    name='dbkit',
    version=META['version'],
    description='DB-API made easier',
    long_description=read('README'),
    url='https://github.com/kgaughan/dbkit/',
    license='MIT',
    py_modules=['dbkit'],

    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
    ],

    author=META['author'],
    author_email=META['email']
)
{'fraction_non_alphanumeric': 0.14781216648879403, 'fraction_numerical': 0.0021344717182497333, 'mean_word_length': 2.964059196617336, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5020468', 'n_tokens_mistral': 578, 'n_tokens_neox': 554, 'n_words': 132}