<commit_before>"""setup.py - build python-javabridge

python-javabridge is licensed under the BSD license.  See the
accompanying file LICENSE for details.

Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2013 Broad Institute
All rights reserved.

"""

import errno
import glob
import os
import re
import sys
try:
    import sysconfig
except:
    import distutils.sysconfig as sysconfig
import subprocess
import traceback
import distutils.log
from distutils.errors import DistutilsSetupError, DistutilsExecError, LinkError
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as _build_ext
from distutils.command.build_clib import build_clib
from distutils.ccompiler import CCompiler

try:
    from numpy import get_include
except ImportError:
    raise RuntimeError("""Numpy must be installed before installing javabridge.
It cannot be installed automatically when pip-installing javabridge.
See https://github.com/CellProfiler/python-javabridge/issues/30""")

# Hack to avoid importing the javabridge package
sys.path.append(os.path.join(os.path.dirname(__file__), 'javabridge'))
from locate import *

def in_cwd(basename):
    return os.path.join(os.path.dirname(__file__), basename)

def build_cython():
    """Compile the pyx files if we have them.

    The git repository has the .pyx files but not the .c files, and
    the source distributions that are uploaded to PyPI have the .c
    files and not the .pyx files. (The reason for the latter is that
    some versions of pip discovers the .pyx files and implicitly adds
    a dependency on Cython.) Therefore, if we have the .pyx files,
    compile them.

    """
    stems = ['_javabridge', '_javabridge_mac', '_javabridge_nomac']
    pyx_filenames = [in_cwd(s + '.pyx') for s in stems]
    c_filenames = [in_cwd(s + '.c') for s in stems]
    nc_pyx_filenames = [
        pyx for pyx, c in zip(pyx_filenames, c_filenames)
        if os.path.exists(pyx) and needs_compilation(c, pyx)]
    if len(nc_pyx_filenames) > 0:
        cmd = ['cython'] + nc_pyx_filenames
        subprocess.check_call(cmd)

def get_jvm_include_dirs():
    '''Return a sequence of paths to include directories for JVM defs'''
    jdk_home = find_jdk()
    java_home = find_javahome()
    include_dirs = []
    if is_win:
        if jdk_home is not None:
            jdk_include = os.path.join(jdk_home, "include")
            jdk_include_plat = os.path.join(jdk_include, sys.platform)
            include_dirs += [jdk_include, jdk_include_plat]
    elif is_mac:
        include_dirs += ['/System/Library/Frameworks/JavaVM.framework/Headers']
    elif is_linux:
        include_dirs += [os.path.join(java_home,'include'),
                         os.path.join(java_home,'include','linux')]

    return include_dirs

def ext_modules():
    extensions = []
    extra_link_args = None
    java_home = find_javahome()
    if java_home is None:
        raise JVMNotFoundError()
    jdk_home = find_jdk()
    include_dirs = [get_include()] + get_jvm_include_dirs()
    libraries = None
    library_dirs = None
    javabridge_sources = ['_javabridge.c']
    if is_mac:
        javabridge_sources += ['_javabridge_mac.c']
    else:
        javabridge_sources += ['_javabridge_nomac.c']
    if is_win:
        if is_mingw:
            #
            # Build libjvm from jvm.dll on Windows.
            # This assumes that we're using mingw32 for build
            #
            cmd = ["dlltool", "--dllname",
                   os.path.join(jdk_home,"jre\\bin\\client\\jvm.dll"),
                   "--output-lib","libjvm.a",
                   "--input-def","jvm.def",
                   "--kill-at"]
            p = subprocess.Popen(cmd)
            p.communicate()
            library_dirs = [os.path.abspath(".")]
        else:
            #
            # Use the MSVC lib in the JDK
            #
            extra_link_args = ['/MANIFEST']
            jdk_lib = os.path.join(jdk_home, "lib")
            library_dirs = [jdk_lib]
            javabridge_sources.append("strtoull.c")

        libraries = ["jvm"]
    elif is_mac:
        javabridge_sources += [ "mac_javabridge_utils.c" ]
        extra_link_args = ['-framework', 'JavaVM']
    elif is_linux:
        library_dirs = [os.path.join(java_home,'jre','lib', arch, cs)
                        for arch in ['amd64', 'i386']
                        for cs in ['client', 'server']]
        libraries = ["jvm"]
    extension_kwargs = dict(
        name="javabridge._javabridge",
        sources=javabridge_sources,
        libraries=libraries,
        library_dirs=library_dirs,
        include_dirs=include_dirs,
        extra_link_args=extra_link_args)
    if not is_win:
        extension_kwargs["runtime_library_dirs"] =library_dirs

    extensions += [Extension(**extension_kwargs)]
    return extensions

SO = ".dll" if sys.platform == 'win32' else sysconfig.get_config_var("SO")

def libraries():
    '''Return the library definitions for build_clib'''
    #
    # Create a command to build the JNI native code for
    # org.cellprofiler.javabridge.CPython
    #
    include_dirs = [sysconfig.get_config_var("INCLUDEPY"),
                    "java"] + get_jvm_include_dirs()
    if is_win:
        python_lib_dir = os.path.join(
            sysconfig.get_config_var('platbase'),
            'LIBS')
    else:
        python_lib_dir = sysconfig.get_config_var("LIBDIR")
    java2cpython = (
        "java2cpython"+SO, {
            'sources': ["java/org_cellprofiler_javabridge_CPython.c"],
            'include_dirs': include_dirs,
            'library_dirs': [python_lib_dir],
            'output_dir': "javabridge/jars",
            'export_symbols': [
                'Java_org_cellprofiler_javabridge_CPython_exec']
        })
    return [java2cpython]

def needs_compilation(target, *sources):
    try:
        target_date = os.path.getmtime(target)
    except OSError, e:
        if e.errno != errno.ENOENT:
            raise
        return True
    for source in sources:
        source_date = os.path.getmtime(source)
        if source_date > target_date:
            return True
    return False

def package_path(relpath):
    return os.path.normpath(os.path.join(os.path.dirname(__file__), relpath))

def build_jar_from_single_source(jar, source):
    if sys.platform == 'win32':
        jar = jar.replace("/", os.path.sep)
        source = source.replace("/", os.path.sep)
    if needs_compilation(jar, source):
        javac_loc = find_javac_cmd()
        javac_command = [javac_loc, package_path(source)]
        print ' '.join(javac_command)
        subprocess.check_call(javac_command)
        if not os.path.exists(os.path.dirname(jar)):
            os.mkdir(os.path.dirname(jar))
        jar_command = [find_jar_cmd(), 'cf', package_path(jar)]
        for klass in glob.glob(source[:source.rindex('.')] + '*.class'):
            java_klass_path = klass[klass.index(os.path.sep) + 1:].replace(os.path.sep, "/")
            jar_command.extend(['-C', package_path('java'), java_klass_path])
        print ' '.join(jar_command)
        subprocess.check_call(jar_command)

def build_runnablequeue():
    jar = 'javabridge/jars/runnablequeue.jar'
    source = 'java/org/cellprofiler/runnablequeue/RunnableQueue.java'
    build_jar_from_single_source(jar, source)

def build_cpython():
    jar = 'javabridge/jars/cpython.jar'
    source = 'java/org/cellprofiler/javabridge/CPython.java'
    build_jar_from_single_source(jar, source)

def build_test():
    jar = 'javabridge/jars/test.jar'
    source = 'java/org/cellprofiler/javabridge/test/RealRect.java'
    build_jar_from_single_source(jar, source)

def build_java():
    build_runnablequeue()
    build_test()
    build_cpython()

class build_ext(_build_ext):
    def run(self, *args, **kwargs):
        build_java()
        build_cython()
        return _build_ext.run(self, *args, **kwargs)

class build_so(build_clib):
    '''Build a shared library or .DLL'''
    def get_library_names(self):
        '''Override to prevent build_ext from linking stand-alone dlls'''
        return []

    def build_libraries(self, libraries):
        '''Override of build_clib's build_libraries'''
        #
        # Taken from distutils build_clib which, itself is lifted
        # from build_ext.
        #
        for (lib_name, build_info) in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError, \
                      ("in 'libraries' option (library '%s'), " +
                       "'sources' must be present and must be " +
                       "a list of source filenames") % lib_name
            sources = list(sources)

            distutils.log.info("building '%s' library", lib_name)

            # First, compile the source code to object files in the library
            # directory.  (This should probably change to putting object
            # files in a temporary build directory.)
            macros = build_info.get('macros')
            include_dirs = build_info.get('include_dirs')
            libraries = build_info.get('libraries')
            library_dirs = build_info.get('library_dirs')
            output_dir = build_info.get('output_dir', self.build_clib)
            export_symbols = build_info.get('export_symbols')
            objects = self.compiler.compile(sources,
                                            output_dir=self.build_temp,
                                            macros=macros,
                                            include_dirs=include_dirs,
                                            debug=self.debug)

            self.compiler.link(
                CCompiler.SHARED_LIBRARY,
                objects, lib_name,
                output_dir=output_dir,
                debug=self.debug,
                library_dirs=library_dirs,
                libraries=libraries,
                export_symbols=export_symbols)
            if sys.platform == 'win32':
                temp_dir = os.path.dirname(objects[0])
                manifest_name = lib_name +".manifest"
                if output_dir is not None:
                    lib_path = os.path.join(output_dir, lib_name)
                else:
                    lib_path = os.path.join(temp_dir, lib_name)
                manifest_file = os.path.join(temp_dir, manifest_name)
                lib_path = os.path.abspath(lib_path)
                manifest_file = os.path.abspath(manifest_file)
                out_arg = '-outputresource:%s;2' % lib_path
                try:
                    self.compiler.spawn([
                        'mt.exe', '-nologo', '-manifest', manifest_file,
                        out_arg])
                except DistutilsExecError, msg:
                    raise LinkError(msg)

