<commit_before>import os
from setuptools import setup
from pip.req import parse_requirements

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = [str(r.req) for r in parse_requirements("requirements/production.txt")]
TEST_REQUIREMENTS = [str(r.req) for r in parse_requirements("requirements/test.txt")]

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
    name='zinnia-drupal',
    version='0.1.2',
    packages=['zinnia_drupal', 'zinnia_drupal.management', 'zinnia_drupal.management.commands'],
    include_package_data=True,
    license='BSD',  # example license
    description='Helper application for importing content from Drupal database into Zinnia.',
    long_description=README,
    url='https://github.com/azaghal/zinnia-drupal',
    author='<NAME>',
    author_email='<EMAIL>',
    install_requires=INSTALL_REQUIREMENTS,<commit_msg>Fixed the setup script use of pip.req.parse_requirements function (pip download session must be passed in as well).<commit_after>import os
import pip

from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
INSTALL_REQUIREMENTS = [str(r.req) for r in pip.req.parse_requirements("requirements/production.txt", session=pip.download.PipSession())]
TEST_REQUIREMENTS = [str(r.req) for r in pip.req.parse_requirements("requirements/test.txt", session=pip.download.PipSession())]

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
    name='zinnia-drupal',
    version='0.1.2',
    packages=['zinnia_drupal', 'zinnia_drupal.management', 'zinnia_drupal.management.commands'],
    include_package_data=True,
    license='BSD',  # example license
    description='Helper application for importing content from Drupal database into Zinnia.',
    long_description=README,
    url='https://github.com/azaghal/zinnia-drupal',
    author='<NAME>',
    author_email='<EMAIL>',
    install_requires=INSTALL_REQUIREMENTS,
{'fraction_non_alphanumeric': 0.1340941512125535, 'fraction_numerical': 0.0028530670470756064, 'mean_word_length': 5.53416149068323, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2663067', 'n_tokens_mistral': 709, 'n_tokens_neox': 699, 'n_words': 135}