<commit_before>#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et

"""Setup script for the PycURL module distribution."""

PACKAGE = "pycurl"
PY_PACKAGE = "curl"
VERSION = "7.19.0.3"

import glob, os, re, sys, string, subprocess
import distutils
from distutils.core import setup
from distutils.extension import Extension
from distutils.util import split_quoted
from distutils.version import LooseVersion

try:
    # python 2
    exception_base = StandardError
except NameError:
    # python 3
    exception_base = Exception
class ConfigurationError(exception_base):
    pass

include_dirs = []
define_macros = [("PYCURL_VERSION", '"%s"' % VERSION)]
library_dirs = []
libraries = []
runtime_library_dirs = []
extra_objects = []
extra_compile_args = []
extra_link_args = []

def fail(msg):
    sys.stderr.write(msg + "\n")
    exit(10)

def scan_argv(s, default=None):
    p = default
    i = 1
    while i < len(sys.argv):
        arg = sys.argv[i]
        if str.find(arg, s) == 0:
            if s.endswith('='):
                # --option=value
                p = arg[len(s):]
                assert p, arg
            else:
                # --option
                # set value to True
                p = True
            del sys.argv[i]
        else:
            i = i + 1
    ##print sys.argv
    return p

# append contents of an environment variable to library_dirs[]
def add_libdirs(envvar, sep, fatal=False):
    v = os.environ.get(envvar)
    if not v:
        return
    for dir in str.split(v, sep):
        dir = str.strip(dir)
        if not dir:
            continue
        dir = os.path.normpath(dir)
        if os.path.isdir(dir):
            if not dir in library_dirs:
                library_dirs.append(dir)
        elif fatal:
            fail("FATAL: bad directory %s in environment variable %s" % (dir, envvar))