def get_version():
    """Get version from git or file system.

    If this is a git repository, try to get the version number by
    running ``git describe``, then store it in
    javabridge/_version.py. Otherwise, try to load the version number
    from that file. If both methods fail, quietly return None.

    """
    git_version = None
    if os.path.exists(os.path.join(os.path.dirname(__file__), '.git')):
        import subprocess
        try:
            git_version = subprocess.Popen(['git', 'describe'],
                                           stdout=subprocess.PIPE).communicate()[0].strip()
        except:
            pass

    version_file = os.path.join(os.path.dirname(__file__), 'javabridge',
                                '_version.py')
    if os.path.exists(version_file):
        with open(version_file) as f:
            cached_version_line = f.read().strip()
        try:
            # From http://stackoverflow.com/a/3619714/17498
            cached_version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                                       cached_version_line, re.M).group(1)
        except:
            raise RuntimeError("Unable to find version in %s" % version_file)
    else:
        cached_version = None

    if git_version and git_version != cached_version:
        with open(version_file, 'w') as f:
            print >>f, '__version__ = "%s"' % git_version

    return git_version or cached_version

if __name__ == '__main__':
    if '/' in __file__:
        os.chdir(os.path.dirname(__file__))

    setup(name="javabridge",
          version=get_version(),
          description="Python wrapper for the Java Native Interface",
          long_description='''The python-javabridge package makes it easy to start a Java virtual
machine (JVM) from Python and interact with it. Python code can
interact with the JVM using a low-level API or a more convenient
high-level API. Python-javabridge was developed for and is used by the
cell image analysis software CellProfiler (cellprofiler.org).''',
          url="http://github.com/CellProfiler/python-javabridge/",
          packages=['javabridge'],
          classifiers=['Development Status :: 5 - Production/Stable',
                       'License :: OSI Approved :: BSD License',
                       'Programming Language :: Java',
                       'Programming Language :: Python :: 2 :: Only'
                       ],
          license='BSD License',
          install_requires=['numpy'],
          tests_require="nose",
          entry_points={'nose.plugins.0.10': [
                'javabridge = javabridge.noseplugin:JavabridgePlugin'
                ]},
          test_suite="nose.collector",
          package_data={"javabridge": ['jars/*.jar', 'VERSION']},
          data_files=[("javabridge/jars", glob.glob("javabridge/jars/*%s" % SO))],
          libraries=libraries(),
          ext_modules=ext_modules(),
          cmdclass={'build_ext': build_ext,
                    'build_clib': build_so})
<commit_msg>In Linux, libjava2cpython.so<commit_after>"""setup.py - build python-javabridge

python-javabridge is licensed under the BSD license.  See the
accompanying file LICENSE for details.

Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2013 Broad Institute
All rights reserved.

"""

import errno
import glob
import os
import re
import sys
try:
    import sysconfig
except:
    import distutils.sysconfig as sysconfig
import subprocess
import traceback
import distutils.log
from distutils.errors import DistutilsSetupError, DistutilsExecError, LinkError
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as _build_ext
from distutils.command.build_clib import build_clib
from distutils.ccompiler import CCompiler

try:
    from numpy import get_include
except ImportError:
    raise RuntimeError("""Numpy must be installed before installing javabridge.
It cannot be installed automatically when pip-installing javabridge.
See https://github.com/CellProfiler/python-javabridge/issues/30""")

# Hack to avoid importing the javabridge package
sys.path.append(os.path.join(os.path.dirname(__file__), 'javabridge'))
from locate import *

def in_cwd(basename):
    return os.path.join(os.path.dirname(__file__), basename)

def build_cython():
    """Compile the pyx files if we have them.

    The git repository has the .pyx files but not the .c files, and
    the source distributions that are uploaded to PyPI have the .c
    files and not the .pyx files. (The reason for the latter is that
    some versions of pip discovers the .pyx files and implicitly adds
    a dependency on Cython.) Therefore, if we have the .pyx files,
    compile them.

    """
    stems = ['_javabridge', '_javabridge_mac', '_javabridge_nomac']
    pyx_filenames = [in_cwd(s + '.pyx') for s in stems]
    c_filenames = [in_cwd(s + '.c') for s in stems]
    nc_pyx_filenames = [
        pyx for pyx, c in zip(pyx_filenames, c_filenames)
        if os.path.exists(pyx) and needs_compilation(c, pyx)]
    if len(nc_pyx_filenames) > 0:
        cmd = ['cython'] + nc_pyx_filenames
        subprocess.check_call(cmd)

def get_jvm_include_dirs():
    '''Return a sequence of paths to include directories for JVM defs'''
    jdk_home = find_jdk()
    java_home = find_javahome()
    include_dirs = []
    if is_win:
        if jdk_home is not None:
            jdk_include = os.path.join(jdk_home, "include")
            jdk_include_plat = os.path.join(jdk_include, sys.platform)
            include_dirs += [jdk_include, jdk_include_plat]
    elif is_mac:
        include_dirs += ['/System/Library/Frameworks/JavaVM.framework/Headers']
    elif is_linux:
        include_dirs += [os.path.join(java_home,'include'),
                         os.path.join(java_home,'include','linux')]

    return include_dirs

def ext_modules():
    extensions = []
    extra_link_args = None
    java_home = find_javahome()
    if java_home is None:
        raise JVMNotFoundError()
    jdk_home = find_jdk()
    include_dirs = [get_include()] + get_jvm_include_dirs()
    libraries = None
    library_dirs = None
    javabridge_sources = ['_javabridge.c']
    if is_mac:
        javabridge_sources += ['_javabridge_mac.c']
    else:
        javabridge_sources += ['_javabridge_nomac.c']
    if is_win:
        if is_mingw:
            #
            # Build libjvm from jvm.dll on Windows.
            # This assumes that we're using mingw32 for build
            #
            cmd = ["dlltool", "--dllname",
                   os.path.join(jdk_home,"jre\\bin\\client\\jvm.dll"),
                   "--output-lib","libjvm.a",
                   "--input-def","jvm.def",
                   "--kill-at"]
            p = subprocess.Popen(cmd)
            p.communicate()
            library_dirs = [os.path.abspath(".")]
        else:
            #
            # Use the MSVC lib in the JDK
            #
            extra_link_args = ['/MANIFEST']
            jdk_lib = os.path.join(jdk_home, "lib")
            library_dirs = [jdk_lib]
            javabridge_sources.append("strtoull.c")

        libraries = ["jvm"]
    elif is_mac:
        javabridge_sources += [ "mac_javabridge_utils.c" ]
        extra_link_args = ['-framework', 'JavaVM']
    elif is_linux:
        library_dirs = [os.path.join(java_home,'jre','lib', arch, cs)
                        for arch in ['amd64', 'i386']
                        for cs in ['client', 'server']]
        libraries = ["jvm"]
    extension_kwargs = dict(
        name="javabridge._javabridge",
        sources=javabridge_sources,
        libraries=libraries,
        library_dirs=library_dirs,
        include_dirs=include_dirs,
        extra_link_args=extra_link_args)
    if not is_win:
        extension_kwargs["runtime_library_dirs"] =library_dirs

    extensions += [Extension(**extension_kwargs)]
    return extensions

SO = ".dll" if sys.platform == 'win32' else sysconfig.get_config_var("SO")

def libraries():
    '''Return the library definitions for build_clib'''
    #
    # Create a command to build the JNI native code for
    # org.cellprofiler.javabridge.CPython
    #
    include_dirs = [sysconfig.get_config_var("INCLUDEPY"),
                    "java"] + get_jvm_include_dirs()
    if is_win:
        python_lib_dir = os.path.join(
            sysconfig.get_config_var('platbase'),
            'LIBS')
        java2cpython_file = "java2cpython.dll"
    else:
        python_lib_dir = sysconfig.get_config_var("LIBDIR")
        java2cpython_file = "libjava2cpython" + SO
    java2cpython = (
        java2cpython_file, {
            'sources': ["java/org_cellprofiler_javabridge_CPython.c"],
            'include_dirs': include_dirs,
            'library_dirs': [python_lib_dir],
            'output_dir': "javabridge/jars",
            'export_symbols': [
                'Java_org_cellprofiler_javabridge_CPython_exec']
        })
    return [java2cpython]

def needs_compilation(target, *sources):
    try:
        target_date = os.path.getmtime(target)
    except OSError, e:
        if e.errno != errno.ENOENT:
            raise
        return True
    for source in sources:
        source_date = os.path.getmtime(source)
        if source_date > target_date:
            return True
    return False

def package_path(relpath):
    return os.path.normpath(os.path.join(os.path.dirname(__file__), relpath))

def build_jar_from_single_source(jar, source):
    if sys.platform == 'win32':
        jar = jar.replace("/", os.path.sep)
        source = source.replace("/", os.path.sep)
    if needs_compilation(jar, source):
        javac_loc = find_javac_cmd()
        javac_command = [javac_loc, package_path(source)]
        print ' '.join(javac_command)
        subprocess.check_call(javac_command)
        if not os.path.exists(os.path.dirname(jar)):
            os.mkdir(os.path.dirname(jar))
        jar_command = [find_jar_cmd(), 'cf', package_path(jar)]
        for klass in glob.glob(source[:source.rindex('.')] + '*.class'):
            java_klass_path = klass[klass.index(os.path.sep) + 1:].replace(os.path.sep, "/")
            jar_command.extend(['-C', package_path('java'), java_klass_path])
        print ' '.join(jar_command)
        subprocess.check_call(jar_command)

def build_runnablequeue():
    jar = 'javabridge/jars/runnablequeue.jar'
    source = 'java/org/cellprofiler/runnablequeue/RunnableQueue.java'
    build_jar_from_single_source(jar, source)

def build_cpython():
    jar = 'javabridge/jars/cpython.jar'
    source = 'java/org/cellprofiler/javabridge/CPython.java'
    build_jar_from_single_source(jar, source)

