<commit_before>import sys
import os
from setuptools import setup

# If you change this version, change it also in docs/conf.py
version = "1.0"

doc_dir = os.path.join(os.path.dirname(__file__), "docs")
index_filename = os.path.join(doc_dir, "index.txt")
news_filename = os.path.join(doc_dir, "news.txt")
long_description = """\
The main website for pip is `www.pip-installer.org
<http://www.pip-installer.org>`_.  You can also install
the `in-development version <https://github.com/pypa/pip/tarball/master#egg=pip-dev>`_
of pip with ``easy_install pip==dev``.
"""
f = open(index_filename)
long_description += f.read().split("split here", 1)[1]
f.close()
f = open(news_filename)
long_description += "\n\n" + f.read()
f.close()

setup(name="pip",
      version=version,
      description="pip installs packages. Python packages. An easy_install replacement",
      long_description=long_description,
      classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Software Development :: Build Tools',
        'Programming Language :: Python :: 2',<commit_msg>Updated setup.py to handle unicode date in the long_description.<commit_after>import codecs
import os
import sys

from setuptools import setup

# If you change this version, change it also in docs/conf.py
version = "1.0"
doc_dir = os.path.join(os.path.dirname(__file__), "docs")

def read(filename):
    if sys.version_info >= (3,):
        unicode = str
    filename = os.path.join(doc_dir, filename)
    return unicode(codecs.open(filename, encoding='utf-8').read())

long_description = """\
The main website for pip is `www.pip-installer.org
<http://www.pip-installer.org>`_.  You can also install
the `in-development version <https://github.com/pypa/pip/tarball/master#egg=pip-dev>`_
of pip with ``easy_install pip==dev``.
"""
long_description += read("index.txt").split("split here", 1)[1]
long_description += "\n\n" + read("news.txt")

setup(name="pip",
      version=version,
      description="pip installs packages. Python packages. An easy_install replacement",
      long_description=long_description,
      classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Software Development :: Build Tools',
        'Programming Language :: Python :: 2',
{'fraction_non_alphanumeric': 0.14123376623376624, 'fraction_numerical': 0.005681818181818182, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '993278', 'n_tokens_mistral': 786, 'n_tokens_neox': 746, 'n_words': 204}