<commit_before># -*- coding: utf-8; -*-
import os
import re
import ConfigParser
from setuptools import setup, find_packages

versionf_content = open("vyi/__init__.py").read()
version_rex = r'^__version__ = [\'"]([^\'"]*)[\'"]$'
m = re.search(version_rex, versionf_content, re.M)
if m:
    version = m.group(1)
else:
    raise RuntimeError('Unable to find version string')


def get_versions():
    """picks the versions from version.cfg and returns them as dict"""
    versions_cfg = os.path.join(os.path.dirname(__file__), 'versions.cfg')
    config = ConfigParser.ConfigParser()
    config.optionxform = str
    config.readfp(open(versions_cfg))
    return dict(config.items('versions'))


def nailed_requires(requirements, pat=re.compile(r'^(.+)(\[.+\])?$')):
    """returns the requirements list with nailed versions"""
    versions = get_versions()
    res = []
    for req in requirements:
        if '[' in req:
            name = req.split('[', 1)[0]
        else:
            name = req
        if name in versions:
            res.append('%s==%s' % (req, versions[name]))
        else:
            res.append(req)
    return res


def read(path):
    return open(os.path.join(os.path.dirname(__file__), path)).read()


here = os.path.abspath(os.path.dirname(__file__))
readme = open(os.path.join(here, 'README.md')).read()
changes = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
    'crate',
    'crash',
    'gevent',
    'lovely.pyrest',
    'pyramid',
    'pyramid_mailer',
]

test_requires = requires + [
]

setup(name='vyi',
      version=version,
      description='vyi',
      long_description='validate your idea',
      classifiers=[
          "Programming Language :: Python",
      ],
      author='<NAME>',
      author_email='<EMAIL>',
      url='https://github.com/lumannnn/vyi',
      keywords='vyi validate your idea',
      license='apache license 2.0',
      packages=find_packages(),
      namespace_packages=['vyi'],
      include_package_data=True,
      extras_require=dict(
          test=nailed_requires(test_requires),
      ),
      zip_safe=False,
      install_requires=requires,
      tests_require=test_requires,
      test_suite="",
      entry_points={
          'paste.app_factory': [
              'main=vyi.server:app_factory'
          ],
          'paste.server_factory': [
              'server=vyi.green:server_factory',
          ],
          'console_scripts': [
              'app=pyramid.scripts.pserve:main',
          ],
      },
      )<commit_msg>added sqlalchemy; pep8<commit_after># -*- coding: utf-8; -*-
import os
import re
import ConfigParser
from setuptools import setup, find_packages

VERSIONFILE = open("vyi/__init__.py").read()
VERSION_REGEX = r'^__version__ = [\'"]([^\'"]*)[\'"]$'
M = re.search(VERSION_REGEX, VERSIONFILE, re.M)
if M:
    VERSION = M.group(1)
else:
    raise RuntimeError('Unable to find version string')


def get_versions():
    """picks the versions from version.cfg and returns them as dict"""
    versions_cfg = os.path.join(os.path.dirname(__file__), 'versions.cfg')
    config = ConfigParser.ConfigParser()
    config.optionxform = str
    config.readfp(open(versions_cfg))
    return dict(config.items('versions'))


def nailed_requires(requirements):
    """returns the requirements list with nailed versions"""
    versions = get_versions()
    res = []
    for req in requirements:
        if '[' in req:
            name = req.split('[', 1)[0]
        else:
            name = req
        if name in versions:
            res.append('%s==%s' % (req, versions[name]))
        else:
            res.append(req)
    return res


def read(path):
    """ read a file """
    return open(os.path.join(os.path.dirname(__file__), path)).read()


HERE = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(HERE, 'README.md')).read()
CHANGES = open(os.path.join(HERE, 'CHANGES.txt')).read()

REQUIRES = [
    'crate [sqlalchemy]',
    'crash',
    'gevent',
    'lovely.pyrest',
    'pyramid',
    'pyramid_mailer',
]

TEST_REQUIRES = REQUIRES + [
]

setup(name='vyi',
      version=VERSION,
      description='vyi',
      long_description='validate your idea',
      classifiers=[
          "Programming Language :: Python",
      ],
      author='<NAME>',
      author_email='<EMAIL>',
      url='https://github.com/lumannnn/vyi',
      keywords='vyi validate your idea',
      license='apache license 2.0',
      packages=find_packages(),
      namespace_packages=['vyi'],
      include_package_data=True,
      extras_require=dict(
          test=nailed_requires(TEST_REQUIRES),
      ),
      zip_safe=False,
      install_requires=REQUIRES,
      tests_require=TEST_REQUIRES,
      test_suite="",
      entry_points={
          'paste.app_factory': [
              'main=vyi.server:app_factory'
          ],
          'paste.server_factory': [
              'server=vyi.green:server_factory',
          ],
          'console_scripts': [
              'app=pyramid.scripts.pserve:main',
          ],
      },
      )
{'fraction_non_alphanumeric': 0.15172550575168584, 'fraction_numerical': 0.002578341927806426, 'mean_word_length': 2.7108167770419427, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2902201', 'n_tokens_mistral': 1645, 'n_tokens_neox': 1629, 'n_words': 305}