def build_test():
    jar = 'javabridge/jars/test.jar'
    source = 'java/org/cellprofiler/javabridge/test/RealRect.java'
    build_jar_from_single_source(jar, source)

def build_java():
    build_runnablequeue()
    build_test()
    build_cpython()

class build_ext(_build_ext):
    def run(self, *args, **kwargs):
        build_java()
        build_cython()
        return _build_ext.run(self, *args, **kwargs)

class build_so(build_clib):
    '''Build a shared library or .DLL'''
    def get_library_names(self):
        '''Override to prevent build_ext from linking stand-alone dlls'''
        return []

    def build_libraries(self, libraries):
        '''Override of build_clib's build_libraries'''
        #
        # Taken from distutils build_clib which, itself is lifted
        # from build_ext.
        #
        for (lib_name, build_info) in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError, \
                      ("in 'libraries' option (library '%s'), " +
                       "'sources' must be present and must be " +
                       "a list of source filenames") % lib_name
            sources = list(sources)

            distutils.log.info("building '%s' library", lib_name)

            # First, compile the source code to object files in the library
            # directory.  (This should probably change to putting object
            # files in a temporary build directory.)
            macros = build_info.get('macros')
            include_dirs = build_info.get('include_dirs')
            libraries = build_info.get('libraries')
            library_dirs = build_info.get('library_dirs')
            output_dir = build_info.get('output_dir', self.build_clib)
            export_symbols = build_info.get('export_symbols')
            objects = self.compiler.compile(sources,
                                            output_dir=self.build_temp,
                                            macros=macros,
                                            include_dirs=include_dirs,
                                            debug=self.debug)

            self.compiler.link(
                CCompiler.SHARED_LIBRARY,
                objects, lib_name,
                output_dir=output_dir,
                debug=self.debug,
                library_dirs=library_dirs,
                libraries=libraries,
                export_symbols=export_symbols)
            if sys.platform == 'win32':
                temp_dir = os.path.dirname(objects[0])
                manifest_name = lib_name +".manifest"
                if output_dir is not None:
                    lib_path = os.path.join(output_dir, lib_name)
                else:
                    lib_path = os.path.join(temp_dir, lib_name)
                manifest_file = os.path.join(temp_dir, manifest_name)
                lib_path = os.path.abspath(lib_path)
                manifest_file = os.path.abspath(manifest_file)
                out_arg = '-outputresource:%s;2' % lib_path
                try:
                    self.compiler.spawn([
                        'mt.exe', '-nologo', '-manifest', manifest_file,
                        out_arg])
                except DistutilsExecError, msg:
                    raise LinkError(msg)

def get_version():
    """Get version from git or file system.

    If this is a git repository, try to get the version number by
    running ``git describe``, then store it in
    javabridge/_version.py. Otherwise, try to load the version number
    from that file. If both methods fail, quietly return None.

    """
    git_version = None
    if os.path.exists(os.path.join(os.path.dirname(__file__), '.git')):
        import subprocess
        try:
            git_version = subprocess.Popen(['git', 'describe'],
                                           stdout=subprocess.PIPE).communicate()[0].strip()
        except:
            pass

    version_file = os.path.join(os.path.dirname(__file__), 'javabridge',
                                '_version.py')
    if os.path.exists(version_file):
        with open(version_file) as f:
            cached_version_line = f.read().strip()
        try:
            # From http://stackoverflow.com/a/3619714/17498
            cached_version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                                       cached_version_line, re.M).group(1)
        except:
            raise RuntimeError("Unable to find version in %s" % version_file)
    else:
        cached_version = None

    if git_version and git_version != cached_version:
        with open(version_file, 'w') as f:
            print >>f, '__version__ = "%s"' % git_version

    return git_version or cached_version

if __name__ == '__main__':
    if '/' in __file__:
        os.chdir(os.path.dirname(__file__))

    setup(name="javabridge",
          version=get_version(),
          description="Python wrapper for the Java Native Interface",
          long_description='''The python-javabridge package makes it easy to start a Java virtual
machine (JVM) from Python and interact with it. Python code can
interact with the JVM using a low-level API or a more convenient
high-level API. Python-javabridge was developed for and is used by the
cell image analysis software CellProfiler (cellprofiler.org).''',
          url="http://github.com/CellProfiler/python-javabridge/",
          packages=['javabridge'],
          classifiers=['Development Status :: 5 - Production/Stable',
                       'License :: OSI Approved :: BSD License',
                       'Programming Language :: Java',
                       'Programming Language :: Python :: 2 :: Only'
                       ],
          license='BSD License',
          install_requires=['numpy'],
          tests_require="nose",
          entry_points={'nose.plugins.0.10': [
                'javabridge = javabridge.noseplugin:JavabridgePlugin'
                ]},
          test_suite="nose.collector",
          package_data={"javabridge": ['jars/*.jar', 'VERSION']},
          data_files=[("javabridge/jars", glob.glob("javabridge/jars/*%s" % SO))],
          libraries=libraries(),
          ext_modules=ext_modules(),
          cmdclass={'build_ext': build_ext,
                    'build_clib': build_so})
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# 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
#
#     https://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.

import io
import os

import setuptools

name = "google-cloud-containeranalysis"
description = "Container Analysis API API client library"
version = "2.6.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
    # NOTE: Maintainers, please do not require google-api-core>=2.x.x
    # Until this issue is closed
    # https://github.com/googleapis/google-cloud-python/issues/10566
    "google-api-core[grpc] >= 1.26.0, <3.0.0dev",
    "grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
    "proto-plus >= 1.4.0",
    "packaging >= 14.3",
    "grafeas >=1.0.0, <2.0dev",
]
extras = {"libcst": "libcst >= 0.2.5"}

package_root = os.path.abspath(os.path.dirname(__file__))

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
    readme = readme_file.read()

packages = [
    package
    for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")
if "google.cloud.devtools" in packages:
    namespaces.append("google.cloud.devtools")

setuptools.setup(
    name=name,
    version=version,
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="googleapis-packages@google.com",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-containeranalysis",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "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",
        "Programming Language :: Python :: 3.10",
        "Operating System :: OS Independent",
        "Topic :: Internet",
    ],
    platforms="Posix; MacOS X; Windows",
    packages=packages,
    namespace_packages=namespaces,
    install_requires=dependencies,
    extras_requires=extras,
    python_requires=">=3.6",
    scripts=["scripts/fixup_containeranalysis_v1_keywords.py"],
    include_package_data=True,
    zip_safe=False,
)
<commit_msg>fix: fix extra_require typo (#202)<commit_after># -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# 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
#
#     https://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.

import io
import os

import setuptools

name = "google-cloud-containeranalysis"
description = "Container Analysis API API client library"
version = "2.6.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
    # NOTE: Maintainers, please do not require google-api-core>=2.x.x
    # Until this issue is closed
    # https://github.com/googleapis/google-cloud-python/issues/10566
    "google-api-core[grpc] >= 1.26.0, <3.0.0dev",
    "grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
    "proto-plus >= 1.4.0",
    "packaging >= 14.3",
    "grafeas >=1.0.0, <2.0dev",
]
extras = {"libcst": "libcst >= 0.2.5"}

package_root = os.path.abspath(os.path.dirname(__file__))

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
    readme = readme_file.read()

packages = [
    package
    for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")
if "google.cloud.devtools" in packages:
    namespaces.append("google.cloud.devtools")

setuptools.setup(
    name=name,
    version=version,
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="googleapis-packages@google.com",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-containeranalysis",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "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",
        "Programming Language :: Python :: 3.10",
        "Operating System :: OS Independent",
        "Topic :: Internet",
    ],
    platforms="Posix; MacOS X; Windows",
    packages=packages,
    namespace_packages=namespaces,
    install_requires=dependencies,
    extras_require=extras,
    python_requires=">=3.6",
    scripts=["scripts/fixup_containeranalysis_v1_keywords.py"],
    include_package_data=True,
    zip_safe=False,
)
<|endoftext|>


<commit_before># Copyright (c) Aaron Gallagher <_@habnab.it>
# See COPYING for details.

from distutils.command.build_ext import build_ext
from distutils.core import setup
from distutils.extension import Extension
import os
import subprocess

# silence, pyflakes.
build_ext = build_ext

# select keccak implementation from the environment or trying to autodetect a
# 32- vs. 64-bit host.
keccak_implementation = os.environ.get('CYKECCAK_IMPLEMENTATION')
if keccak_implementation is None:
    import struct
    if struct.calcsize('P') == 8:
        keccak_implementation = 'opt64'
    else:
        keccak_implementation = 'opt32'

# try to pull the version from git, or fall back on a previously-saved version.
try:
    proc = subprocess.Popen(['git', 'describe', '--tags', '--long'],
                            stdout=subprocess.PIPE)
except OSError:
    if not os.path.exists('version.txt'):
        print "git-describe failed and version.txt isn't present."
        print "are you installing from a github tarball?"
        raise
    print "couldn't determine version from git; using version.txt"
    with open('version.txt', 'rb') as infile:
        raw_version = infile.read()
else:
    raw_version = proc.communicate()[0].strip()
    with open('version.txt', 'wb') as outfile:
        outfile.write(raw_version)

# parse the git-described verion into something usable.
tag_version, commits, sha = raw_version.rsplit('-', 2)
if commits == '0':
    version = tag_version
else:
    version = '%s.dev%s' % (tag_version, commits)

# set up the extension with the version and keccak sources.
keccak_extension = Extension(
    'keccak',
    ['src/KeccakSponge.c', 'src/KeccakF-1600-%s.c' % (keccak_implementation,)],
    include_dirs=['src'],
    define_macros=[('CYKECCAK_VERSION', '"%s"' % (version,)),
                   ('CYKECCAK_SHA', '"%s"' % (sha.lstrip('g'),))],
)

# add the cython source in its .pyx or .c form.
try:
    from Cython.Distutils import build_ext
