# -*- coding: utf-8 -*-
#
# To Upload to PyPI by executing:  python3 setup.py sdist upload -r pypi


"""Setup.py for Python, as Generic as possible."""


import os
from setuptools import setup


try:
    long_description = open('README.md', 'rt').read()
    long_description += open('ChangeLog.md', 'rt').read()
except Exception:
    long_description = ""


MODULE_PATH = os.path.join(os.getcwd(), "gsub", "__init__.py")
CUR_DIR = os.path.dirname(os.path.abspath(__file__))


def find_this(search, filename=MODULE_PATH):
    """Take a string and a filename path string and return the found value."""
    if not search:
        return
    for line in open(str(filename)).readlines():
        if search.lower() in line.lower():
            line = line.split("=")[1].strip()
            if "'" in line or '"' in line or '"""' in line:
                line = line.replace("'", "").replace('"', '').replace('"""', '')
            return line


install_requires = open('requirements.txt', 'r').read().split('\r\n')
setup(
    name="gsub",
    description="Replacement for git-submodule",
    long_description=long_description,

    version=find_this("__version__"),

    author=find_this("__author__"),
    author_email=find_this("__email__"),
    maintainer=find_this("__author__"),
    maintainer_email=find_this("__email__"),

    url=find_this("__source__"),
    license=find_this("__license__"),


    install_requires=install_requires,

    packages=['gsub'],
    zip_safe=True,


    keywords=['git', 'git submodule'],


    classifiers=[

        'Development Status :: 5 - Development',

        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: System Administrators',
        'Intended Audience :: Information Technology',
        'Intended Audience :: Other Audience',

        'Natural Language :: English',

        'Operating System :: OS Independent',
        'Operating System :: POSIX :: Linux',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: MacOS :: MacOS X',

        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',

        'Programming Language :: Python :: Implementation :: CPython',

        'Topic :: Software Development',

    ],
    entry_points={
        'console_scripts': [
            'gsub = gsub.main:main',
        ],
    },
)

@@ -21,1377 +21,271 @@
 -*-%0A
-#%0A# To Upload to PyPI by executing:  python3 setup.py sdist upload -r pypi%0A%0A%0A%22%22%22Setup.py for Python, as Generic as possible.%22%22%22%0A%0A%0Aimport os%0Afrom setuptools import setup%0A%0A%0Atry:%0A    long_description = open('README.md', 'rt').read()%0A    long_description += open('ChangeLog.md', 'rt').read()%0Aexcept Exception:%0A    long_description = %22%22%0A%0A%0AMODULE_PATH = os.path.join(os.getcwd(), %22gsub%22, %22__init__.py%22)%0ACUR_DIR = os.path.dirname(os.path.abspath(__file__))%0A%0A%0Adef find_this(search, filename=MODULE_PATH):%0A    %22%22%22Take a string and a filename path string and return the found value.%22%22%22%0A    if not search:%0A        return%0A    for line in open(str(filename)).readlines():%0A        if search.lower() in line.lower():%0A            line = line.split(%22=%22)%5B1%5D.strip()%0A            if %22'%22 in line or '%22' in line or '%22%22%22' in line:%0A                line = line.replace(%22'%22, %22%22).replace('%22', '').replace('%22%22%22', '')%0A            return line%0A%0A%0Ainstall_requires = open('requirements.txt', 'r').read().split('%5Cr%5Cn')%0Asetup(%0A    name=%22gsub%22,%0A    description=%22Replacement for git-submodule%22,%0A    long_description=long_description,%0A%0A    version=find_this(%22__version__%22),%0A%0A    author=find_this(%22__author__%22),%0A    author_email=find_this(%22__email__%22),%0A    maintainer=find_this(%22__author__%22),%0A    maintainer_email=find_this(%22__email__%22),%0A%0A    url=find_this(%22__source__%22),%0A    license=find_this(%22__license__%22)
+%0Aimport os%0Afrom setuptools import setup%0A%0A%0Asetup(%0A    name=%22gsub%22,%0A    description=%22Replacement for git-submodule%22,%0A%0A    version=%220.1.0%22,%0A%0A    author=%22Amit Upadhyay%22,%0A    author_email=%22code@amitu.com%22,%0A%0A    url=%22https://github.com/Coverfox/gsub%22,%0A    license=%22BSD%22
 ,%0A%0A%0A
@@ -305,32 +305,30 @@
 equires=
-install_requires
+%5B%22click==6.6%22%5D
 ,%0A%0A    p

version 0.1.0