def configure_windows():
    # Windows users have to pass --curl-dir parameter to specify path
    # to libcurl, because there is no curl-config on windows at all.
    curl_dir = scan_argv("--curl-dir=")
    if curl_dir is None:
        fail("Please specify --curl-dir=/path/to/built/libcurl")
    if not os.path.exists(curl_dir):
        fail("Curl directory does not exist: %s" % curl_dir)
    if not os.path.isdir(curl_dir):
        fail("Curl directory is not a directory: %s" % curl_dir)
    print("Using curl directory: %s" % curl_dir)
    include_dirs.append(os.path.join(curl_dir, "include"))

    # libcurl windows documentation states that for linking against libcurl
    # dll, the import library name is libcurl_imp.lib.
    # in practice, the library name sometimes is libcurl.lib.
    # override with: --libcurl-lib-name=libcurl_imp.lib
    curl_lib_name = scan_argv('--libcurl-lib-name=', 'libcurl.lib')

    if scan_argv("--use-libcurl-dll") is not None:
        libcurl_lib_path = os.path.join(curl_dir, "lib", curl_lib_name)
        extra_link_args.extend(["ws2_32.lib"])
        if str.find(sys.version, "MSC") >= 0:
            # build a dll
            extra_compile_args.append("-MD")
    else:
        extra_compile_args.append("-DCURL_STATICLIB")
        libcurl_lib_path = os.path.join(curl_dir, "lib", curl_lib_name)
        extra_link_args.extend(["gdi32.lib", "wldap32.lib", "winmm.lib", "ws2_32.lib",])

    if not os.path.exists(libcurl_lib_path):
        fail("libcurl.lib does not exist at %s.\nCurl directory must point to compiled libcurl (bin/include/lib subdirectories): %s" %(libcurl_lib_path, curl_dir))
    extra_objects.append(libcurl_lib_path)

    # make pycurl binary work on windows xp.
    # we use inet_ntop which was added in vista and implement a fallback.
    # our implementation will not be compiled with _WIN32_WINNT targeting
    # vista or above, thus said binary won't work on xp.
    # http://curl.haxx.se/mail/curlpython-2013-12/0007.html
    extra_compile_args.append("-D_WIN32_WINNT=0x0501")

    if str.find(sys.version, "MSC") >= 0:
        extra_compile_args.append("-O2")
        extra_compile_args.append("-GF")        # enable read-only string pooling
        extra_compile_args.append("-WX")        # treat warnings as errors
        p = subprocess.Popen(['cl.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        match = re.search(r'Version (\d+)', err.decode().split("\n")[0])
        if match and int(match.group(1)) < 16:
            # option removed in vs 2010:
            # connect.microsoft.com/VisualStudio/feedback/details/475896/link-fatal-error-lnk1117-syntax-error-in-option-opt-nowin98/
            extra_link_args.append("/opt:nowin98")  # use small section alignment

        # workaround for distutils/msi version requirement per
        # epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html -
        # only x.y.z version numbers are supported, whereas our versions might be x.y.z.p.
        # bugs.python.org/issue6040#msg133094
        from distutils.command.bdist_msi import bdist_msi
        import inspect
        import types
        import re

        class bdist_msi_version_hack(bdist_msi):
            """ MSI builder requires version to be in the x.x.x format """
            def run(self):
                def monkey_get_version(self):
                    """ monkey patch replacement for metadata.get_version() that
                            returns MSI compatible version string for bdist_msi
                    """
                    # get filename of the calling function
                    if inspect.stack()[1][1].endswith('bdist_msi.py'):
                        # strip revision from version (if any), e.g. 11.0.0-r31546
                        match = re.match(r'(\d+\.\d+\.\d+)', self.version)
                        assert match
                        return match.group(1)
                    else:
                        return self.version

                # monkeypatching get_version() call for DistributionMetadata
                self.distribution.metadata.get_version = \
                    types.MethodType(monkey_get_version, self.distribution.metadata)
                bdist_msi.run(self)

def configure_unix():
    # Find out the rest the hard way
    OPENSSL_DIR = scan_argv("--openssl-dir=")
    if OPENSSL_DIR is not None:
        include_dirs.append(os.path.join(OPENSSL_DIR, "include"))
    CURL_CONFIG = os.environ.get('PYCURL_CURL_CONFIG', "curl-config")
    CURL_CONFIG = scan_argv("--curl-config=", CURL_CONFIG)
    try:
        p = subprocess.Popen((CURL_CONFIG, '--version'),
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    except OSError:
        exc = sys.exc_info()[1]
        msg = 'Could not run curl-config: %s' % str(exc)
        raise ConfigurationError(msg)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "`%s' not found -- please install the libcurl development files or specify --curl-config=/path/to/curl-config" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    libcurl_version = stdout.decode().strip()
    print("Using %s (%s)" % (CURL_CONFIG, libcurl_version))
    p = subprocess.Popen((CURL_CONFIG, '--cflags'),
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "Problem running `%s' --cflags" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    for arg in split_quoted(stdout.decode()):
        if arg[:2] == "-I":
            # do not add /usr/include
            if not re.search(r"^\/+usr\/+include\/*$", arg[2:]):
                include_dirs.append(arg[2:])
        else:
            extra_compile_args.append(arg)

    # Obtain linker flags/libraries to link against.
    # In theory, all we should need is `curl-config --libs`.
    # Apparently on some platforms --libs fails and --static-libs works,
    # so try that.
    # If --libs succeeds do not try --static libs; see
    # https://github.com/pycurl/pycurl/issues/52 for more details.
    # If neither --libs nor --static-libs work, fail.
    optbuf = ""
    errtext = ''
    for option in ["--libs", "--static-libs"]:
        p = subprocess.Popen((CURL_CONFIG, option),
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = p.communicate()
        if p.wait() == 0:
            optbuf = stdout.decode()
            break
        else:
            errtext += stderr.decode()
    if optbuf == "":
        msg = "Neither curl-config --libs nor curl-config --static-libs" +\
            " succeeded and produced output"
        if errtext:
            msg += ":\n" + errtext
        raise ConfigurationError(msg)
    libs = split_quoted(optbuf)

    for arg in libs:
        if arg[:2] == "-l":
            libraries.append(arg[2:])
            if arg[2:] == 'ssl':
                define_macros.append(('HAVE_CURL_OPENSSL', 1))
            if arg[2:] == 'gnutls':
                define_macros.append(('HAVE_CURL_GNUTLS', 1))
            if arg[2:] == 'ssl3':
                define_macros.append(('HAVE_CURL_NSS', 1))
        elif arg[:2] == "-L":
            library_dirs.append(arg[2:])
        else:
            extra_link_args.append(arg)
    p = subprocess.Popen((CURL_CONFIG, '--features'),
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "Problem running `%s' --features" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    for feature in split_quoted(stdout.decode()):
        if feature == 'SSL':
            define_macros.append(('HAVE_CURL_SSL', 1))
    if not libraries:
        libraries.append("curl")
    # Add extra compile flag for MacOS X
    if sys.platform[:-1] == "darwin":
        extra_link_args.append("-flat_namespace")

def configure():
    if sys.platform == "win32":
        configure_windows()
    else:
        configure_unix()

###############################################################################

def get_extension():
    ext = Extension(
        name=PACKAGE,
        sources=[
            os.path.join("src", "pycurl.c"),
        ],
        include_dirs=include_dirs,
        define_macros=define_macros,
        library_dirs=library_dirs,
        libraries=libraries,
        runtime_library_dirs=runtime_library_dirs,
        extra_objects=extra_objects,
        extra_compile_args=extra_compile_args,
        extra_link_args=extra_link_args,
    )
    ##print(ext.__dict__); sys.exit(1)
    return ext

###############################################################################

# prepare data_files

def get_data_files():
    # a list of tuples with (path to install to, a list of local files)
    data_files = []
    if sys.platform == "win32":
        datadir = os.path.join("doc", PACKAGE)
    else:
        datadir = os.path.join("share", "doc", PACKAGE)
    #
    files = ["ChangeLog", "COPYING-LGPL", "COPYING-MIT", "INSTALL", "README.rst", "TODO",]
    if files:
        data_files.append((os.path.join(datadir), files))
    files = glob.glob(os.path.join("doc", "*.html"))
    if files:
        data_files.append((os.path.join(datadir, "html"), files))
    files = glob.glob(os.path.join("examples", "*.py"))
    if files:
        data_files.append((os.path.join(datadir, "examples"), files))
    files = glob.glob(os.path.join("tests", "*.py"))
    if files:
        data_files.append((os.path.join(datadir, "tests"), files))
    #
    assert data_files
    for install_dir, files in data_files:
        assert files
        for f in files:
            assert os.path.isfile(f), (f, install_dir)
    return data_files

##print get_data_files(); sys.exit(1)

###############################################################################

setup_args = dict(
    name=PACKAGE,
    version=VERSION,
    description="PycURL -- cURL library module for Python",
    author="Kjetil Jacobsen, Markus F.X.J. Oberhumer, Oleg Pudeyev",
    author_email="kjetilja at gmail.com, markus at oberhumer.com, oleg at bsdpower.com",
    maintainer="Oleg Pudeyev",
    maintainer_email="oleg@bsdpower.com",
    url="http://pycurl.sourceforge.net/",
    download_url="http://pycurl.sourceforge.net/download/",
    license="LGPL/MIT",
    keywords=['curl', 'libcurl', 'urllib', 'wget', 'download', 'file transfer',
        'http', 'www'],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
        'License :: OSI Approved :: MIT License',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Internet :: File Transfer Protocol (FTP)',
        'Topic :: Internet :: WWW/HTTP',
    ],
    packages=[PY_PACKAGE],
    package_dir={ PY_PACKAGE: os.path.join('python', 'curl') },
    long_description="""
This module provides Python bindings for the cURL library.""",
)

if sys.platform == "win32":
    setup_args['cmdclass'] = {'bdist_msi': bdist_msi_version_hack}

##print distutils.__version__
if LooseVersion(distutils.__version__) > LooseVersion("1.0.1"):
    setup_args["platforms"] = "All"
if LooseVersion(distutils.__version__) < LooseVersion("1.0.3"):
    setup_args["licence"] = setup_args["license"]

if __name__ == "__main__":
    if '--help' in sys.argv:
        # unfortunately this help precedes distutils help
        if sys.platform == "win32":
            print('''\
PycURL Windows options:
 --curl-dir=/path/to/compiled/libcurl  path to libcurl headers and libraries
 --use-libcurl-dll                     link against libcurl DLL, if not given
                                       link against libcurl statically
 --libcurl-lib-name=libcurl_imp.lib    override libcurl import library name
''')
        else:
            print('''\
PycURL Unix options:
 --curl-config=/path/to/curl-config  use specified curl-config binary
 --openssl-dir=/path/to/openssl/dir  path to OpenSSL headers and libraries
''')
        # invoke setup without configuring pycurl because
        # configuration might fail, and we want to display help anyway
        setup(**setup_args)
    else:
        configure()

        setup_args['data_files'] = get_data_files()
        ext = get_extension()
        setup_args['ext_modules'] = [ext]

        for o in ext.extra_objects:
            assert os.path.isfile(o), o
        setup(**setup_args)
<commit_msg>Refactor help to make the code more readable<commit_after>#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et

"""Setup script for the PycURL module distribution."""

PACKAGE = "pycurl"
PY_PACKAGE = "curl"
VERSION = "7.19.0.3"

import glob, os, re, sys, string, subprocess
import distutils
from distutils.core import setup
from distutils.extension import Extension
from distutils.util import split_quoted
from distutils.version import LooseVersion

try:
    # python 2
    exception_base = StandardError
except NameError:
    # python 3
    exception_base = Exception
class ConfigurationError(exception_base):
    pass

include_dirs = []
define_macros = [("PYCURL_VERSION", '"%s"' % VERSION)]
library_dirs = []
libraries = []
runtime_library_dirs = []
extra_objects = []
extra_compile_args = []
extra_link_args = []

def fail(msg):
    sys.stderr.write(msg + "\n")
    exit(10)

def scan_argv(s, default=None):
    p = default
    i = 1
    while i < len(sys.argv):
        arg = sys.argv[i]
        if str.find(arg, s) == 0:
            if s.endswith('='):
                # --option=value
                p = arg[len(s):]
                assert p, arg
            else:
                # --option
                # set value to True
                p = True
            del sys.argv[i]
        else:
            i = i + 1
    ##print sys.argv
    return p

# append contents of an environment variable to library_dirs[]
def add_libdirs(envvar, sep, fatal=False):
    v = os.environ.get(envvar)
    if not v:
        return
    for dir in str.split(v, sep):
        dir = str.strip(dir)
        if not dir:
            continue
        dir = os.path.normpath(dir)
        if os.path.isdir(dir):
            if not dir in library_dirs:
                library_dirs.append(dir)
        elif fatal:
            fail("FATAL: bad directory %s in environment variable %s" % (dir, envvar))

def configure_windows():
    # Windows users have to pass --curl-dir parameter to specify path
    # to libcurl, because there is no curl-config on windows at all.
    curl_dir = scan_argv("--curl-dir=")
    if curl_dir is None:
        fail("Please specify --curl-dir=/path/to/built/libcurl")
    if not os.path.exists(curl_dir):
        fail("Curl directory does not exist: %s" % curl_dir)
    if not os.path.isdir(curl_dir):
        fail("Curl directory is not a directory: %s" % curl_dir)
    print("Using curl directory: %s" % curl_dir)
    include_dirs.append(os.path.join(curl_dir, "include"))

    # libcurl windows documentation states that for linking against libcurl
    # dll, the import library name is libcurl_imp.lib.
    # in practice, the library name sometimes is libcurl.lib.
    # override with: --libcurl-lib-name=libcurl_imp.lib
    curl_lib_name = scan_argv('--libcurl-lib-name=', 'libcurl.lib')

    if scan_argv("--use-libcurl-dll") is not None:
        libcurl_lib_path = os.path.join(curl_dir, "lib", curl_lib_name)
        extra_link_args.extend(["ws2_32.lib"])
        if str.find(sys.version, "MSC") >= 0:
            # build a dll
            extra_compile_args.append("-MD")
    else:
        extra_compile_args.append("-DCURL_STATICLIB")
        libcurl_lib_path = os.path.join(curl_dir, "lib", curl_lib_name)
        extra_link_args.extend(["gdi32.lib", "wldap32.lib", "winmm.lib", "ws2_32.lib",])

    if not os.path.exists(libcurl_lib_path):
        fail("libcurl.lib does not exist at %s.\nCurl directory must point to compiled libcurl (bin/include/lib subdirectories): %s" %(libcurl_lib_path, curl_dir))
    extra_objects.append(libcurl_lib_path)

    # make pycurl binary work on windows xp.
    # we use inet_ntop which was added in vista and implement a fallback.
    # our implementation will not be compiled with _WIN32_WINNT targeting
    # vista or above, thus said binary won't work on xp.
    # http://curl.haxx.se/mail/curlpython-2013-12/0007.html
    extra_compile_args.append("-D_WIN32_WINNT=0x0501")

    if str.find(sys.version, "MSC") >= 0:
        extra_compile_args.append("-O2")
        extra_compile_args.append("-GF")        # enable read-only string pooling
        extra_compile_args.append("-WX")        # treat warnings as errors
        p = subprocess.Popen(['cl.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        match = re.search(r'Version (\d+)', err.decode().split("\n")[0])
        if match and int(match.group(1)) < 16:
            # option removed in vs 2010:
            # connect.microsoft.com/VisualStudio/feedback/details/475896/link-fatal-error-lnk1117-syntax-error-in-option-opt-nowin98/
            extra_link_args.append("/opt:nowin98")  # use small section alignment

        # workaround for distutils/msi version requirement per
        # epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html -
        # only x.y.z version numbers are supported, whereas our versions might be x.y.z.p.
        # bugs.python.org/issue6040#msg133094
        from distutils.command.bdist_msi import bdist_msi
        import inspect
        import types
        import re

        class bdist_msi_version_hack(bdist_msi):
            """ MSI builder requires version to be in the x.x.x format """
            def run(self):
                def monkey_get_version(self):
                    """ monkey patch replacement for metadata.get_version() that
                            returns MSI compatible version string for bdist_msi
                    """
                    # get filename of the calling function
                    if inspect.stack()[1][1].endswith('bdist_msi.py'):
                        # strip revision from version (if any), e.g. 11.0.0-r31546
                        match = re.match(r'(\d+\.\d+\.\d+)', self.version)
                        assert match
                        return match.group(1)
                    else:
                        return self.version

                # monkeypatching get_version() call for DistributionMetadata
                self.distribution.metadata.get_version = \
                    types.MethodType(monkey_get_version, self.distribution.metadata)
                bdist_msi.run(self)

def configure_unix():
    # Find out the rest the hard way
    OPENSSL_DIR = scan_argv("--openssl-dir=")
    if OPENSSL_DIR is not None:
        include_dirs.append(os.path.join(OPENSSL_DIR, "include"))
    CURL_CONFIG = os.environ.get('PYCURL_CURL_CONFIG', "curl-config")
    CURL_CONFIG = scan_argv("--curl-config=", CURL_CONFIG)
    try:
        p = subprocess.Popen((CURL_CONFIG, '--version'),
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    except OSError:
        exc = sys.exc_info()[1]
        msg = 'Could not run curl-config: %s' % str(exc)
        raise ConfigurationError(msg)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "`%s' not found -- please install the libcurl development files or specify --curl-config=/path/to/curl-config" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    libcurl_version = stdout.decode().strip()
    print("Using %s (%s)" % (CURL_CONFIG, libcurl_version))
    p = subprocess.Popen((CURL_CONFIG, '--cflags'),
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "Problem running `%s' --cflags" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    for arg in split_quoted(stdout.decode()):
        if arg[:2] == "-I":
            # do not add /usr/include
            if not re.search(r"^\/+usr\/+include\/*$", arg[2:]):
                include_dirs.append(arg[2:])
        else:
            extra_compile_args.append(arg)

    # Obtain linker flags/libraries to link against.
    # In theory, all we should need is `curl-config --libs`.
    # Apparently on some platforms --libs fails and --static-libs works,
    # so try that.
    # If --libs succeeds do not try --static libs; see
    # https://github.com/pycurl/pycurl/issues/52 for more details.
    # If neither --libs nor --static-libs work, fail.
    optbuf = ""
    errtext = ''
    for option in ["--libs", "--static-libs"]:
        p = subprocess.Popen((CURL_CONFIG, option),
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = p.communicate()
        if p.wait() == 0:
            optbuf = stdout.decode()
            break
        else:
            errtext += stderr.decode()
    if optbuf == "":
        msg = "Neither curl-config --libs nor curl-config --static-libs" +\
            " succeeded and produced output"
        if errtext:
            msg += ":\n" + errtext
        raise ConfigurationError(msg)
    libs = split_quoted(optbuf)

    for arg in libs:
        if arg[:2] == "-l":
            libraries.append(arg[2:])
            if arg[2:] == 'ssl':
                define_macros.append(('HAVE_CURL_OPENSSL', 1))
            if arg[2:] == 'gnutls':
                define_macros.append(('HAVE_CURL_GNUTLS', 1))
            if arg[2:] == 'ssl3':
                define_macros.append(('HAVE_CURL_NSS', 1))
        elif arg[:2] == "-L":
            library_dirs.append(arg[2:])
        else:
            extra_link_args.append(arg)
    p = subprocess.Popen((CURL_CONFIG, '--features'),
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    stdout, stderr = p.communicate()
    if p.wait() != 0:
        msg = "Problem running `%s' --features" % CURL_CONFIG
        if stderr:
            msg += ":\n" + stderr.decode()
        raise ConfigurationError(msg)
    for feature in split_quoted(stdout.decode()):
        if feature == 'SSL':
            define_macros.append(('HAVE_CURL_SSL', 1))
    if not libraries:
        libraries.append("curl")
    # Add extra compile flag for MacOS X
    if sys.platform[:-1] == "darwin":
        extra_link_args.append("-flat_namespace")

def configure():
    if sys.platform == "win32":
        configure_windows()
    else:
        configure_unix()

###############################################################################

def get_extension():
    ext = Extension(
        name=PACKAGE,
        sources=[
            os.path.join("src", "pycurl.c"),
        ],
        include_dirs=include_dirs,
        define_macros=define_macros,
        library_dirs=library_dirs,
        libraries=libraries,
        runtime_library_dirs=runtime_library_dirs,
        extra_objects=extra_objects,
        extra_compile_args=extra_compile_args,
        extra_link_args=extra_link_args,
    )
    ##print(ext.__dict__); sys.exit(1)
    return ext

###############################################################################

# prepare data_files

def get_data_files():
    # a list of tuples with (path to install to, a list of local files)
    data_files = []
    if sys.platform == "win32":
        datadir = os.path.join("doc", PACKAGE)
    else:
        datadir = os.path.join("share", "doc", PACKAGE)
    #
    files = ["ChangeLog", "COPYING-LGPL", "COPYING-MIT", "INSTALL", "README.rst", "TODO",]
    if files:
        data_files.append((os.path.join(datadir), files))
    files = glob.glob(os.path.join("doc", "*.html"))
    if files:
        data_files.append((os.path.join(datadir, "html"), files))
    files = glob.glob(os.path.join("examples", "*.py"))
    if files:
        data_files.append((os.path.join(datadir, "examples"), files))
    files = glob.glob(os.path.join("tests", "*.py"))
    if files:
        data_files.append((os.path.join(datadir, "tests"), files))
    #
    assert data_files
    for install_dir, files in data_files:
        assert files
        for f in files:
            assert os.path.isfile(f), (f, install_dir)
    return data_files

##print get_data_files(); sys.exit(1)

###############################################################################

setup_args = dict(
    name=PACKAGE,
    version=VERSION,
    description="PycURL -- cURL library module for Python",
    author="Kjetil Jacobsen, Markus F.X.J. Oberhumer, Oleg Pudeyev",
    author_email="kjetilja at gmail.com, markus at oberhumer.com, oleg at bsdpower.com",
    maintainer="Oleg Pudeyev",
    maintainer_email="oleg@bsdpower.com",
    url="http://pycurl.sourceforge.net/",
    download_url="http://pycurl.sourceforge.net/download/",
    license="LGPL/MIT",
    keywords=['curl', 'libcurl', 'urllib', 'wget', 'download', 'file transfer',
        'http', 'www'],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
        'License :: OSI Approved :: MIT License',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Internet :: File Transfer Protocol (FTP)',
        'Topic :: Internet :: WWW/HTTP',
    ],
    packages=[PY_PACKAGE],
    package_dir={ PY_PACKAGE: os.path.join('python', 'curl') },
    long_description="""
This module provides Python bindings for the cURL library.""",
)

if sys.platform == "win32":
    setup_args['cmdclass'] = {'bdist_msi': bdist_msi_version_hack}

##print distutils.__version__
if LooseVersion(distutils.__version__) > LooseVersion("1.0.1"):
    setup_args["platforms"] = "All"
if LooseVersion(distutils.__version__) < LooseVersion("1.0.3"):
    setup_args["licence"] = setup_args["license"]

unix_help = '''\
PycURL Unix options:
 --curl-config=/path/to/curl-config  use specified curl-config binary
 --openssl-dir=/path/to/openssl/dir  path to OpenSSL headers and libraries
'''

windows_help = '''\
PycURL Windows options:
 --curl-dir=/path/to/compiled/libcurl  path to libcurl headers and libraries
 --use-libcurl-dll                     link against libcurl DLL, if not given
                                       link against libcurl statically
 --libcurl-lib-name=libcurl_imp.lib    override libcurl import library name
'''

if __name__ == "__main__":
    if '--help' in sys.argv:
        # unfortunately this help precedes distutils help
        if sys.platform == "win32":
            print(windows_help)
        else:
            print(unix_help)
        # invoke setup without configuring pycurl because
        # configuration might fail, and we want to display help anyway
        setup(**setup_args)
    else:
        configure()

        setup_args['data_files'] = get_data_files()
        ext = get_extension()
        setup_args['ext_modules'] = [ext]

        for o in ext.extra_objects:
            assert os.path.isfile(o), o
        setup(**setup_args)
<|endoftext|>


<commit_before># Copyright (c) 2014. Mount Sinai School of Medicine
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function
import os

from setuptools import setup, find_packages

readme_filename = "README.md"
current_directory = os.path.dirname(__file__)
readme_path = os.path.join(current_directory, readme_filename)

readme = ""
try:
    with open(readme_path, 'r') as f:
        readme = f.read()
except Exception as e:
    print(e)
    print("Failed to open %s" % readme_path)

try:
    import pypandoc
    readme = pypandoc.convert(readme, to='rst', format='md')
except Exception as e:
    print(e)
    print("Failed to convert %s from Markdown to reStructuredText" % readme_filename)

if __name__ == '__main__':
    setup(
        name='varcode',
        packages=find_packages(),
        version="0.3.11",
        description="Variant annotation in Python",
        long_description=readme,
        url="https://github.com/hammerlab/varcode",
        author="Alex Rubinsteyn",
        license="http://www.apache.org/licenses/LICENSE-2.0.html",
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Environment :: Console',
            'Operating System :: OS Independent',
            'Intended Audience :: Science/Research',
            'License :: OSI Approved :: Apache Software License',
            'Programming Language :: Python',
            'Topic :: Scientific/Engineering :: Bio-Informatics',
        ],
        install_requires=[
            'numpy >=1.7, <2.0',
            'pandas>=0.13.1',
            'pyensembl >=0.6.5, <0.7.0',
            'biopython',
            'pyvcf',
            'memoized_property',
            'pysam >=0.8.3',
        ],
    )
<commit_msg>depend on pandas >= 0.15<commit_after># Copyright (c) 2014. Mount Sinai School of Medicine
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function
import os

from setuptools import setup, find_packages

readme_filename = "README.md"
current_directory = os.path.dirname(__file__)
readme_path = os.path.join(current_directory, readme_filename)

readme = ""
try:
    with open(readme_path, 'r') as f:
        readme = f.read()
except Exception as e:
    print(e)
    print("Failed to open %s" % readme_path)

try:
    import pypandoc
    readme = pypandoc.convert(readme, to='rst', format='md')
except Exception as e:
    print(e)
    print("Failed to convert %s from Markdown to reStructuredText" % readme_filename)

if __name__ == '__main__':
    setup(
        name='varcode',
        packages=find_packages(),
        version="0.3.12",
        description="Variant annotation in Python",
        long_description=readme,
        url="https://github.com/hammerlab/varcode",
        author="Alex Rubinsteyn",
        license="http://www.apache.org/licenses/LICENSE-2.0.html",
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Environment :: Console',
            'Operating System :: OS Independent',
            'Intended Audience :: Science/Research',
            'License :: OSI Approved :: Apache Software License',
            'Programming Language :: Python',
            'Topic :: Scientific/Engineering :: Bio-Informatics',
        ],
        install_requires=[
            'numpy >=1.7, <2.0',
            'pandas>=0.15',
            'pyensembl >=0.6.5, <0.7.0',
            'biopython',
            'pyvcf',
            'memoized_property',
            'pysam >=0.8.3',
        ],
    )
<|endoftext|>


<commit_before><commit_msg>local cahnges<commit_after><|endoftext|>


<commit_before>################################################################################
#
# Copyright (c) 2012 ObjectLabs Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
################################################################################

from distutils.core import setup

setup(
      name='Dex',
      version='0.6',
      author='The MongoLab Team',
      author_email='team@mongolab.com',
      description='Index and query analyzer for MongoDB',
      long_description="Compares MongoDB log files and index entries to make index recommendations",
      packages=['dex', 'dex.test'],
      scripts=['bin/dex'],
      url='https://github.com/mongolab/dex',
      license='MIT',
      install_requires=["pymongo", "pyyaml", "dargparse>=0.2.2","ordereddict"]
      )
<commit_msg>dex 0.6.1<commit_after>################################################################################
#
# Copyright (c) 2012 ObjectLabs Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
################################################################################

from distutils.core import setup

setup(
      name='Dex',
      version='0.6.1',
      author='The MongoLab Team',
      author_email='team@mongolab.com',
      description='Index and query analyzer for MongoDB',
      long_description="Compares MongoDB log files and index entries to make index recommendations",
      packages=['dex', 'dex.test'],
      scripts=['bin/dex'],
      url='https://github.com/mongolab/dex',
      license='MIT',
      install_requires=["pymongo", "pyyaml", "dargparse>=0.2.2","ordereddict"]
      )
<|endoftext|>


<commit_before><commit_msg>added configuration to setup.py script<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

readme = open('README.rst').read()

requirements = ['docopt>=0.6.1', 'requests>=2.2.1']
test_requirements = []

if sys.version < '3':
    test_requirements.append('mock')

setup(
    name='respect',
    version='0.0.1',
    description="A command-line tool to interact with the Github API, \
        e.g. looking for user's stars who is interesting for you.",
    long_description=readme,
    author='Pablo Oubiña',
    author_email='oubiga@yahoo.es',
    url='https://github.com/oubiga/respect',
    packages=[
        'respect',
    ],
    package_dir={'respect': 'respect'},
    entry_points={
        'console_scripts': [
            'respect = respect.main:main',
        ]
    },
    include_package_data=True,
    install_requires=requirements,
    license='BSD',
    zip_safe=False,
    classifiers=[
        'Development Status :: 1 - Planning',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
    keywords='respect, Python, stars, user, github, \
        repository, code, software',
    test_suite='tests',
    tests_require=test_requirements
)<|endoftext|>


<commit_before>import shutil
import os
import glob
import sys
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from setuptools.command.install_lib import install_lib

library = None
PYTHON = sys.executable

class EssentiaInstall(install_lib):
    def install(self):
        global library
        install_dir = os.path.join(self.install_dir, library.split(os.sep)[-1])
        res = shutil.move(library, install_dir)
        os.system("ls -l %s" % self.install_dir)
        return [install_dir]

class EssentiaBuildExtension(build_ext):
    def run(self):
        global library
        os.system('rm -rf tmp; mkdir tmp')

        # Ugly hack using an enviroment variable... There's no way to pass a
        # custom flag to python setup.py bdist_wheel
        varname = 'ESSENTIA_WHEEL_SKIP_3RDPARTY'
        if varname in os.environ and os.environ[varname]=='1':
            print('Skipping building static 3rdparty dependencies (%s=1)' % varname)
        else:
            os.system('./packaging/build_3rdparty_static_debian.sh')

        os.system('%s waf configure --build-static --static-dependencies \
                   --with-python --prefix=tmp' % PYTHON)
        os.system('%s waf' % PYTHON)
        os.system('%s waf install' % PYTHON)

        library = glob.glob('tmp/lib/python*/*-packages/essentia')[0]

def get_git_version():
    """ try grab the current version number from git"""
    version = None
    if os.path.exists(".git"):
        try:
            version = os.popen("git describe --always").read().strip()
        except Exception as e:
            print(e)
    return version

def get_version():
    git_version = get_git_version()
    version = open('VERSION', 'r').read().strip('\n')

    if git_version:
        version = git_version
    else:
        version = open('VERSION', 'r').read().strip('\n')

    return version

classifiers = [
    'License :: OSI Approved :: GNU Affero General Public License v3',
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Intended Audience :: Science/Research'
    'Topic :: Software Development :: Libraries',
    'Topic :: Multimedia :: Sound/Audio :: Analysis',
    'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
    'Operating System :: POSIX',
    'Operating System :: MacOS :: MacOS X',
    #'Operating System :: Microsoft :: Windows',
    'Programming Language :: C++',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
]

build_requires = ['numpy>=1.8.2', 'six', 'pyyaml']

module = Extension('name', sources=[])

setup(
    name='essentia',
    version=get_version(),
    description='Library for audio and music analysis, description and synthesis',
    long_description='C++ library for audio and music analysis, description and synthesis, including Python bindings',
    author='Dmitry Bogdanov',
    author_email='dmitry.bogdanov@upf.edu',
    url='http://essentia.upf.edu',
    project_urls={
        "Documentation": "http://essentia.upf.edu",
        "Source Code": "https://github.com/MTG/essentia"
    },
    keywords='audio music sound dsp MIR',
    license='AGPLv3',
    platforms='any',
    classifiers=classifiers,
    setup_requires=build_requires,
    install_requires=build_requires,
    ext_modules=[module],
    cmdclass={
        'build_ext': EssentiaBuildExtension,
        'install_lib': EssentiaInstall
    }
)
<commit_msg>Proper versioning of python wheels (PEP 440)<commit_after>import shutil
import os
import glob
import sys
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from setuptools.command.install_lib import install_lib

library = None
PYTHON = sys.executable

class EssentiaInstall(install_lib):
    def install(self):
        global library
        install_dir = os.path.join(self.install_dir, library.split(os.sep)[-1])
        res = shutil.move(library, install_dir)
        os.system("ls -l %s" % self.install_dir)
        return [install_dir]

class EssentiaBuildExtension(build_ext):
    def run(self):
        global library
        os.system('rm -rf tmp; mkdir tmp')

        # Ugly hack using an enviroment variable... There's no way to pass a
        # custom flag to python setup.py bdist_wheel
        varname = 'ESSENTIA_WHEEL_SKIP_3RDPARTY'
        if varname in os.environ and os.environ[varname]=='1':
            print('Skipping building static 3rdparty dependencies (%s=1)' % varname)
        else:
            os.system('./packaging/build_3rdparty_static_debian.sh')

        os.system('%s waf configure --build-static --static-dependencies '
                  '--with-python --prefix=tmp' % PYTHON)
        os.system('%s waf' % PYTHON)
        os.system('%s waf install' % PYTHON)

        library = glob.glob('tmp/lib/python*/*-packages/essentia')[0]

def get_git_version():
    """ try grab the current version number from git"""
    version = None
    if os.path.exists(".git"):
        try:
            version = os.popen("git describe --always").read().strip()
        except Exception as e:
            print(e)
    return version

def get_version():
    version = open('VERSION', 'r').read().strip('\n')
    if version.count('-dev'):
        # Development version. Get the number of commits after the last release
        git_version = get_git_version()
        dev_commits = git_version.split('-')[-2] if git_version else ''
        if not dev_commits.isdigit():
            print('Error parsing the number of dev commits: %s', dev_commits)
            dev_commits = '0'
        version += dev_commits
    return version

classifiers = [
    'License :: OSI Approved :: GNU Affero General Public License v3',
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Intended Audience :: Science/Research'
    'Topic :: Software Development :: Libraries',
    'Topic :: Multimedia :: Sound/Audio :: Analysis',
    'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
    'Operating System :: POSIX',
    'Operating System :: MacOS :: MacOS X',
    #'Operating System :: Microsoft :: Windows',
    'Programming Language :: C++',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
]

build_requires = ['numpy>=1.8.2', 'six', 'pyyaml']

module = Extension('name', sources=[])

setup(
    name='essentia',
    version=get_version(),
    description='Library for audio and music analysis, description and synthesis',
    long_description='C++ library for audio and music analysis, description and synthesis, including Python bindings',
    author='Dmitry Bogdanov',
    author_email='dmitry.bogdanov@upf.edu',
    url='http://essentia.upf.edu',
    project_urls={
        "Documentation": "http://essentia.upf.edu",
        "Source Code": "https://github.com/MTG/essentia"
    },
    keywords='audio music sound dsp MIR',
    license='AGPLv3',
    platforms='any',
    classifiers=classifiers,
    setup_requires=build_requires,
    install_requires=build_requires,
    ext_modules=[module],
    cmdclass={
        'build_ext': EssentiaBuildExtension,
        'install_lib': EssentiaInstall
    }
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

from distutils.core import setup

import py_star

long_description = (
    "py-star consists of a set of interfaces and libraries to allow programming "
    "of Asterisk from python. The library currently supports AGI, AMI, "
    "and the parsing of Asterisk configuration files. The library also "
    "includes debugging facilities for AGI."
)

setup(
    name='py-star',
    version=py_star.__version__,
    description='A Python Interface to Asterisk',
    long_description=long_description,
    author='German Larrain',
    author_email='glarrain@users.noreply.github.com',
    url='https://github.com/medularis/py-star',
    packages=['py_star'],
    license='3-clause BSD',
    platforms='Any',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'Intended Audience :: Telecommunications Industry',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Communications :: Internet Phone',
        'Topic :: Communications :: Telephony',
        'Topic :: Software Development :: Libraries :: Python Modules',
        # the FSF refers to it as "Modified BSD License". Other names include
        # "New BSD", "revised BSD", "BSD-3", or "3-clause BSD"
        'License :: OSI Approved :: BSD License',
    ]
)
<commit_msg>setup: use 'setuptools' if available<commit_after>#!/usr/bin/env python

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

import py_star

long_description = (
    "py-star consists of a set of interfaces and libraries to allow programming "
    "of Asterisk from python. The library currently supports AGI, AMI, "
    "and the parsing of Asterisk configuration files. The library also "
    "includes debugging facilities for AGI."
)

setup(
    name='py-star',
    version=py_star.__version__,
    description='A Python Interface to Asterisk',
    long_description=long_description,
    author='German Larrain',
    author_email='glarrain@users.noreply.github.com',
    url='https://github.com/medularis/py-star',
    packages=['py_star'],
    license='3-clause BSD',
    platforms='Any',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'Intended Audience :: Telecommunications Industry',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Communications :: Internet Phone',
        'Topic :: Communications :: Telephony',
        'Topic :: Software Development :: Libraries :: Python Modules',
        # the FSF refers to it as "Modified BSD License". Other names include
        # "New BSD", "revised BSD", "BSD-3", or "3-clause BSD"
        'License :: OSI Approved :: BSD License',
    ]
)
<|endoftext|>


<commit_before>"""This file is part of DING0, the DIstribution Network GeneratOr.
DING0 is a tool to generate synthetic medium and low voltage power
distribution grids based on open data.

It is developed in the project open_eGo: https://openegoproject.wordpress.com

DING0 lives at github: https://github.com/openego/ding0/
The documentation is available on RTD: http://ding0.readthedocs.io"""

__copyright__  = "Reiner Lemoine Institut gGmbH"
__license__    = "GNU Affero General Public License Version 3 (AGPL-3.0)"
__url__        = "https://github.com/openego/ding0/blob/master/LICENSE"
__author__     = "nesnoj, gplssm"

from setuptools import find_packages, setup
import os

setup(name='ding0',
      version='v0.1.5',
      author='Reiner Lemoine Institut, openego development group',
      author_email='jonathan.amme@rl-institut.de',
      description='DIstribution Network GeneratOr',
      url='https://github.com/openego/ding0',
      license='GNU GPLv3',
      packages=find_packages(),
      install_requires=['networkx >= 1.11, <= 1.11',
                        'geopy >= 1.11.0, <= 1.11.0',
                        'pandas >= 0.20.3, <= 0.20.3',
                        'pyomo >= 5.0.1, <= 5.1.1',
                        'pyproj >= 1.9.5.1, <= 1.9.5.1',
                        'sqlalchemy >= 1.0.11, <= 1.2.0',
                        'geoalchemy2 >= 0.2.6, <= 0.4.1',
                        'matplotlib  >= 1.5.3, <= 1.5.3',
                        'egoio==0.3.1',
                        'shapely >= 1.5.12, <= 1.6.3',
                        'pypsa >= 0.11.0, <= 0.11.0',
                        'seaborn',
                        'unittest2',
                        'scipy < 1.0'],
      package_data={
          'ding0': [
              os.path.join('config',
                           '*.cfg'),
              os.path.join('data',
                           '*.csv'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Augerat',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Augerat-tcc',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Takes-tcc',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Vigo',
                           '*.vrp'),

          ]},
      classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        "Natural Language :: English",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Scientific/Engineering"],
      )
<commit_msg>Changed ego.io requirement version<commit_after>"""This file is part of DING0, the DIstribution Network GeneratOr.
DING0 is a tool to generate synthetic medium and low voltage power
distribution grids based on open data.

It is developed in the project open_eGo: https://openegoproject.wordpress.com

DING0 lives at github: https://github.com/openego/ding0/
The documentation is available on RTD: http://ding0.readthedocs.io"""

__copyright__  = "Reiner Lemoine Institut gGmbH"
__license__    = "GNU Affero General Public License Version 3 (AGPL-3.0)"
__url__        = "https://github.com/openego/ding0/blob/master/LICENSE"
__author__     = "nesnoj, gplssm"

from setuptools import find_packages, setup
import os

setup(name='ding0',
      version='v0.1.5',
      author='Reiner Lemoine Institut, openego development group',
      author_email='jonathan.amme@rl-institut.de',
      description='DIstribution Network GeneratOr',
      url='https://github.com/openego/ding0',
      license='GNU GPLv3',
      packages=find_packages(),
      install_requires=['networkx >= 1.11, <= 1.11',
                        'geopy >= 1.11.0, <= 1.11.0',
                        'pandas >= 0.20.3, <= 0.20.3',
                        'pyomo >= 5.0.1, <= 5.1.1',
                        'pyproj >= 1.9.5.1, <= 1.9.5.1',
                        'sqlalchemy >= 1.0.11, <= 1.2.0',
                        'geoalchemy2 >= 0.2.6, <= 0.4.1',
                        'matplotlib  >= 1.5.3, <= 1.5.3',
                        'egoio>=0.4.0',
                        'shapely >= 1.5.12, <= 1.6.3',
                        'pypsa >= 0.11.0, <= 0.11.0',
                        'seaborn',
                        'unittest2',
                        'scipy < 1.0'],
      package_data={
          'ding0': [
              os.path.join('config',
                           '*.cfg'),
              os.path.join('data',
                           '*.csv'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Augerat',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Augerat-tcc',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Takes-tcc',
                           '*.vrp'),
              os.path.join('grid',
                           'mv_grid',
                           'tests',
                           'testcases',
                           'Vigo',
                           '*.vrp'),

          ]},
      classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        "Natural Language :: English",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Scientific/Engineering"],
      )
<|endoftext|>


<commit_before>#!/usr/bin/env python

from setuptools import setup, find_packages

README = 'README.md'

def long_desc():
    try:
        import pypandoc
    except ImportError:
        with open(README) as f:
            return f.read()
    else:
        return pypandoc.convert(README, 'rst')

setup(
    name='ecmcli',
    version='2.3.0',
    description='Command Line Interface for Cradlepoint ECM',
    author='Justin Mayfield',
    author_email='tooker@gmail.com',
    url='https://github.com/mayfield/ecmcli/',
    license='MIT',
    long_description=long_desc(),
    packages=find_packages(),
    install_requires=[
        'syndicate==1.2.0',
        'shellish>=0.5.9',
        'humanize'
    ],
    entry_points = {
        'console_scripts': ['ecm=ecmcli.main:main'],
    },
    include_package_data=True,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3.4',
    ]
)
<commit_msg>Fix shellish requirement bump rev to 2.3.1<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages

README = 'README.md'

def long_desc():
    try:
        import pypandoc
    except ImportError:
        with open(README) as f:
            return f.read()
    else:
        return pypandoc.convert(README, 'rst')

setup(
    name='ecmcli',
    version='2.3.1',
    description='Command Line Interface for Cradlepoint ECM',
    author='Justin Mayfield',
    author_email='tooker@gmail.com',
    url='https://github.com/mayfield/ecmcli/',
    license='MIT',
    long_description=long_desc(),
    packages=find_packages(),
    install_requires=[
        'syndicate==1.2.0',
        'shellish>=0.6.0',
        'humanize'
    ],
    entry_points = {
        'console_scripts': ['ecm=ecmcli.main:main'],
    },
    include_package_data=True,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3.4',
    ]
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

import sys
from setuptools import setup, find_packages

needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
pytest_runner = ['pytest_runner'] if needs_pytest else []
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []

with open('README.rst', 'r') as f:
    long_description = f.read()

setup(
    name="ufo_extractor",
    version="0.3.1.dev0",
    description="Tools for extracting data from font binaries into UFO objects.",
    long_description=long_description,
    author="Tal Leming",
    author_email="tal@typesupply.com",
    maintainer="Just van Rossum, Frederik Berlaen",
    maintainer_email="justvanrossum@gmail.com",
    url="https://github.com/robotools/extractor",
    license="MIT",
    package_dir={"": "Lib"},
    packages=find_packages("Lib"),
    setup_requires=pytest_runner + wheel,
    tests_require=[
        'pytest>=2.8',
    ],
    install_requires=[
        "fonttools[ufo,lxml,woff,unicode,type1]>=4.0.0",
    ],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Environment :: Other Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python",
        "Topic :: Multimedia :: Graphics :: Editors :: Vector-Based",
        "Topic :: Multimedia :: Graphics :: Graphics Conversion",
        "Topic :: Multimedia :: Graphics",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Text Processing :: Fonts",
    ],
)
<commit_msg>Update FontTools dependency to 4.17.0 (needs https://github.com/fonttools/fonttools/pull/2005)<commit_after>#!/usr/bin/env python

import sys
from setuptools import setup, find_packages

needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
pytest_runner = ['pytest_runner'] if needs_pytest else []
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []

with open('README.rst', 'r') as f:
    long_description = f.read()

setup(
    name="ufo_extractor",
    version="0.3.1.dev0",
    description="Tools for extracting data from font binaries into UFO objects.",
    long_description=long_description,
    author="Tal Leming",
    author_email="tal@typesupply.com",
    maintainer="Just van Rossum, Frederik Berlaen",
    maintainer_email="justvanrossum@gmail.com",
    url="https://github.com/robotools/extractor",
    license="MIT",
    package_dir={"": "Lib"},
    packages=find_packages("Lib"),
    setup_requires=pytest_runner + wheel,
    tests_require=[
        'pytest>=2.8',
    ],
    install_requires=[
        "fonttools[ufo,lxml,woff,unicode,type1]>=4.17.0",
    ],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Environment :: Other Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python",
        "Topic :: Multimedia :: Graphics :: Editors :: Vector-Based",
        "Topic :: Multimedia :: Graphics :: Graphics Conversion",
        "Topic :: Multimedia :: Graphics",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Text Processing :: Fonts",
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='django-simpleimages',
    version='1.0.0',
    author='Saul Shanabrook',
    author_email='s.shanabrook@gmail.com',
    packages=['simpleimages', ],
    url='https://www.github.com/saulshanabrook/django-simpleimages',
    license=open('LICENSE.txt').read(),
    description='Opinionated Django image transforms on models',
    long_description=open('README.rst').read(),
    install_requires=[
        "Django>=1.5,<=1.6",
        "six"
    ],
    zip_safe=False,  # so that django finds management commands,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Operating System :: Unix',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: POSIX',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Libraries',
    ],
)
<commit_msg>Add management file to packages so django can find it<commit_after>from setuptools import setup

setup(
    name='django-simpleimages',
    version='1.0.0',
    author='Saul Shanabrook',
    author_email='s.shanabrook@gmail.com',
    packages=['simpleimages', 'simpleimages.management.commands'],
    url='https://www.github.com/saulshanabrook/django-simpleimages',
    license=open('LICENSE.txt').read(),
    description='Opinionated Django image transforms on models',
    long_description=open('README.rst').read(),
    install_requires=[
        "Django>=1.5,<=1.6",
        "six"
    ],
    zip_safe=False,  # so that django finds management commands,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Operating System :: Unix',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: POSIX',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Libraries',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='distutils-licenses',
    version='0.1.0',

    author='Daniel A. Koepke',
    author_email='dkoepke@gmail.com',
    license='MIT',

    description='adds a command to setup.py to list licenses of packages',
    long_description=open('README.txt').read(),

    url='http://github.com/dkoepke/distutils-licenses',
    packages=['distutils_licenses'],

    entry_points={
        'distutils.commands': [
            'licenses = distutils_licenses.command:LicenseCommand',
        ],
    }
)
<commit_msg>Version bump.<commit_after>from setuptools import setup

setup(
    name='distutils-licenses',
    version='0.1.1',

    author='Daniel A. Koepke',
    author_email='dkoepke@gmail.com',
    license='MIT',

    description='adds a command to setup.py to list licenses of packages',
    long_description=open('README.txt').read(),

    url='http://github.com/dkoepke/distutils-licenses',
    packages=['distutils_licenses'],

    entry_points={
        'distutils.commands': [
            'licenses = distutils_licenses.command:LicenseCommand',
        ],
    }
)
<|endoftext|>


<commit_before># encoding: UTF-8
from setuptools import setup

setup(
    name='inapppy',
    version='0.9',
    packages=['inapppy'],
    install_requires=['rsa', 'requests', 'google-api-python-client', 'oauth2client==3.0.0'],
    description="In-app purchase validation library for Apple AppStore and GooglePlay.",
    keywords='in-app store purchase googleplay appstore validation',
    author='Lukas Šalkauskas',
    author_email='halfas.online@gmail.com',
    url='https://github.com/dotpot/InAppPy',
    long_description=open('README.rst').read(),
    license='MIT'
)
<commit_msg>version bump<commit_after># encoding: UTF-8
from setuptools import setup

setup(
    name='inapppy',
    version='2.0',
    packages=['inapppy'],
    install_requires=['rsa', 'requests', 'google-api-python-client', 'oauth2client==3.0.0'],
    description="In-app purchase validation library for Apple AppStore and GooglePlay.",
    keywords='in-app store purchase googleplay appstore validation',
    author='Lukas Šalkauskas',
    author_email='halfas.online@gmail.com',
    url='https://github.com/dotpot/InAppPy',
    long_description=open('README.rst').read(),
    license='MIT'
)
<|endoftext|>


<commit_before>import sys
from pathlib import Path

from setuptools import setup

install_requires = [
        "asyncwebsockets>=0.2.1,<0.3.0",
        "pylru==1.0.9",
        "oauthlib>=2.0.2,<2.1.0",
        "pytz>=2017.3",
        "asks>=1.3.0,<1.4.0",
        "multidict>=2.1.6<2.2.0",
        "multio>=0.2.0,<0.3.0",
        "async_generator~=1.9",  # asynccontextmanager for 3.6
]

py36_requires = [
    "dataclasses>=0.3",  # PEP 557
    # pending 567 backport
]

if sys.version_info[0:2] <= (3, 6):
    install_requires += py36_requires

setup(
    name='discord-curious',
    use_scm_version={
        "version_scheme": "guess-next-dev",
        "local_scheme": "dirty-tag"
    },
    packages=['curious', 'curious.core', 'curious.commands', 'curious.dataclasses',
              'curious.voice', 'curious.ext.paginator', 'curious.ipc'],
    url='https://github.com/SunDwarf/curious',
    license='LGPLv3',
    author='Laura Dickinson',
    author_email='l@veriny.tf',
    description='An async library for the Discord API',
    long_description=Path(__file__).with_name("README.rst").read_text(encoding="utf-8"),
    python_requires=">=3.6.2",
    setup_requires=[
        "setuptools_scm",
    ],
    install_requires=install_requires,
    extras_require={
        "voice": ["opuslib==1.1.0",
                  "PyNaCL==1.0.1"],
        "docs": [
            "sphinx_py3doc_enhanced_theme",
            "sphinx",
            "sphinxcontrib-asyncio",
            "sphinx-autodoc-typehints",
        ]
    },
)
<commit_msg>Fix requirement string<commit_after>import sys
from pathlib import Path

from setuptools import setup

install_requires = [
        "asyncwebsockets>=0.2.1,<0.3.0",
        "pylru==1.0.9",
        "oauthlib>=2.0.2,<2.1.0",
        "pytz>=2017.3",
        "asks>=1.3.0,<1.4.0",
        "multidict>=2.1.6,<2.2.0",
        "multio>=0.2.0,<0.3.0",
        "async_generator~=1.9",  # asynccontextmanager for 3.6
]

py36_requires = [
    "dataclasses>=0.3",  # PEP 557
    # pending 567 backport
]

if sys.version_info[0:2] <= (3, 6):
    install_requires += py36_requires

setup(
    name='discord-curious',
    use_scm_version={
        "version_scheme": "guess-next-dev",
        "local_scheme": "dirty-tag"
    },
    packages=['curious', 'curious.core', 'curious.commands', 'curious.dataclasses',
              'curious.voice', 'curious.ext.paginator', 'curious.ipc'],
    url='https://github.com/SunDwarf/curious',
    license='LGPLv3',
    author='Laura Dickinson',
    author_email='l@veriny.tf',
    description='An async library for the Discord API',
    long_description=Path(__file__).with_name("README.rst").read_text(encoding="utf-8"),
    python_requires=">=3.6.2",
    setup_requires=[
        "setuptools_scm",
    ],
    install_requires=install_requires,
    extras_require={
        "voice": ["opuslib==1.1.0",
                  "PyNaCL==1.0.1"],
        "docs": [
            "sphinx_py3doc_enhanced_theme",
            "sphinx",
            "sphinxcontrib-asyncio",
            "sphinx-autodoc-typehints",
        ]
    },
)
<|endoftext|>


<commit_before>import re
import sys

from setuptools import find_packages, setup

def _read_long_description():
    try:
        with open("readme.rst") as fd:
            return fd.read()
    except Exception:
        return None

with open("semantic_release/__init__.py", "r") as fd:
    version = re.search(
        r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE
    ).group(1)

try:
    from semantic_release import setup_hook

    setup_hook(sys.argv)
except ImportError:
    pass

setup(
    name="python-semantic-release",
    version=version,
    url="http://github.com/relekang/python-semantic-release",
    author="Rolf Erik Lekang",
    author_email="me@rolflekang.com",
    description="Automatic Semantic Versioning for Python projects",
    long_description=_read_long_description(),
    packages=find_packages(exclude=("tests",)),
    license="MIT",
    install_requires=[
        "click>=7,<9",
        "click_log>=0.3,<1",
        "gitpython>=3.0.8,<4",
        "invoke>=1.4.1,<2",
        "semver>=2.10,<3",
        "twine>=3,<4",
        "requests>=2.25,<3",
        "wheel",
        "python-gitlab>=2,<4",
        # tomlkit used to be pinned to 0.7.0
        # See https://github.com/relekang/python-semantic-release/issues/336
        # and https://github.com/relekang/python-semantic-release/pull/337
        "tomlkit>=0.10.0,<0.11.0",
        "dotty-dict>=1.3.0,<2",
        "dataclasses==0.8; python_version < '3.7.0'",
        "packaging",
    ],
    extras_require={
        "test": [
            "coverage>=5,<6",
            "pytest>=5,<6",
            "pytest-xdist>=1,<2",
            "pytest-mock>=2,<3",
            "responses==0.13.3",
            "mock==1.3.0",
        ],
        "docs": ["Sphinx==1.3.6", "Jinja2==3.0.3"],
        "dev": ["tox", "isort", "black"],
        "mypy": ["mypy", "types-requests"],
    },
    entry_points="""
        [console_scripts]
        semantic-release=semantic_release.cli:entry
    """,
    include_package_data=True,
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
    ],
)
<commit_msg>chore(dependencies): pin tomlkit major version only (#492)<commit_after>import re
import sys

from setuptools import find_packages, setup

def _read_long_description():
    try:
        with open("readme.rst") as fd:
            return fd.read()
    except Exception:
        return None

with open("semantic_release/__init__.py", "r") as fd:
    version = re.search(
        r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE
    ).group(1)

try:
    from semantic_release import setup_hook

    setup_hook(sys.argv)
except ImportError:
    pass

setup(
    name="python-semantic-release",
    version=version,
    url="http://github.com/relekang/python-semantic-release",
    author="Rolf Erik Lekang",
    author_email="me@rolflekang.com",
    description="Automatic Semantic Versioning for Python projects",
    long_description=_read_long_description(),
    packages=find_packages(exclude=("tests",)),
    license="MIT",
    install_requires=[
        "click>=7,<9",
        "click_log>=0.3,<1",
        "gitpython>=3.0.8,<4",
        "invoke>=1.4.1,<2",
        "semver>=2.10,<3",
        "twine>=3,<4",
        "requests>=2.25,<3",
        "wheel",
        "python-gitlab>=2,<4",
        # tomlkit used to be pinned to 0.7.0
        # See https://github.com/relekang/python-semantic-release/issues/336
        # and https://github.com/relekang/python-semantic-release/pull/337
        # and https://github.com/relekang/python-semantic-release/issues/491
        "tomlkit~=0.10",
        "dotty-dict>=1.3.0,<2",
        "dataclasses==0.8; python_version < '3.7.0'",
        "packaging",
    ],
    extras_require={
        "test": [
            "coverage>=5,<6",
            "pytest>=5,<6",
            "pytest-xdist>=1,<2",
            "pytest-mock>=2,<3",
            "responses==0.13.3",
            "mock==1.3.0",
        ],
        "docs": ["Sphinx==1.3.6", "Jinja2==3.0.3"],
        "dev": ["tox", "isort", "black"],
        "mypy": ["mypy", "types-requests"],
    },
    entry_points="""
        [console_scripts]
        semantic-release=semantic_release.cli:entry
    """,
    include_package_data=True,
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
    ],
)
<|endoftext|>


<commit_before>import os
from setuptools import setup, find_packages

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
    README = readme.read()

# 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='wooey',
    version='0.2.6',
    packages=find_packages(),
    scripts=['scripts/wooify'],
    entry_points={'console_scripts': ['wooify = wooey.backend.command_line:bootstrap',]},
    install_requires = ['Django>=1.6', 'django-autoslug', 'django-celery', 'six', 'clinto'],
    include_package_data=True,
    description='A Django app which creates a web GUI and task interface for argparse scripts',
    url='http://www.github.com/wooey/django-djangui',
    author='Chris Mitchell',
    author_email='chris.mit7@gmail.com',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)

<commit_msg>Update setup.py<commit_after>import os
from setuptools import setup, find_packages

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
    README = readme.read()

# 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='wooey',
    version='0.2.6',
    packages=find_packages(),
    scripts=['scripts/wooify'],
    entry_points={'console_scripts': ['wooify = wooey.backend.command_line:bootstrap',]},
    install_requires = ['Django>=1.6', 'django-autoslug', 'django-celery', 'six', 'clinto'],
    include_package_data=True,
    description='A Django app which creates a web GUI and task interface for argparse scripts',
    url='http://www.github.com/wooey/django-djangui',
    author='Chris Mitchell <chris.mit7@gmail.com>, Martin Fitzpatrick <martin.fitzpatrick@gmail.com>',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)

<|endoftext|>


<commit_before>#!/usr/bin/env python
"""
Mezmorize
-----------

Adds function memoization support

"""
import sys
import re

from os import path as p

try:
    from setuptools import setup, find_packages
except ImportError:
    from distutils.core import setup, find_packages

def read(filename, parent=None):
    parent = (parent or __file__)

    try:
        with open(p.join(p.dirname(parent), filename)) as f:
            return f.read()
    except IOError:
        return ''

def parse_requirements(filename, parent=None, dep=False):
    parent = (parent or __file__)
    filepath = p.join(p.dirname(parent), filename)
    content = read(filename, parent)

    for line_number, line in enumerate(content.splitlines(), 1):
        candidate = line.strip()

        if candidate.startswith('-r'):
            args = [candidate[2:].strip(), filepath, dep]

            for item in parse_requirements(*args):
                yield item
        elif not dep and '#egg=' in candidate:
            yield re.sub('.*#egg=(.*)-(.*)', r'\1==\2', candidate)
        elif dep and '#egg=' in candidate:
            yield candidate.replace('-e ', '')
        elif not dep:
            yield candidate

requirements = list(parse_requirements('requirements.txt'))
readme = read('README')

# Avoid byte-compiling the shipped template
sys.dont_write_bytecode = True

setup(
    name='Mezmorize',
    version='0.16.0',
    url='http://github.com/kazeeki/mezmorize',
    license='BSD License',
    author='Reuben Cummings',
    author_email='reubano@gmail.com',
    description='Adds function memoization support',
    long_description=readme,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    platforms=['MacOS X', 'Windows', 'Linux'],
    test_suite='test_cache',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
    install_requires=requirements,
)
<commit_msg>Bump to version 0.16.1<commit_after>#!/usr/bin/env python
"""
Mezmorize
-----------

Adds function memoization support

"""
import sys
import re

from os import path as p

try:
    from setuptools import setup, find_packages
except ImportError:
    from distutils.core import setup, find_packages

def read(filename, parent=None):
    parent = (parent or __file__)

    try:
        with open(p.join(p.dirname(parent), filename)) as f:
            return f.read()
    except IOError:
        return ''

def parse_requirements(filename, parent=None, dep=False):
    parent = (parent or __file__)
    filepath = p.join(p.dirname(parent), filename)
    content = read(filename, parent)

    for line_number, line in enumerate(content.splitlines(), 1):
        candidate = line.strip()

        if candidate.startswith('-r'):
            args = [candidate[2:].strip(), filepath, dep]

            for item in parse_requirements(*args):
                yield item
        elif not dep and '#egg=' in candidate:
            yield re.sub('.*#egg=(.*)-(.*)', r'\1==\2', candidate)
        elif dep and '#egg=' in candidate:
            yield candidate.replace('-e ', '')
        elif not dep:
            yield candidate

requirements = list(parse_requirements('requirements.txt'))
readme = read('README')

# Avoid byte-compiling the shipped template
sys.dont_write_bytecode = True

setup(
    name='Mezmorize',
    version='0.16.1',
    url='http://github.com/kazeeki/mezmorize',
    license='BSD License',
    author='Reuben Cummings',
    author_email='reubano@gmail.com',
    description='Adds function memoization support',
    long_description=readme,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    platforms=['MacOS X', 'Windows', 'Linux'],
    test_suite='test_cache',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
    install_requires=requirements,
)
<|endoftext|>


<commit_before># Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='python-scopus',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='0.7.1',

    description='A Python wrapper for Scopus API',
    long_description=long_description,

    # The project's main homepage.
    url='http://zhiyzuo.github.io/python-scopus/',

    # Author details
    author='Zhiya Zuo',
    author_email='zhiyazuo@gmail.com',

    # Choose your license
    license='MIT',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        'Intended Audience :: Information Technology',
        'Topic :: Text Editors :: Text Processing',
        'Topic :: Scientific/Engineering :: Information Analysis',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='scopus python api document retrieval information scholar academic',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    #packages=find_packages(exclude=['test*', '_site']),
    packages=['pyscopus'],

    # Alternatively, if you want to distribute just a my_module.py, uncomment
    # this:
    #   py_modules=["my_module"],

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    # install_requires=['bs4', 'numpy', 'pandas'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    #extras_require={
    #    'dev': ['check-manifest'],
    #    'test': ['coverage'],
    #},

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    #package_data={
    #    'sample': ['package_data.dat'],
    #},

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages. See:
    # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    #data_files=[('my_data', ['data/data_file'])],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    #entry_points={
    #    'console_scripts': [
    #        'sample=sample:main',
    #    ],
    #},
)
<commit_msg>new setup file<commit_after># Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='pyscopus',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='0.7.0a1',

    description='A Python wrapper for Scopus API',
    # long_description=long_description,

    # The project's main homepage.
    url='http://zhiyzuo.github.io/python-scopus/',

    # Author details
    author='Zhiya Zuo',
    author_email='zhiyazuo@gmail.com',

    # Choose your license
    license='MIT',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        'Intended Audience :: Information Technology',
        'Topic :: Text Editors :: Text Processing',
        'Topic :: Scientific/Engineering :: Information Analysis',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='scopus python api document retrieval information scholar academic',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    #packages=find_packages(exclude=['test*', '_site']),
    packages=['pyscopus'],

    # Alternatively, if you want to distribute just a my_module.py, uncomment
    # this:
    #   py_modules=["my_module"],

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    # install_requires=['bs4', 'numpy', 'pandas'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    #extras_require={
    #    'dev': ['check-manifest'],
    #    'test': ['coverage'],
    #},

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    #package_data={
    #    'sample': ['package_data.dat'],
    #},

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages. See:
    # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    #data_files=[('my_data', ['data/data_file'])],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    #entry_points={
    #    'console_scripts': [
    #        'sample=sample:main',
    #    ],
    #},
)
<|endoftext|>