except ImportError:
    if not os.path.exists('keccak.c'):
        print "cython isn't usable and pre-cython'd files aren't present."
        print "are you installing from a git clone or github tarball?"
        raise
    print "cython not usable; using previously-cython'd .c file."
    keccak_extension.sources.append('keccak.c')
else:
    keccak_extension.sources.append('keccak.pyx')

with open('README.rst', 'rb') as infile:
    long_description = infile.read()

setup(
    name='cykeccak',
    version=version,
    description='Cython bindings to the Keccak sponge and SHA-3 functions',
    long_description=long_description,
    author='Aaron Gallagher',
    author_email='_@habnab.it',
    url='https://github.com/habnabit/cykeccak',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Operating System :: POSIX',
        'Programming Language :: Cython',
        'Programming Language :: C',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Security :: Cryptography',
    ],
    license='ISC',
    platforms=['POSIX'],

    cmdclass={'build_ext': build_ext},
    ext_modules=[keccak_extension],
)
<commit_msg>Correcting `git describe` fallback behavior.<commit_after># Copyright (c) Aaron Gallagher <_@habnab.it>
# See COPYING for details.

from distutils.command.build_ext import build_ext
from distutils.core import setup
from distutils.extension import Extension
import os
import subprocess

# silence, pyflakes.
build_ext = build_ext

# select keccak implementation from the environment or trying to autodetect a
# 32- vs. 64-bit host.
keccak_implementation = os.environ.get('CYKECCAK_IMPLEMENTATION')
if keccak_implementation is None:
    import struct
    if struct.calcsize('P') == 8:
        keccak_implementation = 'opt64'
    else:
        keccak_implementation = 'opt32'

# try to pull the version from git, or fall back on a previously-saved version.
try:
    proc = subprocess.Popen(['git', 'describe', '--tags', '--long'],
                            stdout=subprocess.PIPE)
except OSError:
    git_failed = True
else:
    raw_version = proc.communicate()[0].strip()
    # git failed if the string is empty
    git_failed = not raw_version

if git_failed:
    if not os.path.exists('version.txt'):
        print "git-describe failed and version.txt isn't present."
        print "are you installing from a github tarball?"
        raise
    print "couldn't determine version from git; using version.txt"
    with open('version.txt', 'rb') as infile:
        raw_version = infile.read()
else:
    with open('version.txt', 'wb') as outfile:
        outfile.write(raw_version)

# parse the git-described verion into something usable.
tag_version, commits, sha = raw_version.rsplit('-', 2)
if commits == '0':
    version = tag_version
else:
    version = '%s.dev%s' % (tag_version, commits)

# set up the extension with the version and keccak sources.
keccak_extension = Extension(
    'keccak',
    ['src/KeccakSponge.c', 'src/KeccakF-1600-%s.c' % (keccak_implementation,)],
    include_dirs=['src'],
    define_macros=[('CYKECCAK_VERSION', '"%s"' % (version,)),
                   ('CYKECCAK_SHA', '"%s"' % (sha.lstrip('g'),))],
)

# add the cython source in its .pyx or .c form.
try:
    from Cython.Distutils import build_ext
except ImportError:
    if not os.path.exists('keccak.c'):
        print "cython isn't usable and pre-cython'd files aren't present."
        print "are you installing from a git clone or github tarball?"
        raise
    print "cython not usable; using previously-cython'd .c file."
    keccak_extension.sources.append('keccak.c')
else:
    keccak_extension.sources.append('keccak.pyx')

with open('README.rst', 'rb') as infile:
    long_description = infile.read()

setup(
    name='cykeccak',
    version=version,
    description='Cython bindings to the Keccak sponge and SHA-3 functions',
    long_description=long_description,
    author='Aaron Gallagher',
    author_email='_@habnab.it',
    url='https://github.com/habnabit/cykeccak',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Operating System :: POSIX',
        'Programming Language :: Cython',
        'Programming Language :: C',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Security :: Cryptography',
    ],
    license='ISC',
    platforms=['POSIX'],

    cmdclass={'build_ext': build_ext},
    ext_modules=[keccak_extension],
)
<|endoftext|>


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

import os
import sys
from setuptools import setup

# load __version__ without importing anything
version_file = os.path.join(
    os.path.dirname(__file__),
    'trimesh/version.py')
with open(version_file, 'r') as f:
    # use eval to get a clean string of version from file
    __version__ = eval(f.read().strip().split('=')[-1])

# load README.md as long_description
long_description = ''
if os.path.exists('README.md'):
    with open('README.md', 'r') as f:
        long_description = f.read()

# minimal requirements for installing trimesh
# note that `pip` requires setuptools itself
requirements_default = set([
    'numpy',     # all data structures
    'setuptools'  # used for packaging
])

# "easy" requirements should install without compiling
# anything on Windows, Linux, and Mac, for Python 2.7-3.4+
requirements_easy = set([
    'scipy',     # provide convex hulls, fast graph ops, etc
    'networkx',  # provide slow graph ops with a nice API
    'lxml',      # handle XML better and faster than built- in XML
    'pyglet',    # render preview windows nicely
    'shapely',   # handle 2D polygons robustly
    'rtree',     # create N-dimension trees for broad-phase queries
    'svg.path',  # handle SVG format path strings
    'sympy',     # do analytical math
    'msgpack',   # serialize into msgpack
    'pillow',    # load images
    'requests',  # do network requests
    'xxhash',    # hash ndarrays faster than built-in MD5/CRC
    'setuptools',  # do setuptools stuff
    'jsonschema',  # validate JSON schemas like GLTF
    'pycollada',   # parse collada/dae/zae files
    'chardet',     # figure out if someone used UTF-16
    'colorlog'])   # log in pretty colors

# "all" requirements only need to be installable
# through some mechanism on Linux with Python 3.5+
# and are allowed to compile code
requirements_all = requirements_easy.union([
    'mapbox-earcut',  # faster 2D triangulations of polygons
    'triangle',      # 2D triangulations of polygons
    'python-fcl',    # do fast 3D collision queries
    'psutil',        # figure out how much memory we have
    'glooey',        # make GUI applications with 3D stuff
    'meshio',        # load a number of additional mesh formats; Python 3.5+
    'scikit-image',  # marching cubes and other nice stuff
    'xatlas',        # texture unwrapping
])
# requirements for running unit tests
requirements_test = set(['pytest',       # run all unit tests
                         'pytest-cov',   # coverage plugin
                         'pyinstrument',  # profile code
                         'coveralls',    # report coverage stats
                         'ezdxf'])       # use as a validator for exports

# Python 2.7 and 3.4 support has been dropped from packages
# version lock those packages here so install succeeds
current = (sys.version_info.major, sys.version_info.minor)
# packages that no longer support old Python
# setuptools-scm is required by sympy-mpmath chain
# and will hopefully be removed in future versions
lock = [((3, 4), 'lxml', '4.3.5'),
        ((3, 4), 'shapely', '1.6.4'),
        ((3, 4), 'pyglet', '1.4.10'),
        ((3, 5), 'sympy', None)]
for max_python, name, version in lock:
    if current <= max_python:
        # remove version-free requirements
        requirements_easy.discard(name)
        # if version is None drop that package
        if version is not None:
            # add working version locked requirements
            requirements_easy.add('{}=={}'.format(name, version))

# if someone wants to output a requirements file
# `python setup.py --list-all > requirements.txt`
if '--list-all' in sys.argv:
    # will not include default requirements (numpy)
    print('\n'.join(requirements_all))
    exit()
elif '--list-easy' in sys.argv:
    # again will not include numpy+setuptools
    print('\n'.join(requirements_easy))
    exit()

