<commit_before>#!/usr/bin/env python
#from distutils.core import setup
from setuptools import setup, find_packages
from tweepy import __version__
from pip.req import parse_requirements

install_reqs = parse_requirements('requirements.txt')
reqs = [str(req.req) for req in install_reqs]

setup(name="tweepy",
      version=__version__,
      description="Twitter library for python",
      license="MIT",
      author="<NAME>",
      author_email="<EMAIL>",
      url="http://github.com/tweepy/tweepy",
      packages=find_packages(exclude=['tests']),
      install_requires=reqs,
      keywords="twitter library",
      zip_safe=True)<commit_msg>Fix setup.py to not attempt importing uninstalled libraries.<commit_after>#!/usr/bin/env python
#from distutils.core import setup
import re
from setuptools import setup, find_packages
from pip.req import parse_requirements

VERSIONFILE = "tweepy/__init__.py"
ver_file = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, ver_file, re.M)

if mo:
    version = mo.group(1)
else:
    raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))

install_reqs = parse_requirements('requirements.txt')
reqs = [str(req.req) for req in install_reqs]

setup(name="tweepy",
      version=version,
      description="Twitter library for python",
      license="MIT",
      author="<NAME>",
      author_email="<EMAIL>",
      url="http://github.com/tweepy/tweepy",
      packages=find_packages(exclude=['tests']),
      install_requires=reqs,
      keywords="twitter library",
      zip_safe=True)
{'fraction_non_alphanumeric': 0.13739021329987453, 'fraction_numerical': 0.0006273525721455458, 'mean_word_length': 4.406779661016949, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '3445811', 'n_tokens_mistral': 523, 'n_tokens_neox': 509, 'n_words': 113}