# call the magical setuptools setup
setup(name='trimesh',
      version=__version__,
      description='Import, export, process, analyze and view triangular meshes.',
      long_description=long_description,
      long_description_content_type='text/markdown',
      author='Michael Dawson-Haggerty',
      author_email='mikedh@kerfed.com',
      license='MIT',
      url='https://github.com/mikedh/trimesh',
      keywords='graphics mesh geometry 3D',
      classifiers=[
          'Development Status :: 4 - Beta',
          'License :: OSI Approved :: MIT License',
          'Programming Language :: Python',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4',
          'Programming Language :: Python :: 3.5',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering'],
      packages=[
          'trimesh',
          'trimesh.ray',
          'trimesh.path',
          'trimesh.path.exchange',
          'trimesh.scene',
          'trimesh.voxel',
          'trimesh.visual',
          'trimesh.viewer',
          'trimesh.exchange',
          'trimesh.resources',
          'trimesh.interfaces'],
      package_data={'trimesh': ['resources/templates/*',
                                'resources/*.json',
                                'resources/*.zip']},
      install_requires=list(requirements_default),
      extras_require={'test': list(requirements_test),
                      'easy': list(requirements_easy),
                      'all': list(requirements_all)})
<commit_msg>Remove 'setuptools' unused dependency<commit_after>#!/usr/bin/env python

import os
import sys
from setuptools import setup

# load __version__ without importing anything
version_file = os.path.join(
    os.path.dirname(__file__),
    'trimesh/version.py')
with open(version_file, 'r') as f:
    # use eval to get a clean string of version from file
    __version__ = eval(f.read().strip().split('=')[-1])

# load README.md as long_description
long_description = ''
if os.path.exists('README.md'):
    with open('README.md', 'r') as f:
        long_description = f.read()

# minimal requirements for installing trimesh
# note that `pip` requires setuptools itself
requirements_default = set([
    'numpy',     # all data structures
])

# "easy" requirements should install without compiling
# anything on Windows, Linux, and Mac, for Python 2.7-3.4+
requirements_easy = set([
    'scipy',     # provide convex hulls, fast graph ops, etc
    'networkx',  # provide slow graph ops with a nice API
    'lxml',      # handle XML better and faster than built- in XML
    'pyglet',    # render preview windows nicely
    'shapely',   # handle 2D polygons robustly
    'rtree',     # create N-dimension trees for broad-phase queries
    'svg.path',  # handle SVG format path strings
    'sympy',     # do analytical math
    'msgpack',   # serialize into msgpack
    'pillow',    # load images
    'requests',  # do network requests
    'xxhash',    # hash ndarrays faster than built-in MD5/CRC
    'setuptools',  # do setuptools stuff
    'jsonschema',  # validate JSON schemas like GLTF
    'pycollada',   # parse collada/dae/zae files
    'chardet',     # figure out if someone used UTF-16
    'colorlog'])   # log in pretty colors

# "all" requirements only need to be installable
# through some mechanism on Linux with Python 3.5+
# and are allowed to compile code
requirements_all = requirements_easy.union([
    'mapbox-earcut',  # faster 2D triangulations of polygons
    'triangle',      # 2D triangulations of polygons
    'python-fcl',    # do fast 3D collision queries
    'psutil',        # figure out how much memory we have
    'glooey',        # make GUI applications with 3D stuff
    'meshio',        # load a number of additional mesh formats; Python 3.5+
    'scikit-image',  # marching cubes and other nice stuff
    'xatlas',        # texture unwrapping
])
# requirements for running unit tests
requirements_test = set(['pytest',       # run all unit tests
                         'pytest-cov',   # coverage plugin
                         'pyinstrument',  # profile code
                         'coveralls',    # report coverage stats
                         'ezdxf'])       # use as a validator for exports

# Python 2.7 and 3.4 support has been dropped from packages
# version lock those packages here so install succeeds
current = (sys.version_info.major, sys.version_info.minor)
# packages that no longer support old Python
# setuptools-scm is required by sympy-mpmath chain
# and will hopefully be removed in future versions
lock = [((3, 4), 'lxml', '4.3.5'),
        ((3, 4), 'shapely', '1.6.4'),
        ((3, 4), 'pyglet', '1.4.10'),
        ((3, 5), 'sympy', None)]
for max_python, name, version in lock:
    if current <= max_python:
        # remove version-free requirements
        requirements_easy.discard(name)
        # if version is None drop that package
        if version is not None:
            # add working version locked requirements
            requirements_easy.add('{}=={}'.format(name, version))

# if someone wants to output a requirements file
# `python setup.py --list-all > requirements.txt`
if '--list-all' in sys.argv:
    # will not include default requirements (numpy)
    print('\n'.join(requirements_all))
    exit()
elif '--list-easy' in sys.argv:
    # again will not include numpy+setuptools
    print('\n'.join(requirements_easy))
    exit()

# call the magical setuptools setup
setup(name='trimesh',
      version=__version__,
      description='Import, export, process, analyze and view triangular meshes.',
      long_description=long_description,
      long_description_content_type='text/markdown',
      author='Michael Dawson-Haggerty',
      author_email='mikedh@kerfed.com',
      license='MIT',
      url='https://github.com/mikedh/trimesh',
      keywords='graphics mesh geometry 3D',
      classifiers=[
          'Development Status :: 4 - Beta',
          'License :: OSI Approved :: MIT License',
          'Programming Language :: Python',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4',
          'Programming Language :: Python :: 3.5',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Natural Language :: English',
          'Topic :: Scientific/Engineering'],
      packages=[
          'trimesh',
          'trimesh.ray',
          'trimesh.path',
          'trimesh.path.exchange',
          'trimesh.scene',
          'trimesh.voxel',
          'trimesh.visual',
          'trimesh.viewer',
          'trimesh.exchange',
          'trimesh.resources',
          'trimesh.interfaces'],
      package_data={'trimesh': ['resources/templates/*',
                                'resources/*.json',
                                'resources/*.zip']},
      install_requires=list(requirements_default),
      extras_require={'test': list(requirements_test),
                      'easy': list(requirements_easy),
                      'all': list(requirements_all)})
<|endoftext|>


<commit_before>import sys
import os

from setuptools import setup

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

classifiers = [
    'Development Status :: 4 - Beta',
    'License :: OSI Approved :: BSD License',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.3',
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
]

setup_kwargs = dict(
    name='powershift-image',
    version='1.2.3',
    description='PowerShift command plugin for working in S2I images.',
    long_description=long_description,
    url='https://github.com/getwarped/powershift-image',
    author='Graham Dumpleton',
    author_email='Graham.Dumpleton@gmail.com',
    license='BSD',
    classifiers=classifiers,
    keywords='openshift kubernetes',
    packages=['powershift', 'powershift.image', 'powershift.image.scripts'],
    package_dir={'powershift': 'src/powershift'},
    extras_require={'cli': ['powershift-cli>=1.2.0']},
    entry_points = {'powershift_cli_plugins': ['image = powershift.image']},
    package_data = {'powershift.image.scripts': ['alive.sh', 'assemble.sh',
        'exec.sh', 'jobs.sh', 'migrate.sh', 'ready.sh', 'run.sh', 'setup.sh',
        'shell.sh', 'verify.sh']},
)

setup(**setup_kwargs)
<commit_msg>Increment version to 1.3.0.<commit_after>import sys
import os

from setuptools import setup

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

classifiers = [
    'Development Status :: 4 - Beta',
    'License :: OSI Approved :: BSD License',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.3',
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
]

setup_kwargs = dict(
    name='powershift-image',
    version='1.3.0',
    description='PowerShift command plugin for working in S2I images.',
    long_description=long_description,
    url='https://github.com/getwarped/powershift-image',
    author='Graham Dumpleton',
    author_email='Graham.Dumpleton@gmail.com',
    license='BSD',
    classifiers=classifiers,
    keywords='openshift kubernetes',
    packages=['powershift', 'powershift.image', 'powershift.image.scripts'],
    package_dir={'powershift': 'src/powershift'},
    extras_require={'cli': ['powershift-cli>=1.2.0']},
    entry_points = {'powershift_cli_plugins': ['image = powershift.image']},
    package_data = {'powershift.image.scripts': ['alive.sh', 'assemble.sh',
        'exec.sh', 'jobs.sh', 'migrate.sh', 'ready.sh', 'run.sh', 'setup.sh',
        'shell.sh', 'verify.sh']},
)

setup(**setup_kwargs)
<|endoftext|>


<commit_before># coding=utf-8
import sys
try:
    from setuptools import setup, find_packages
except ImportError:
    import distribute_setup
    distribute_setup.use_setuptools()
    from setuptools import setup, find_packages

setup(
    name='pyfacebook',
    version='1.1.0',
    author='Jeff Revesz and Andrew Kelleher',
    author_email='jeff.revesz@buzzfeed.com',
    packages=find_packages(),
    test_suite='test',
    install_requires=[
        'nose==1.3.0',
        'BeautifulSoup==3.2.1',
        'Fabric==1.5.1',
        'pytz==2013b',
        'python-dateutil==2.1',
        'tinymodel==0.0.19',
        'requests==1.2.3',
        'inflection==0.2.0',
        'caliendo==v2.0.5'
    ],
    dependency_links=[
        'https://github.com/buzzfeed/tinymodel/tarball/0.0.19#egg=tinymodel-0.0.19',
        'https://github.com/buzzfeed/caliendo/tarball/v2.0.5#egg=caliendo-v2.0.5'
    ]
)
<commit_msg>1.1.1<commit_after># coding=utf-8
import sys
try:
    from setuptools import setup, find_packages
except ImportError:
    import distribute_setup
    distribute_setup.use_setuptools()
    from setuptools import setup, find_packages

setup(
    name='pyfacebook',
    version='1.1.1',
    author='Jeff Revesz and Andrew Kelleher',
    author_email='jeff.revesz@buzzfeed.com',
    packages=find_packages(),
    test_suite='test',
    install_requires=[
        'nose==1.3.0',
        'BeautifulSoup==3.2.1',
        'Fabric==1.5.1',
        'pytz==2013b',
        'python-dateutil==2.1',
        'tinymodel==0.0.19',
        'requests==1.2.3',
        'inflection==0.2.0',
        'caliendo==v2.0.5'
    ],
    dependency_links=[
        'https://github.com/buzzfeed/tinymodel/tarball/0.0.19#egg=tinymodel-0.0.19',
        'https://github.com/buzzfeed/caliendo/tarball/v2.0.5#egg=caliendo-v2.0.5'
    ]
)
<|endoftext|>


<commit_before>import os
from setuptools import setup

setup(
    name = "ld35",
    version = "0.1.0",
    url = "https://github.com/seventhroot/ld35",
    author = 'Seventh Root',
    description = 'The Seventh Root entry for Ludum Dare 35',
    long_description_markdown_filename='README.md',
    packages = ['ld35'],
    package_data = {'ld35': [
        'assets/*.ogg',
        'assets/*.wav',
        'assets/*.png',
        'assets/*.tmx',
        'examples/*.png',
        'examples/*.tmx',
    ]},
    setup_requires=['setuptools-markdown'],
    install_requires = [
        'pygame==1.9.1',
        'Pyganim==0.9.2',
        'pyscroll==2.16.6',
        'PyTMX==3.20.14',
        'six==1.10.0',
    ],
    scripts = ['scripts/ld35game.py'],

    # this is to compensate for pytmx.
    # better solution may be to give it a suitable resource loader
    zip_safe = False,
)
<commit_msg>Bumped version to reflect update to script.<commit_after>import os
from setuptools import setup

setup(
    name = "ld35",
    version = "0.1.1",
    url = "https://github.com/seventhroot/ld35",
    author = 'Seventh Root',
    description = 'The Seventh Root entry for Ludum Dare 35',
    long_description_markdown_filename='README.md',
    packages = ['ld35'],
    package_data = {'ld35': [
        'assets/*.ogg',
        'assets/*.wav',
        'assets/*.png',
        'assets/*.tmx',
        'examples/*.png',
        'examples/*.tmx',
    ]},
    setup_requires=['setuptools-markdown'],
    install_requires = [
        'pygame==1.9.1',
        'Pyganim==0.9.2',
        'pyscroll==2.16.6',
        'PyTMX==3.20.14',
        'six==1.10.0',
    ],
    scripts = ['scripts/ld35game.py'],

    # this is to compensate for pytmx.
    # better solution may be to give it a suitable resource loader
    zip_safe = False,
)
<|endoftext|>


<commit_before>import os
import re
import glob
import warnings
from setuptools import (setup, find_packages)

VCS_RQMT_PAT = re.compile('^\w+\+\w+:')
"""
The pattern for detecting a VCS requirement spec, e.g.
``git+git://...``.
"""

def version(package):
    """
    :return: the package version as listed in the `__init.py__`
        `__version__` variable.
    """
    init_py = open(os.path.join(package, '__init__.py')).read()
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)

def requires():
    """
    Returns the PyPI ``qipipe`` requirements in ``requirements.txt``
    which don't match the :const:`VCS_RQMT_PAT` pattern.

    :return: the ``requirements.txt`` PyPI package specifications
    """
    # If numpy is not installed, then go for a ReadTheDocs build.
    try:
        import numpy
        rqmts_file = 'requirements.txt'
    except ImportError:
        warning.warn("numpy must be installed separately prior to qipipe."
                     " This qipipe installation is adequate only for a"
                     " ReadTheDocs build.")
        rqmts_file = 'requirements_read_the_docs.txt'
    with open(rqmts_file) as f:
        return f.read().splitlines()

def dependency_links():
    """
    Returns the non-PyPI ``qipipe`` requirements in
    ``constraints.txt`` which match the :const:`VCS_RQMT_PAT`
    pattern.

    :return: the non-PyPI package specifications
    """
    with open('constraints.txt') as f:
        rqmts = f.read().splitlines()
        # Match on git dependency links. Not a general solution, but
        # good enough so far.
        # TODO - revisit if Python 3 settles on a sane package manager.
        return [rqmt for rqmt in rqmts if VCS_RQMT_PAT.match(rqmt)]

def readme():
    with open("README.rst") as f:
        return f.read()

setup(
    name = 'qipipe',
    version = version('qipipe'),
    author = 'OHSU Knight Cancer Institute',
    author_email = 'loneyf@ohsu.edu',
    platforms = 'Any',
    license = 'MIT',
    keywords = 'Imaging QIN OHSU DCE MR XNAT Nipype',
    packages = find_packages(exclude=['test**']),
    package_data = dict(qipipe=['conf/*.cfg']),
    scripts = glob.glob('bin/*'),
    url = 'http://qipipe.readthedocs.org/en/latest/',
    description = 'Quantitative Imaging Profile pipeline',
    long_description = readme(),
    classifiers = [
        'Development Status :: 5 - Production/Stable',
        'Topic :: Scientific/Engineering :: Bio-Informatics',
        'Environment :: Console',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
    ],
    install_requires = requires(),
    dependency_links = dependency_links()
)
<commit_msg>Clarify warning.<commit_after>import os
import re
import glob
import warnings
from setuptools import (setup, find_packages)

VCS_RQMT_PAT = re.compile('^\w+\+\w+:')
"""
The pattern for detecting a VCS requirement spec, e.g.
``git+git://...``.
"""

def version(package):
    """
    :return: the package version as listed in the `__init.py__`
        `__version__` variable.
    """
    init_py = open(os.path.join(package, '__init__.py')).read()
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)

def requires():
    """
    Returns the PyPI ``qipipe`` requirements in ``requirements.txt``
    which don't match the :const:`VCS_RQMT_PAT` pattern.

    :return: the ``requirements.txt`` PyPI package specifications
    """
    # If numpy is not installed, then go for a ReadTheDocs build.
    try:
        import numpy
        rqmts_file = 'requirements.txt'
    except ImportError:
        warnings.warn("numpy must be installed separately prior to qipipe."
                      " This qipipe installation is adequate only for a"
                      " ReadTheDocs build.")
        rqmts_file = 'requirements_read_the_docs.txt'
    with open(rqmts_file) as f:
        return f.read().splitlines()

def dependency_links():
    """
    Returns the non-PyPI ``qipipe`` requirements in
    ``constraints.txt`` which match the :const:`VCS_RQMT_PAT`
    pattern.

    :return: the non-PyPI package specifications
    """
    with open('constraints.txt') as f:
        rqmts = f.read().splitlines()
        # Match on git dependency links. Not a general solution, but
        # good enough so far.
        # TODO - revisit if Python 3 settles on a sane package manager.
        return [rqmt for rqmt in rqmts if VCS_RQMT_PAT.match(rqmt)]

def readme():
    with open("README.rst") as f:
        return f.read()

setup(
    name = 'qipipe',
    version = version('qipipe'),
    author = 'OHSU Knight Cancer Institute',
    author_email = 'loneyf@ohsu.edu',
    platforms = 'Any',
    license = 'MIT',
    keywords = 'Imaging QIN OHSU DCE MR XNAT Nipype',
    packages = find_packages(exclude=['test**']),
    package_data = dict(qipipe=['conf/*.cfg']),
    scripts = glob.glob('bin/*'),
    url = 'http://qipipe.readthedocs.org/en/latest/',
    description = 'Quantitative Imaging Profile pipeline',
    long_description = readme(),
    classifiers = [
        'Development Status :: 5 - Production/Stable',
        'Topic :: Scientific/Engineering :: Bio-Informatics',
        'Environment :: Console',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
    ],
    install_requires = requires(),
    dependency_links = dependency_links()
)
<|endoftext|>


<commit_before>from setuptools import setup

def get_description():
    with open("README.rst") as file:
        return file.read()

setup(
    name="Mongo-Thingy",
    version="0.9.2",
    url="https://github.com/numberly/mongo-thingy",
    license="MIT",
    author="Guillaume Gelin",
    author_email="ramnes@1000mercis.com",
    description=("The most Pythonic and friendly-yet-powerful way to use "
                 "MongoDB"),
    long_description=get_description(),
    packages=["mongo_thingy"],
    include_package_data=True,
    zip_safe=False,
    platforms="any",
    install_requires=[
        "thingy>=0.8.2",
        "pymongo>=3.0"
    ],
    classifiers=[
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Database",
        "Topic :: Software Development :: Libraries :: Python Modules"
    ]
)
<commit_msg>Release 0.10.0<commit_after>from setuptools import setup

def get_description():
    with open("README.rst") as file:
        return file.read()

setup(
    name="Mongo-Thingy",
    version="0.10.0",
    url="https://github.com/numberly/mongo-thingy",
    license="MIT",
    author="Guillaume Gelin",
    author_email="ramnes@1000mercis.com",
    description=("The most Pythonic and friendly-yet-powerful way to use "
                 "MongoDB"),
    long_description=get_description(),
    packages=["mongo_thingy"],
    include_package_data=True,
    zip_safe=False,
    platforms="any",
    install_requires=[
        "thingy>=0.8.2",
        "pymongo>=3.0"
    ],
    classifiers=[
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Database",
        "Topic :: Software Development :: Libraries :: Python Modules"
    ]
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read()

requirements = [
    'Click>=6.0',
    'json>=2.0.9',
    # TODO: put package requirements here
]

test_requirements = [
    # TODO: put package test requirements here
    'nosetests>=1.3.7',
]

setup(
    name='JobSubmitter',
    version='0.1.0',
    description="Submission of MD runs to HPC with PBS",
    long_description=readme + '\n\n' + history,
    author="Juan Eiros",
    author_email='juaneiros@hotmail.com',
    url='https://github.com/jeiros/JobSubmitter',
    packages=[
        'JobSubmitter',
    ],
    package_dir={'JobSubmitter':
                 'JobSubmitter'},
    entry_points={
        'console_scripts': [
            'JobSubmitter=JobSubmitter.cli:main'
        ]
    },
    scripts=['bin/launch_PBS_jobs'],
    include_package_data=True,
    install_requires=requirements,
    license="MIT license",
    zip_safe=False,
    keywords='JobSubmitter',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<commit_msg>remove json dependency<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read()

requirements = [
    'Click>=6.0',
    # TODO: put package requirements here
]

test_requirements = [
    # TODO: put package test requirements here
    'nosetests>=1.3.7',
]

setup(
    name='JobSubmitter',
    version='0.1.0',
    description="Submission of MD runs to HPC with PBS",
    long_description=readme + '\n\n' + history,
    author="Juan Eiros",
    author_email='juaneiros@hotmail.com',
    url='https://github.com/jeiros/JobSubmitter',
    packages=[
        'JobSubmitter',
    ],
    package_dir={'JobSubmitter':
                 'JobSubmitter'},
    entry_points={
        'console_scripts': [
            'JobSubmitter=JobSubmitter.cli:main'
        ]
    },
    scripts=['bin/launch_PBS_jobs'],
    include_package_data=True,
    install_requires=requirements,
    license="MIT license",
    zip_safe=False,
    keywords='JobSubmitter',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

long_description = open("README.rst").read()

setup(
    name="PyChromecast",
    version="5.1.0",
    license="MIT",
    url="https://github.com/balloob/pychromecast",
    author="Paulus Schoutsen",
    author_email="paulus@paulusschoutsen.nl",
    description="Python module to talk to Google Chromecast.",
    long_description=long_description,
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    platforms="any",
    install_requires=list(val.strip() for val in open("requirements.txt")),
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<commit_msg>Bump version to 5.2.0<commit_after>from setuptools import setup, find_packages

long_description = open("README.rst").read()

setup(
    name="PyChromecast",
    version="5.2.0",
    license="MIT",
    url="https://github.com/balloob/pychromecast",
    author="Paulus Schoutsen",
    author_email="paulus@paulusschoutsen.nl",
    description="Python module to talk to Google Chromecast.",
    long_description=long_description,
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    platforms="any",
    install_requires=list(val.strip() for val in open("requirements.txt")),
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)
<|endoftext|>


<commit_before>from setuptools import find_packages, setup

setup(

    name='vesper',
    version='0.2.1',
    description=(
        'Software for acoustical monitoring of nocturnal bird migration.'),
    url='https://github.com/HaroldMills/Vesper',
    author='Harold Mills',
    author_email='harold.mills@gmail.com',
    license='MIT',

    # We exclude the unit test packages since some of them contain a
    # lot of data, for example large audio files.
    packages=find_packages(
        exclude=['tests', 'tests.*', '*.tests.*', '*.tests']),

    install_requires=[
        'bokeh',
        'django',
        'pyephem',
        'pytz',
        'pyyaml'
    ],

    entry_points={
        'console_scripts': ['vesper_admin=vesper.django.manage:main']
    },

    include_package_data=True,
    zip_safe=False

)
<commit_msg>Updated setup.py for new Vesper version.<commit_after>from setuptools import find_packages, setup

setup(

    name='vesper',
    version='0.2.4',
    description=(
        'Software for acoustical monitoring of nocturnal bird migration.'),
    url='https://github.com/HaroldMills/Vesper',
    author='Harold Mills',
    author_email='harold.mills@gmail.com',
    license='MIT',

    # We exclude the unit test packages since some of them contain a
    # lot of data, for example large audio files.
    packages=find_packages(
        exclude=['tests', 'tests.*', '*.tests.*', '*.tests']),

    install_requires=[
        'django',
        'pyephem',
        'pytz',
        'pyyaml'
    ],

    entry_points={
        'console_scripts': ['vesper_admin=vesper.django.manage:main']
    },

    include_package_data=True,
    zip_safe=False

)
<|endoftext|>


<commit_before>"""tzf.pyramid_routing installation file."""

import os
import re
from setuptools import setup, find_packages

here = os.path.dirname(__file__)
with open(
        os.path.join(here, 'tzf', 'pyramid_routing', '__init__.py')) as v_file:
    package_version = re.compile(
        r".*__version__ = '(.*?)'", re.S).match(v_file.read()).group(1)

def read(fname):
    """
    Read file.

    :param str fname: filename

    :returns: file content

    """
    return open(os.path.join(here, fname)).read()

test_requires = [
    'pytest==3.0.1',
    'pytest_pyramid==0.2.0',
    'pytest-cov==2.3.1',
]

extras_require = {
    'docs': ['sphinx'],
    'tests': test_requires
}

setup(
    name='tzf.pyramid_routing',
    version=package_version,
    description='Reads and sets routing configuration from a package',
    long_description=(
        read('README.rst') + '\n\n' + read('CHANGES.rst')
    ),
    keywords='pyramid routing',
    author='Grzegorz Sliwinski',
    author_email='username: fizyk, domain: fizyk.net.pl',
    url='https://github.com/fizyk/pyramid_routing',
    license="MIT License",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Framework :: Pyramid',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: WSGI',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages=find_packages(),
    namespace_packages=['tzf'],
    install_requires=[
        'pyramid',
    ],
    tests_require=test_requires,
    test_suite='tests',
    include_package_data=True,
    zip_safe=False,
    extras_require=extras_require,
)
<commit_msg>[requires.io] dependency update<commit_after>"""tzf.pyramid_routing installation file."""

import os
import re
from setuptools import setup, find_packages

here = os.path.dirname(__file__)
with open(
        os.path.join(here, 'tzf', 'pyramid_routing', '__init__.py')) as v_file:
    package_version = re.compile(
        r".*__version__ = '(.*?)'", re.S).match(v_file.read()).group(1)

def read(fname):
    """
    Read file.

    :param str fname: filename

    :returns: file content

    """
    return open(os.path.join(here, fname)).read()

test_requires = [
    'pytest==3.0.2',
    'pytest_pyramid==0.2.0',
    'pytest-cov==2.3.1',
]

extras_require = {
    'docs': ['sphinx'],
    'tests': test_requires
}

setup(
    name='tzf.pyramid_routing',
    version=package_version,
    description='Reads and sets routing configuration from a package',
    long_description=(
        read('README.rst') + '\n\n' + read('CHANGES.rst')
    ),
    keywords='pyramid routing',
    author='Grzegorz Sliwinski',
    author_email='username: fizyk, domain: fizyk.net.pl',
    url='https://github.com/fizyk/pyramid_routing',
    license="MIT License",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Framework :: Pyramid',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: WSGI',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages=find_packages(),
    namespace_packages=['tzf'],
    install_requires=[
        'pyramid',
    ],
    tests_require=test_requires,
    test_suite='tests',
    include_package_data=True,
    zip_safe=False,
    extras_require=extras_require,
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from codecs import open

from setuptools import find_packages, setup

with open('README.rst', 'r', 'utf-8') as f:
    readme = f.read()

setup(
    name='blanc-contentfiles',
    version='0.2.4',
    description='Blanc Content Files',
    long_description=readme,
    url='https://github.com/developersociety/blanc-contentfiles',
    maintainer='The Developer Society',
    maintainer_email='studio@dev.ngo',
    platforms=['any'],
    packages=find_packages(),
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        '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',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
    ],
    license='BSD',
)
<commit_msg>Update supported Python and Django versions<commit_after>#!/usr/bin/env python
from codecs import open

from setuptools import find_packages, setup

with open('README.rst', 'r', 'utf-8') as f:
    readme = f.read()

setup(
    name='blanc-contentfiles',
    version='0.2.4',
    description='Blanc Content Files',
    long_description=readme,
    url='https://github.com/developersociety/blanc-contentfiles',
    maintainer='The Developer Society',
    maintainer_email='studio@dev.ngo',
    platforms=['any'],
    packages=find_packages(),
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Framework :: Django :: 1.8',
        'Framework :: Django :: 1.11',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    license='BSD',
)
<|endoftext|>


<commit_before># Copyright 2016 Google Inc.
#
# 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.

import os

from setuptools import find_packages
from setuptools import setup

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj:
    README = file_obj.read()

# NOTE: This is duplicated throughout and we should try to
#       consolidate.
SETUP_BASE = {
    'author': 'Google Cloud Platform',
    'author_email': 'jjg+google-cloud-python@google.com',
    'scripts': [],
    'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python',
    'license': 'Apache 2.0',
    'platforms': 'Posix; MacOS X; Windows',
    'include_package_data': True,
    'zip_safe': False,
    'classifiers': [
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Topic :: Internet',
    ],
}

REQUIREMENTS = [
    'google-cloud-core >= 0.25.0, < 0.26dev',
]

setup(
    name='google-cloud-dns',
    version='0.25.0',
    description='Python Client for Google Cloud DNS',
    long_description=README,
    namespace_packages=[
        'google',
        'google.cloud',
    ],
    packages=find_packages(exclude=('tests*',)),
    install_requires=REQUIREMENTS,
    **SETUP_BASE
)
<commit_msg>Updating author_email in all setup.py. (#3598)<commit_after># Copyright 2016 Google Inc.
#
# 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.

import os

from setuptools import find_packages
from setuptools import setup

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj:
    README = file_obj.read()

# NOTE: This is duplicated throughout and we should try to
#       consolidate.
SETUP_BASE = {
    'author': 'Google Cloud Platform',
    'author_email': 'googleapis-publisher@google.com',
    'scripts': [],
    'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python',
    'license': 'Apache 2.0',
    'platforms': 'Posix; MacOS X; Windows',
    'include_package_data': True,
    'zip_safe': False,
    'classifiers': [
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Topic :: Internet',
    ],
}

REQUIREMENTS = [
    'google-cloud-core >= 0.25.0, < 0.26dev',
]

setup(
    name='google-cloud-dns',
    version='0.25.0',
    description='Python Client for Google Cloud DNS',
    long_description=README,
    namespace_packages=[
        'google',
        'google.cloud',
    ],
    packages=find_packages(exclude=('tests*',)),
    install_requires=REQUIREMENTS,
    **SETUP_BASE
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from distutils.core import setup

def read(name):
    from os import path
    return open(path.join(path.dirname(__file__), name)).read()

setup(
    name='django-facebook-auth',
    version='3.3.3',
    description="Authorisation app for Facebook API.",
    long_description=read("README.rst"),
    maintainer="Tomasz Wysocki",
    maintainer_email="tomasz@wysocki.info",

    install_requires=(
        'celery',
        'django<1.6',
        'facepy',
    ),

    packages=[
        'facebook_auth',
        'facebook_auth.migrations',
    ],
)
<commit_msg>Add management commands to package.<commit_after>#!/usr/bin/env python
from distutils.core import setup

def read(name):
    from os import path
    return open(path.join(path.dirname(__file__), name)).read()

setup(
    name='django-facebook-auth',
    version='3.3.4',
    description="Authorisation app for Facebook API.",
    long_description=read("README.rst"),
    maintainer="Tomasz Wysocki",
    maintainer_email="tomasz@wysocki.info",

    install_requires=(
        'celery',
        'django<1.6',
        'facepy',
    ),

    packages=[
        'facebook_auth',
        'facebook_auth.migrations',
        'facebook_auth.management',
        'facebook_auth.management.commands',
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding:utf-8 -*-

from setuptools import setup

long_description = open("README.rst", "r").read()

classifiers = [
            "Programming Language :: Python",
            "Programming Language :: Python :: 2",
            "Programming Language :: Python :: 3",
            "License :: OSI Approved :: MIT License",
            "Operating System :: OS Independent",
            "Development Status :: 4 - Beta",
            "Intended Audience :: Developers",
            "Topic :: Security",
            "Topic :: Software Development :: Libraries :: Python Modules"]

metadata = {'name': "simple-rbac",
            'version': "0.1.1",
            'description': "A simple role based access control utility",
            'long_description': long_description,
            'keywords': "rbac permission acl access-control",
            'author': "Jiangge Zhang",
            'author_email': "tonyseek@gmail.com",
            'url': "http://github.tonyseek.com/simple-rbac/",
            'license': "MIT License",
            'packages': ["rbac"],
            'zip_safe': True,
            'platforms': "any",
            'test_suite': "tests.run_tests",
            'classifiers': classifiers}

if __name__ == "__main__":
    setup(**metadata)
<commit_msg>Clean up setup.py and disable zip_safe flag<commit_after>#!/usr/bin/env python
# -*- coding:utf-8 -*-

from setuptools import setup

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

setup(
    name='simple-rbac',
    version='0.1.1',
    description='A simple role based access control utility',
    long_description=long_description,
    keywords='rbac permission acl access-control',
    author='Jiangge Zhang',
    author_email='tonyseek@gmail.com',
    url='http://github.tonyseek.com/simple-rbac/',
    license='MIT License',
    packages=['rbac'],
    zip_safe=False,
    platforms='any',
    test_suite='tests.run_tests',
    classifiers=[
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Topic :: Security',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
)
<|endoftext|>


<commit_before>import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

import tinyblog

class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)

setup(
    name='tinyblog',
    version=tinyblog.__version__,
    description='A Django app for a very simple blog.',
    long_description=open('README.rst').read(),
    author='Dominic Rodger',
    url='https://github.com/dominicrodger/tinyblog/',
    license='BSD',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'Django>=1.4',
        'requests==1.2.0',
        'django-tinymce==1.5.1b4',
        'django-uuidfield==0.4.0',
        'bleach==1.2.2',
    ],
    tests_require=[
        "pytest==2.6.4",
        "pytest-cov==1.7.0",
        "pytest-django==2.6.2",
        'factory_boy==1.3.0',
        'feedparser==5.1.3',
        'mock==1.0.1',
    ],
    cmdclass = {'test': PyTest},
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Topic :: Software Development',
    ],
)
<commit_msg>Temporarily downgrading to pytest-django 2.6.1<commit_after>import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

import tinyblog

class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)

setup(
    name='tinyblog',
    version=tinyblog.__version__,
    description='A Django app for a very simple blog.',
    long_description=open('README.rst').read(),
    author='Dominic Rodger',
    url='https://github.com/dominicrodger/tinyblog/',
    license='BSD',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'Django>=1.4',
        'requests==1.2.0',
        'django-tinymce==1.5.1b4',
        'django-uuidfield==0.4.0',
        'bleach==1.2.2',
    ],
    tests_require=[
        "pytest==2.6.4",
        "pytest-cov==1.7.0",
        "pytest-django==2.6.1",
        'factory_boy==1.3.0',
        'feedparser==5.1.3',
        'mock==1.0.1',
    ],
    cmdclass = {'test': PyTest},
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Topic :: Software Development',
    ],
)
<|endoftext|>


<commit_before>import os.path

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

ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
README_FILE = os.path.join(ROOT_DIR, "README.rst")

with open(README_FILE) as f:
    long_description = f.read()

setup(
    name="xutils",
    version="1.1.0",
    description="A Fragmentary Python Library, no any third-part dependencies.",
    long_description=long_description,
    author="xgfone",
    author_email="xgfone@126.com",
    maintainer="xgfone",
    maintainer_email="xgfone@126.com",
    url="https://github.com/xgfone/xutils",
    packages=["xutils"],

    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
    ],
)
<commit_msg>Set the version to 1.2.0<commit_after>import os.path

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

ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
README_FILE = os.path.join(ROOT_DIR, "README.rst")

with open(README_FILE) as f:
    long_description = f.read()

setup(
    name="xutils",
    version="1.2.0",
    description="A Fragmentary Python Library, no any third-part dependencies.",
    long_description=long_description,
    author="xgfone",
    author_email="xgfone@126.com",
    maintainer="xgfone",
    maintainer_email="xgfone@126.com",
    url="https://github.com/xgfone/xutils",
    packages=["xutils"],

    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# coding=utf8

import os

from setuptools import setup, find_packages

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(name='legitfs',
      version='0.4.0.dev0',
      description=('A read-only FUSE-based filesystem allowing you to browse '
                   'git repositories'),
      long_description=read('README.rst'),
      keywords='git,fuse,filesystem,fs,read-only,readonly,legit,legitfs',
      author='Marc Brinkmann',
      author_email='git@marcbrinkmann.de',
      url='http://github.com/mbr/legitfs',
      license='MIT',
      packages=find_packages(exclude=['tests']),
      install_requires=['dulwich', 'fusepy', 'click', 'logbook'],
      entry_points={
          'console_scripts': [
              'legitfs = legitfs.cli:main',
          ]
      })
<commit_msg>Start developing version 0.4.1.dev1 (after release of 0.4.0)<commit_after>#!/usr/bin/env python
# coding=utf8

import os

from setuptools import setup, find_packages

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(name='legitfs',
      version='0.4.1.dev1',
      description=('A read-only FUSE-based filesystem allowing you to browse '
                   'git repositories'),
      long_description=read('README.rst'),
      keywords='git,fuse,filesystem,fs,read-only,readonly,legit,legitfs',
      author='Marc Brinkmann',
      author_email='git@marcbrinkmann.de',
      url='http://github.com/mbr/legitfs',
      license='MIT',
      packages=find_packages(exclude=['tests']),
      install_requires=['dulwich', 'fusepy', 'click', 'logbook'],
      entry_points={
          'console_scripts': [
              'legitfs = legitfs.cli:main',
          ]
      })
<|endoftext|>


<commit_before># python3 setup.py sdist
# python3 setup.py bdist_wheel
# python3 setup.py bdist_egg

from setuptools import setup
import os

def findfiles(pathlist):
	for path in pathlist:
		for dirpath, dirnames, files in os.walk(path):
			for f in files:
				if not f.endswith(".pyc") and not f.endswith(".class"):
					yield os.path.join(dirpath, f)

setup(
	name="snafu",
	version="0.0.0",
	url="https://github.com/serviceprototypinglab/snafu",
	author="Josef Spillner",
	author_email="josef.spillner@zhaw.ch",
	license="Apache 2.0",
	classifiers=[
		"Development Status :: 2 - Pre-Alpha",
		"Environment :: Console",
		"Environment :: No Input/Output (Daemon)",
		"Intended Audience :: Science/Research",
		"License :: OSI Approved :: Apache Software License",
		"Programming Language :: Python :: 3",
		"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware"
	],
	keywords="cloud faas serverless functions",
	packages=["snafulib"],
	scripts=["snafu", "snafu-import", "snafu-accounts", "snafu-control"],
	data_files=[(os.path.dirname(f), [f]) for f in findfiles(["executors", "loggers", "authenticators", "connectors"])],
	install_requires=["flask"]
	#entry_points={
	#	"console_scripts": [
	#		"snafu=snafu:main",
	#		"snafu-import=snafuimport:main",
	#		"snafu-control=snafucontrol:main",
	#		"snafu-accounts=snafuaccounts:main"
	#	]
	#}
)
<commit_msg>- packaging: inclusion of at least short description<commit_after># python3 setup.py sdist
# python3 setup.py bdist_wheel
# python3 setup.py bdist_egg
# twine upload dist/*.*

from setuptools import setup
import os

def findfiles(pathlist):
	for path in pathlist:
		for dirpath, dirnames, files in os.walk(path):
			for f in files:
				if not f.endswith(".pyc") and not f.endswith(".class"):
					yield os.path.join(dirpath, f)

setup(
	name="snafu",
	description="Swiss Army Knife of Serverless Computing",
	version="0.0.0.post2",
	url="https://github.com/serviceprototypinglab/snafu",
	author="Josef Spillner",
	author_email="josef.spillner@zhaw.ch",
	license="Apache 2.0",
	classifiers=[
		"Development Status :: 2 - Pre-Alpha",
		"Environment :: Console",
		"Environment :: No Input/Output (Daemon)",
		"Intended Audience :: Science/Research",
		"License :: OSI Approved :: Apache Software License",
		"Programming Language :: Python :: 3",
		"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware"
	],
	keywords="cloud faas serverless functions",
	packages=["snafulib"],
	scripts=["snafu", "snafu-import", "snafu-accounts", "snafu-control"],
	data_files=[(os.path.dirname(f), [f]) for f in findfiles(["executors", "loggers", "authenticators", "connectors"])],
	install_requires=["flask"]
	#entry_points={
	#	"console_scripts": [
	#		"snafu=snafu:main",
	#		"snafu-import=snafuimport:main",
	#		"snafu-control=snafucontrol:main",
	#		"snafu-accounts=snafuaccounts:main"
	#	]
	#}
)
<|endoftext|>


<commit_before>from reviewboard.extensions.packaging import setup

GITHUB_URL = 'https://github.com/joshguffin/rboard_bugzilla'
VERSION = "0.1"
PACKAGE = 'rboard_bugzilla'
EXTENSION = '{0} = {0}.extension:BugzillaExtension'.format(PACKAGE),

setup(
    name=PACKAGE,
    version=VERSION,
    description='Post to BZs',
    url=GITHUB_URL,
    author='Josh Guffin',
    author_email='josh.guffin@gmail.com',
    packages=[PACKAGE],
    install_requires=['bugzillatools>=0.4', 'ReviewBoard>=2.0.3'],
    entry_points={'reviewboard.extensions': [EXTENSION]}
)
<commit_msg>Remove reviewboard requirement; can cause unexpected updates<commit_after>from reviewboard.extensions.packaging import setup

GITHUB_URL = 'https://github.com/joshguffin/rboard_bugzilla'
VERSION = "0.1"
PACKAGE = 'rboard_bugzilla'
EXTENSION = '{0} = {0}.extension:BugzillaExtension'.format(PACKAGE),

setup(
    name=PACKAGE,
    version=VERSION,
    description='Post to BZs',
    url=GITHUB_URL,
    author='Josh Guffin',
    author_email='josh.guffin@gmail.com',
    packages=[PACKAGE],
    install_requires=['bugzillatools>=0.4'],
    entry_points={'reviewboard.extensions': [EXTENSION]}
)
<|endoftext|>