<commit_before>#! /usr/bin/env python
#
# Copyright (C) 2007-2009 Cournapeau David <cournape@gmail.com>
#               2010 Fabian Pedregosa <fabian.pedregosa@inria.fr>
# License: 3-clause BSD

import sys
import os
import platform
import shutil

# We need to import setuptools before because it monkey-patches distutils
import setuptools  # noqa
from distutils.command.clean import clean as Clean
from distutils.command.sdist import sdist

from pkg_resources import parse_version
import traceback
import importlib
try:
    import builtins
except ImportError:
    # Python 2 compat: just to be able to declare that Python >=3.6 is needed.
    import __builtin__ as builtins

# This is a bit (!) hackish: we are setting a global variable so that the
# main sklearn __init__ can detect if it is being loaded by the setup
# routine, to avoid attempting to load components that aren't built yet:
# the numpy distutils extensions that are used by scikit-learn to
# recursively build the compiled extensions in sub-packages is based on the
# Python import machinery.
builtins.__SKLEARN_SETUP__ = True

DISTNAME = 'scikit-learn'
DESCRIPTION = 'A set of python modules for machine learning and data mining'
with open('README.rst') as f:
    LONG_DESCRIPTION = f.read()
MAINTAINER = 'Andreas Mueller'
MAINTAINER_EMAIL = 'amueller@ais.uni-bonn.de'
URL = 'http://scikit-learn.org'
DOWNLOAD_URL = 'https://pypi.org/project/scikit-learn/#files'
LICENSE = 'new BSD'
PROJECT_URLS = {
    'Bug Tracker': 'https://github.com/scikit-learn/scikit-learn/issues',
    'Documentation': 'https://scikit-learn.org/stable/documentation.html',
    'Source Code': 'https://github.com/scikit-learn/scikit-learn'
}

# We can actually import a restricted version of sklearn that
# does not need the compiled code
import sklearn
import sklearn._min_dependencies as min_deps  # noqa

VERSION = sklearn.__version__

# For some commands, use setuptools
SETUPTOOLS_COMMANDS = {
    'develop', 'release', 'bdist_egg', 'bdist_rpm',
    'bdist_wininst', 'install_egg_info', 'build_sphinx',
    'egg_info', 'easy_install', 'upload', 'bdist_wheel',
    '--single-version-externally-managed',
}
if SETUPTOOLS_COMMANDS.intersection(sys.argv):
    extra_setuptools_args = dict(
        zip_safe=False,  # the package can run out of an .egg file
        include_package_data=True,
        extras_require={
            key: min_deps.tag_to_packages[key] for
            key in ['examples', 'docs', 'tests', 'benchmark']
        },
    )
else:
    extra_setuptools_args = dict()

# Custom clean command to remove build artifacts

class CleanCommand(Clean):
    description = "Remove build artifacts from the source tree"

    def run(self):
        Clean.run(self)
        # Remove c files if we are not within a sdist package
        cwd = os.path.abspath(os.path.dirname(__file__))
        remove_c_files = not os.path.exists(os.path.join(cwd, 'PKG-INFO'))
        if remove_c_files:
            print('Will remove generated .c files')
        if os.path.exists('build'):
            shutil.rmtree('build')
        for dirpath, dirnames, filenames in os.walk('sklearn'):
            for filename in filenames:
                if any(filename.endswith(suffix) for suffix in
                       (".so", ".pyd", ".dll", ".pyc")):
                    os.unlink(os.path.join(dirpath, filename))
                    continue
                extension = os.path.splitext(filename)[1]
                if remove_c_files and extension in ['.c', '.cpp']:
                    pyx_file = str.replace(filename, extension, '.pyx')
                    if os.path.exists(os.path.join(dirpath, pyx_file)):
                        os.unlink(os.path.join(dirpath, filename))
            for dirname in dirnames:
                if dirname == '__pycache__':
                    shutil.rmtree(os.path.join(dirpath, dirname))

cmdclass = {'clean': CleanCommand, 'sdist': sdist}

# Custom build_ext command to set OpenMP compile flags depending on os and
# compiler. Also makes it possible to set the parallelism level via
# and environment variable (useful for the wheel building CI).
# build_ext has to be imported after setuptools
try:
    from numpy.distutils.command.build_ext import build_ext  # noqa

    class build_ext_subclass(build_ext):

        def finalize_options(self):
            super().finalize_options()
            if self.parallel is None:
                # Do not override self.parallel if already defined by
                # command-line flag (--parallel or -j)

                parallel = os.environ.get("SKLEARN_BUILD_PARALLEL")
                if parallel:
                    self.parallel = int(parallel)
            if self.parallel:
                print("setting parallel=%d " % self.parallel)

        def build_extensions(self):
            from sklearn._build_utils.openmp_helpers import get_openmp_flag

            if sklearn._OPENMP_SUPPORTED:
                openmp_flag = get_openmp_flag(self.compiler)

                for e in self.extensions:
                    e.extra_compile_args += openmp_flag
                    e.extra_link_args += openmp_flag

            build_ext.build_extensions(self)

    cmdclass['build_ext'] = build_ext_subclass

except ImportError:
    # Numpy should not be a dependency just to be able to introspect
    # that python 3.6 is required.
    pass

# Optional wheelhouse-uploader features
# To automate release of binary packages for scikit-learn we need a tool
# to download the packages generated by travis and appveyor workers (with
# version number matching the current release) and upload them all at once
# to PyPI at release time.
# The URL of the artifact repositories are configured in the setup.cfg file.

WHEELHOUSE_UPLOADER_COMMANDS = {'fetch_artifacts', 'upload_all'}
if WHEELHOUSE_UPLOADER_COMMANDS.intersection(sys.argv):
    import wheelhouse_uploader.cmd

    cmdclass.update(vars(wheelhouse_uploader.cmd))

def configuration(parent_package='', top_path=None):
    if os.path.exists('MANIFEST'):
        os.remove('MANIFEST')

    from numpy.distutils.misc_util import Configuration
    from sklearn._build_utils import _check_cython_version

    config = Configuration(None, parent_package, top_path)

    # Avoid non-useful msg:
    # "Ignoring attempt to set 'name' (from ... "
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    # Cython is required by config.add_subpackage for templated extensions
    # that need the tempita sub-submodule. So check that we have the correct
    # version of Cython so as to be able to raise a more informative error
    # message from the start if it's not the case.
    _check_cython_version()

    config.add_subpackage('sklearn')

    return config

def check_package_status(package, min_version):
    """
    Returns a dictionary containing a boolean specifying whether given package
    is up-to-date, along with the version string (empty string if
    not installed).
    """
    package_status = {}
    try:
        module = importlib.import_module(package)
        package_version = module.__version__
        package_status['up_to_date'] = parse_version(
            package_version) >= parse_version(min_version)
        package_status['version'] = package_version
    except ImportError:
        traceback.print_exc()
        package_status['up_to_date'] = False
        package_status['version'] = ""

    req_str = "scikit-learn requires {} >= {}.\n".format(
        package, min_version)

    instructions = ("Installation instructions are available on the "
                    "scikit-learn website: "
                    "http://scikit-learn.org/stable/install.html\n")

    if package_status['up_to_date'] is False:
        if package_status['version']:
            raise ImportError("Your installation of {} "
                              "{} is out-of-date.\n{}{}"
                              .format(package, package_status['version'],
                                      req_str, instructions))
        else:
            raise ImportError("{} is not "
                              "installed.\n{}{}"
                              .format(package, req_str, instructions))

def setup_package():
    metadata = dict(name=DISTNAME,
                    maintainer=MAINTAINER,
                    maintainer_email=MAINTAINER_EMAIL,
                    description=DESCRIPTION,
                    license=LICENSE,
                    url=URL,
                    download_url=DOWNLOAD_URL,
                    project_urls=PROJECT_URLS,
                    version=VERSION,
                    long_description=LONG_DESCRIPTION,
                    classifiers=['Intended Audience :: Science/Research',
                                 'Intended Audience :: Developers',
                                 'License :: OSI Approved',
                                 'Programming Language :: C',
                                 'Programming Language :: Python',
                                 'Topic :: Software Development',
                                 'Topic :: Scientific/Engineering',
                                 'Development Status :: 5 - Production/Stable',
                                 'Operating System :: Microsoft :: Windows',
                                 'Operating System :: POSIX',
                                 'Operating System :: Unix',
                                 'Operating System :: MacOS',
                                 '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 :: '
                                  'Implementation :: CPython'),
                                 ('Programming Language :: Python :: '
                                  'Implementation :: PyPy')
                                 ],
                    cmdclass=cmdclass,
                    python_requires=">=3.6",
                    install_requires=min_deps.tag_to_packages['install'],
                    package_data={'': ['*.pxd']},
                    **extra_setuptools_args)

    if len(sys.argv) == 1 or (
            len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or
                                    sys.argv[1] in ('--help-commands',
                                                    'egg_info',
                                                    'dist_info',
                                                    '--version',
                                                    'clean'))):
        # These actions are required to succeed without Numpy for example when
        # pip is used to install Scikit-learn when Numpy is not yet present in
        # the system.

        # These commands use setup from setuptools
        from setuptools import setup

        metadata['version'] = VERSION
    else:
        if sys.version_info < (3, 6):
            raise RuntimeError(
                "Scikit-learn requires Python 3.6 or later. The current"
                " Python version is %s installed in %s."
                % (platform.python_version(), sys.executable))

        check_package_status('numpy', min_deps.NUMPY_MIN_VERSION)

        check_package_status('scipy', min_deps.SCIPY_MIN_VERSION)

        # These commands require the setup from numpy.distutils because they
        # may use numpy.distutils compiler classes.
        from numpy.distutils.core import setup

        metadata['configuration'] = configuration

    setup(**metadata)

if __name__ == "__main__":
    setup_package()
<commit_msg>BLD Add clean command to skip list (#18999)<commit_after>#! /usr/bin/env python
#
# Copyright (C) 2007-2009 Cournapeau David <cournape@gmail.com>
#               2010 Fabian Pedregosa <fabian.pedregosa@inria.fr>
# License: 3-clause BSD

import sys
import os
import platform
import shutil

# We need to import setuptools before because it monkey-patches distutils
import setuptools  # noqa
from distutils.command.clean import clean as Clean
from distutils.command.sdist import sdist

from pkg_resources import parse_version
import traceback
import importlib
try:
    import builtins
except ImportError:
    # Python 2 compat: just to be able to declare that Python >=3.6 is needed.
    import __builtin__ as builtins

# This is a bit (!) hackish: we are setting a global variable so that the
# main sklearn __init__ can detect if it is being loaded by the setup
# routine, to avoid attempting to load components that aren't built yet:
# the numpy distutils extensions that are used by scikit-learn to
# recursively build the compiled extensions in sub-packages is based on the
# Python import machinery.
builtins.__SKLEARN_SETUP__ = True

DISTNAME = 'scikit-learn'
DESCRIPTION = 'A set of python modules for machine learning and data mining'
with open('README.rst') as f:
    LONG_DESCRIPTION = f.read()
MAINTAINER = 'Andreas Mueller'
MAINTAINER_EMAIL = 'amueller@ais.uni-bonn.de'
URL = 'http://scikit-learn.org'
DOWNLOAD_URL = 'https://pypi.org/project/scikit-learn/#files'
LICENSE = 'new BSD'
PROJECT_URLS = {
    'Bug Tracker': 'https://github.com/scikit-learn/scikit-learn/issues',
    'Documentation': 'https://scikit-learn.org/stable/documentation.html',
    'Source Code': 'https://github.com/scikit-learn/scikit-learn'
}

# We can actually import a restricted version of sklearn that
# does not need the compiled code
import sklearn
import sklearn._min_dependencies as min_deps  # noqa

VERSION = sklearn.__version__

# For some commands, use setuptools
SETUPTOOLS_COMMANDS = {
    'develop', 'release', 'bdist_egg', 'bdist_rpm',
    'bdist_wininst', 'install_egg_info', 'build_sphinx',
    'egg_info', 'easy_install', 'upload', 'bdist_wheel',
    '--single-version-externally-managed',
}
if SETUPTOOLS_COMMANDS.intersection(sys.argv):
    extra_setuptools_args = dict(
        zip_safe=False,  # the package can run out of an .egg file
        include_package_data=True,
        extras_require={
            key: min_deps.tag_to_packages[key] for
            key in ['examples', 'docs', 'tests', 'benchmark']
        },
    )
else:
    extra_setuptools_args = dict()

# Custom clean command to remove build artifacts

class CleanCommand(Clean):
    description = "Remove build artifacts from the source tree"

    def run(self):
        Clean.run(self)
        # Remove c files if we are not within a sdist package
        cwd = os.path.abspath(os.path.dirname(__file__))
        remove_c_files = not os.path.exists(os.path.join(cwd, 'PKG-INFO'))
        if remove_c_files:
            print('Will remove generated .c files')
        if os.path.exists('build'):
            shutil.rmtree('build')
        for dirpath, dirnames, filenames in os.walk('sklearn'):
            for filename in filenames:
                if any(filename.endswith(suffix) for suffix in
                       (".so", ".pyd", ".dll", ".pyc")):
                    os.unlink(os.path.join(dirpath, filename))
                    continue
                extension = os.path.splitext(filename)[1]
                if remove_c_files and extension in ['.c', '.cpp']:
                    pyx_file = str.replace(filename, extension, '.pyx')
                    if os.path.exists(os.path.join(dirpath, pyx_file)):
                        os.unlink(os.path.join(dirpath, filename))
            for dirname in dirnames:
                if dirname == '__pycache__':
                    shutil.rmtree(os.path.join(dirpath, dirname))

cmdclass = {'clean': CleanCommand, 'sdist': sdist}

# Custom build_ext command to set OpenMP compile flags depending on os and
# compiler. Also makes it possible to set the parallelism level via
# and environment variable (useful for the wheel building CI).
# build_ext has to be imported after setuptools
try:
    from numpy.distutils.command.build_ext import build_ext  # noqa

    class build_ext_subclass(build_ext):

        def finalize_options(self):
            super().finalize_options()
            if self.parallel is None:
                # Do not override self.parallel if already defined by
                # command-line flag (--parallel or -j)

                parallel = os.environ.get("SKLEARN_BUILD_PARALLEL")
                if parallel:
                    self.parallel = int(parallel)
            if self.parallel:
                print("setting parallel=%d " % self.parallel)

        def build_extensions(self):
            from sklearn._build_utils.openmp_helpers import get_openmp_flag

            if sklearn._OPENMP_SUPPORTED:
                openmp_flag = get_openmp_flag(self.compiler)

                for e in self.extensions:
                    e.extra_compile_args += openmp_flag
                    e.extra_link_args += openmp_flag

            build_ext.build_extensions(self)

    cmdclass['build_ext'] = build_ext_subclass

except ImportError:
    # Numpy should not be a dependency just to be able to introspect
    # that python 3.6 is required.
    pass

# Optional wheelhouse-uploader features
# To automate release of binary packages for scikit-learn we need a tool
# to download the packages generated by travis and appveyor workers (with
# version number matching the current release) and upload them all at once
# to PyPI at release time.
# The URL of the artifact repositories are configured in the setup.cfg file.

WHEELHOUSE_UPLOADER_COMMANDS = {'fetch_artifacts', 'upload_all'}
if WHEELHOUSE_UPLOADER_COMMANDS.intersection(sys.argv):
    import wheelhouse_uploader.cmd

    cmdclass.update(vars(wheelhouse_uploader.cmd))

def configuration(parent_package='', top_path=None):
    if os.path.exists('MANIFEST'):
        os.remove('MANIFEST')

    from numpy.distutils.misc_util import Configuration
    from sklearn._build_utils import _check_cython_version

    config = Configuration(None, parent_package, top_path)

    # Avoid non-useful msg:
    # "Ignoring attempt to set 'name' (from ... "
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    # Cython is required by config.add_subpackage for templated extensions
    # that need the tempita sub-submodule. So check that we have the correct
    # version of Cython so as to be able to raise a more informative error
    # message from the start if it's not the case.
    _check_cython_version()

    config.add_subpackage('sklearn')

    return config

def check_package_status(package, min_version):
    """
    Returns a dictionary containing a boolean specifying whether given package
    is up-to-date, along with the version string (empty string if
    not installed).
    """
    package_status = {}
    try:
        module = importlib.import_module(package)
        package_version = module.__version__
        package_status['up_to_date'] = parse_version(
            package_version) >= parse_version(min_version)
        package_status['version'] = package_version
    except ImportError:
        traceback.print_exc()
        package_status['up_to_date'] = False
        package_status['version'] = ""

    req_str = "scikit-learn requires {} >= {}.\n".format(
        package, min_version)

    instructions = ("Installation instructions are available on the "
                    "scikit-learn website: "
                    "http://scikit-learn.org/stable/install.html\n")

    if package_status['up_to_date'] is False:
        if package_status['version']:
            raise ImportError("Your installation of {} "
                              "{} is out-of-date.\n{}{}"
                              .format(package, package_status['version'],
                                      req_str, instructions))
        else:
            raise ImportError("{} is not "
                              "installed.\n{}{}"
                              .format(package, req_str, instructions))

def setup_package():
    metadata = dict(name=DISTNAME,
                    maintainer=MAINTAINER,
                    maintainer_email=MAINTAINER_EMAIL,
                    description=DESCRIPTION,
                    license=LICENSE,
                    url=URL,
                    download_url=DOWNLOAD_URL,
                    project_urls=PROJECT_URLS,
                    version=VERSION,
                    long_description=LONG_DESCRIPTION,
                    classifiers=['Intended Audience :: Science/Research',
                                 'Intended Audience :: Developers',
                                 'License :: OSI Approved',
                                 'Programming Language :: C',
                                 'Programming Language :: Python',
                                 'Topic :: Software Development',
                                 'Topic :: Scientific/Engineering',
                                 'Development Status :: 5 - Production/Stable',
                                 'Operating System :: Microsoft :: Windows',
                                 'Operating System :: POSIX',
                                 'Operating System :: Unix',
                                 'Operating System :: MacOS',
                                 '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 :: '
                                  'Implementation :: CPython'),
                                 ('Programming Language :: Python :: '
                                  'Implementation :: PyPy')
                                 ],
                    cmdclass=cmdclass,
                    python_requires=">=3.6",
                    install_requires=min_deps.tag_to_packages['install'],
                    package_data={'': ['*.pxd']},
                    **extra_setuptools_args)

    if len(sys.argv) == 1 or (
            len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or
                                    sys.argv[1] in ('--help-commands',
                                                    'egg_info',
                                                    'dist_info',
                                                    '--version',
                                                    'clean',
                                                    'check'))):
        # These actions are required to succeed without Numpy for example when
        # pip is used to install Scikit-learn when Numpy is not yet present in
        # the system.

        # These commands use setup from setuptools
        from setuptools import setup

        metadata['version'] = VERSION
    else:
        if sys.version_info < (3, 6):
            raise RuntimeError(
                "Scikit-learn requires Python 3.6 or later. The current"
                " Python version is %s installed in %s."
                % (platform.python_version(), sys.executable))

        check_package_status('numpy', min_deps.NUMPY_MIN_VERSION)

        check_package_status('scipy', min_deps.SCIPY_MIN_VERSION)

        # These commands require the setup from numpy.distutils because they
        # may use numpy.distutils compiler classes.
        from numpy.distutils.core import setup

        metadata['configuration'] = configuration

    setup(**metadata)

if __name__ == "__main__":
    setup_package()
<|endoftext|>


<commit_before># coding=utf-8
import os
from setuptools import setup, find_packages
from version import get_version

version = get_version()

setup(name='gs.content.js.jquery',
    version=version,
    description="jQuery Code.",
    long_description=open("README.txt").read() + "\n" +
                      open(os.path.join("docs", "HISTORY.txt")).read(),
    classifiers=[
      "Development Status :: 4 - Beta",
      "Environment :: Web Environment",
      "Framework :: Zope2",
      "Intended Audience :: Developers",
      "License :: Other/Proprietary License",
      "Natural Language :: English",
      "Operating System :: POSIX :: Linux"
      "Programming Language :: Python",
      "Topic :: Software Development :: Libraries :: Python Modules",
      ],
    keywords='group membership group groupserver',
    author='Michael JasonSmith',
    author_email='mpj17@onlinegroups.net',
    url='http://groupserver.org/',
    license='other',
    packages=find_packages(exclude=['ez_setup']),
    namespace_packages=['gs','content','js'],
    include_package_data=True,
    zip_safe=True,
    install_requires=[
        'setuptools',
        # -*- Extra requirements: -*-
    ],
    entry_points="""
    # -*- Entry points: -*-
    """,)

<commit_msg>Fix for the setup<commit_after># coding=utf-8
import os
from setuptools import setup, find_packages
from version import get_version

version = get_version()

setup(name='gs.content.js.jquery',
    version=version,
    description="jQuery Code.",
    long_description=open("README.txt").read() + "\n" +
                      open(os.path.join("docs", "HISTORY.txt")).read(),
    classifiers=[
      "Development Status :: 4 - Beta",
      "Environment :: Web Environment",
      "Framework :: Zope2",
      "Intended Audience :: Developers",
      "License :: Other/Proprietary License",
      "Natural Language :: English",
      "Operating System :: POSIX :: Linux"
      "Programming Language :: Python",
      "Topic :: Software Development :: Libraries :: Python Modules",
      ],
    keywords='group membership group groupserver',
    author='Michael JasonSmith',
    author_email='mpj17@onlinegroups.net',
    url='http://groupserver.org/',
    license='other',
    packages=find_packages(exclude=['ez_setup']),
    namespace_packages=['gs','gs.content','gs.content.js'],
    include_package_data=True,
    zip_safe=True,
    install_requires=[
        'setuptools',
        # -*- Extra requirements: -*-
    ],
    entry_points="""
    # -*- Entry points: -*-
    """,)

<|endoftext|>


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

from setuptools import setup, find_packages

setup(
    name='ppp_spell_checker',
    version='0.1',
    description='A spell checker for the PPP. Use the Aspell API.',
    url='https://github.com/ProjetPP',
    author='Projet Pensées Profondes',
    author_email='ppp2014@listes.ens-lyon.fr',
    license='MIT',
    classifiers=[
        'Environment :: No Input/Output (Daemon)',
        'Development Status :: 1 - Planning',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
        'Topic :: Software Development :: Libraries',
    ],
    install_requires=[
        'ppp_datamodel>=0.5',
        'ppp_libmodule>=0.6',
    ],
    packages=[
        'ppp_spell_checker',
    ],
)

import sys
if 'install' in sys.argv:
    # From http://stackoverflow.com/questions/20415522/running-a-bash-script-from-python
    import subprocess
    cmd = "./dependencies.sh"
    if '--user' in sys.argv:
        cmd = '{0} {1}'.format(cmd,'--user')
    print("CMD=",cmd)
    # no block, it start a sub process.
    p = subprocess.Popen(cmd , shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    # and you can block util the cmd execute finish
    p.wait()

<commit_msg>Remove display in setup.py.<commit_after>#!/usr/bin/env python3

from setuptools import setup, find_packages

setup(
    name='ppp_spell_checker',
    version='0.1',
    description='A spell checker for the PPP. Use the Aspell API.',
    url='https://github.com/ProjetPP',
    author='Projet Pensées Profondes',
    author_email='ppp2014@listes.ens-lyon.fr',
    license='MIT',
    classifiers=[
        'Environment :: No Input/Output (Daemon)',
        'Development Status :: 1 - Planning',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
        'Topic :: Software Development :: Libraries',
    ],
    install_requires=[
        'ppp_datamodel>=0.5',
        'ppp_libmodule>=0.6',
    ],
    packages=[
        'ppp_spell_checker',
    ],
)

import sys
if 'install' in sys.argv:
    # From http://stackoverflow.com/questions/20415522/running-a-bash-script-from-python
    import subprocess
    cmd = "./dependencies.sh"
    if '--user' in sys.argv:
        cmd = '{0} {1}'.format(cmd,'--user')
    # no block, it start a sub process.
    p = subprocess.Popen(cmd , shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    # and you can block util the cmd execute finish
    p.wait()

<|endoftext|>


<commit_before>"""The PyRhO package setup script"""

from __future__ import print_function        # Added for Python 2.x support
from setuptools import setup, find_packages  # Prefer setuptools over distutils
from codecs import open                      # To use a consistent encoding
import os

# Download and install setuptools if not installed
#from ez_setup import use_setuptools
#use_setuptools()
#python -m ensurepip --upgrade

#from setuptools import setup
#from distutils import setup

here = os.path.abspath(os.path.dirname(__file__))
home = os.path.expanduser("~")
print(home)
prwd = os.path.join(home, 'pyrho')  # pyrho working directory

# TODO: Test changes to package_data and include notebooks and license without MANIFEST

# TODO: Fix this to remove redundant long_description text
# Get the long description from the relevant file
#with open(os.path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
#with open('DESCRIPTION.rst', encoding='utf-8') as f:
#    long_description = f.read()

long_description = """
PyRhO - A Virtual Optogenetics Laboratory
=========================================

A Python module to fit and characterise rhodopsin photocurrents.

Background
----------

Optogenetics has become a key tool for understanding the function of neural circuits and controlling their behaviour. An array of directly light driven opsins have been genetically isolated from several families of organisms, with a wide range of temporal and spectral properties. In order to characterize, understand and apply these rhodopsins, we present an integrated suite of open-source, multi-scale computational tools called PyRhO.

PyRhO enables users to:

(i) characterize new (and existing) rhodopsins by automatically fitting a minimal set of experimental data to three, four or six-state kinetic models,
(ii) simulate these models at the channel, neuron & network levels and
(iii) gain functional insights through model selection and virtual experiments *in silico*.

The module is written in Python with an additional IPython/Jupyter notebook based GUI, allowing models to be fit, simulations to be run and results to be shared through simply interacting with a webpage. The seamless integration of model fitting algorithms with simulation environments for these virtual opsins will enable (neuro)scientists to gain a comprehensive understanding of their behaviour and rapidly identify the most suitable variant for application in a particular biological system. This process may thereby guide not only experimental design and opsin choice but also alterations of the rhodopsin genetic code in a neuro-engineering feed-back loop. In this way, we hope PyRhO will help to significantly improve optogenetics as a tool for transforming biological sciences.

Further Information
-------------------

If you use PyRhO please cite our paper:

Evans, B. D., Jarvis, S., Schultz, S. R. & Nikolic K. (2016) "PyRhO: A Multiscale Optogenetics Simulation Platform", *Frontiers in Neuroinformatics, 10* (8). `doi:10.3389/fninf.2016.00008 <https://dx.doi.org/10.3389/fninf.2016.00008>`_

The PyRhO project website with additional documentation may be found here: `www.imperial.ac.uk/bio-modelling/pyrho <http://www.imperial.ac.uk/a-z-research/bio-modelling/pyrho>`_

Finally, don't forget to follow us on twitter for updates: `@ProjectPyRhO <https://twitter.com/ProjectPyRhO>`_!

"""

setup(
    name='PyRhO',

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

    description='Fit and characterise rhodopsin photocurrents',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/ProjectPyRhO/PyRhO/',
    # download_url='https://github.com/ProjectPyRhO/PyRhO/archive/master.zip',
    # download_url='https://github.com/ProjectPyRhO/PyRhO/tarball/' + version,

    # Author details
    author='Benjamin D. Evans',
    author_email='ben.d.evans@gmail.com',

    license='BSD',
    platforms=['Linux', 'Mac OS X', 'Windows'],
    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        'Intended Audience :: Science/Research',
        'Intended Audience :: Education',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',
        'Topic :: Scientific/Engineering :: Bio-Informatics',
        'Topic :: Scientific/Engineering :: Artificial Life',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',

        # The license should match "license" above
        'License :: OSI Approved :: BSD License',

        # Supported Python versions
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        # 2.6 barriers: OrderedDict, dictionary comprehension, importlib
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        # Technically 3.1 and 3.2 should work but are unsupported by Travis
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Framework :: IPython',
        'Natural Language :: English',
        'Operating System :: OS Independent',
    ],

    #keywords='optogenetics rhodopsin opsin brain neuroscience neuron brian jupyter',
    keywords=['optogenetics', 'rhodopsin', 'opsin', 'brain', 'neuroscience',
              'neuron', 'brian', 'jupyter'],

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

    # package_dir = {'':'.'},
    # package_dir = {'pyrho': 'pyrho'}, # Relative to this script

    # List run-time dependencies here.  These will be installed by pip when your
    # project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    # ipython is used for latex repr - remove from requirements and have a fallback repr?
    install_requires=['numpy>=1.8', 'scipy>=0.15', 'matplotlib>=1.3',
                      'lmfit>=0.9.3', 'brian2>=2.0'],  # 'ipython>=4.1'

    # List additional groups of dependencies here (e.g. development dependencies).
    # You can install these using the following syntax, for example:
    # $ pip install -e .[dev,test]
    extras_require={
    #    'dev': ['check-manifest'],
    #    'test': ['coverage'],
    #    'brian' : ['brian2'],
    #    'docs' : ['sphinx>=1.3'],
        'extras': ['seaborn>=0.7', 'pandas>=0.17'],  # 'cython>=0.23'
    # traitlets is a dependency of ipywidgets and can be removed if 4.1 entails traitlets>=4.1
        'GUI' : ['jupyter>=1.0', 'notebook>=4.1', 'ipywidgets>=4.1,<5',
                 'seaborn>=0.7'],  # , 'traitlets>=4.1,<5'
        'full': ['jupyter>=1.0', 'notebook>=4.1', 'ipywidgets>=4.1,<5',
                 'seaborn>=0.7', 'pandas>=0.17'],  # 'cython>=0.23'
    },

    include_package_data=True,
    # If there are data files included in your packages that need to be
    # installed, specify them here. If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    package_data={
        # TODO: Try this without MANIFEST
        'NEURON'  : ['*.mod', '*.hoc', '*.sh'],
        'gui'     : ['*.png'],
        'datasets': ['*.pkl'],
    },

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

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    #entry_points={
    #    'console_scripts': [
    #        'sample=sample:main',
    #    ],
    #},
)
<commit_msg>Drop Python 3.3 due to scipy 1.0 and bump to 0.9.5<commit_after>"""The PyRhO package setup script"""

from __future__ import print_function        # Added for Python 2.x support
from setuptools import setup, find_packages  # Prefer setuptools over distutils
from codecs import open                      # To use a consistent encoding
import os

# Download and install setuptools if not installed
#from ez_setup import use_setuptools
#use_setuptools()
#python -m ensurepip --upgrade

#from setuptools import setup
#from distutils import setup

here = os.path.abspath(os.path.dirname(__file__))
home = os.path.expanduser("~")
print(home)
prwd = os.path.join(home, 'pyrho')  # pyrho working directory

# TODO: Test changes to package_data and include notebooks and license without MANIFEST

# TODO: Fix this to remove redundant long_description text
# Get the long description from the relevant file
#with open(os.path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
#with open('DESCRIPTION.rst', encoding='utf-8') as f:
#    long_description = f.read()

long_description = """
PyRhO - A Virtual Optogenetics Laboratory
=========================================

A Python module to fit and characterise rhodopsin photocurrents.

Background
----------

Optogenetics has become a key tool for understanding the function of neural circuits and controlling their behaviour. An array of directly light driven opsins have been genetically isolated from several families of organisms, with a wide range of temporal and spectral properties. In order to characterize, understand and apply these rhodopsins, we present an integrated suite of open-source, multi-scale computational tools called PyRhO.

PyRhO enables users to:

(i) characterize new (and existing) rhodopsins by automatically fitting a minimal set of experimental data to three, four or six-state kinetic models,
(ii) simulate these models at the channel, neuron & network levels and
(iii) gain functional insights through model selection and virtual experiments *in silico*.

The module is written in Python with an additional IPython/Jupyter notebook based GUI, allowing models to be fit, simulations to be run and results to be shared through simply interacting with a webpage. The seamless integration of model fitting algorithms with simulation environments for these virtual opsins will enable (neuro)scientists to gain a comprehensive understanding of their behaviour and rapidly identify the most suitable variant for application in a particular biological system. This process may thereby guide not only experimental design and opsin choice but also alterations of the rhodopsin genetic code in a neuro-engineering feed-back loop. In this way, we hope PyRhO will help to significantly improve optogenetics as a tool for transforming biological sciences.

Further Information
-------------------

If you use PyRhO please cite our paper:

Evans, B. D., Jarvis, S., Schultz, S. R. & Nikolic K. (2016) "PyRhO: A Multiscale Optogenetics Simulation Platform", *Frontiers in Neuroinformatics, 10* (8). `doi:10.3389/fninf.2016.00008 <https://dx.doi.org/10.3389/fninf.2016.00008>`_

The PyRhO project website with additional documentation may be found here: `www.imperial.ac.uk/bio-modelling/pyrho <http://www.imperial.ac.uk/a-z-research/bio-modelling/pyrho>`_

Finally, don't forget to follow us on twitter for updates: `@ProjectPyRhO <https://twitter.com/ProjectPyRhO>`_!

"""

setup(
    name='PyRhO',

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

    description='Fit and characterise rhodopsin photocurrents',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/ProjectPyRhO/PyRhO/',
    # download_url='https://github.com/ProjectPyRhO/PyRhO/archive/master.zip',
    # download_url='https://github.com/ProjectPyRhO/PyRhO/tarball/' + version,

    # Author details
    author='Benjamin D. Evans',
    author_email='ben.d.evans@gmail.com',

    license='BSD',
    platforms=['Linux', 'Mac OS X', 'Windows'],
    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        'Intended Audience :: Science/Research',
        'Intended Audience :: Education',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',
        'Topic :: Scientific/Engineering :: Bio-Informatics',
        'Topic :: Scientific/Engineering :: Artificial Life',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',

        # The license should match "license" above
        'License :: OSI Approved :: BSD License',

        # Supported Python versions
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        # 2.6 barriers: OrderedDict, dictionary comprehension, importlib
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        # Technically 3.1 and 3.2 should work but are unsupported by Travis
        # 'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Framework :: IPython',
        'Natural Language :: English',
        'Operating System :: OS Independent',
    ],

    #keywords='optogenetics rhodopsin opsin brain neuroscience neuron brian jupyter',
    keywords=['optogenetics', 'rhodopsin', 'opsin', 'brain', 'neuroscience',
              'neuron', 'brian', 'jupyter'],

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

    # package_dir = {'':'.'},
    # package_dir = {'pyrho': 'pyrho'}, # Relative to this script

    # List run-time dependencies here.  These will be installed by pip when your
    # project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    # ipython is used for latex repr - remove from requirements and have a fallback repr?
    install_requires=['numpy>=1.8', 'scipy>=0.15', 'matplotlib>=1.3',
                      'lmfit>=0.9.3', 'brian2>=2.0'],  # 'ipython>=4.1'

    # List additional groups of dependencies here (e.g. development dependencies).
    # You can install these using the following syntax, for example:
    # $ pip install -e .[dev,test]
    extras_require={
    #    'dev': ['check-manifest'],
    #    'test': ['coverage'],
    #    'brian' : ['brian2'],
    #    'docs' : ['sphinx>=1.3'],
        'extras': ['seaborn>=0.7', 'pandas>=0.17'],  # 'cython>=0.23'
    # traitlets is a dependency of ipywidgets and can be removed if 4.1 entails traitlets>=4.1
        'GUI' : ['jupyter>=1.0', 'notebook>=4.1', 'ipywidgets>=4.1,<5',
                 'seaborn>=0.7'],  # , 'traitlets>=4.1,<5'
        'full': ['jupyter>=1.0', 'notebook>=4.1', 'ipywidgets>=4.1,<5',
                 'seaborn>=0.7', 'pandas>=0.17'],  # 'cython>=0.23'
    },

    include_package_data=True,
    # If there are data files included in your packages that need to be
    # installed, specify them here. If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    package_data={
        # TODO: Try this without MANIFEST
        'NEURON'  : ['*.mod', '*.hoc', '*.sh'],
        'gui'     : ['*.png'],
        'datasets': ['*.pkl'],
    },

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

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


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

"""Youtube-dlg setup file.

Examples:
    Windows::

        python setup.py py2exe

    Linux::

        python setup.py install

    Build source distribution::

        python setup.py sdist

    Build platform distribution::

        python setup.py bdist

    Build the translations::

        python setup.py build_trans

    Build with updates disabled::

        python setup.py build --no-updates

Requirements:

    * GNU gettext utilities

Notes:
    If you get 'TypeError: decoding Unicode is not supported' when you run
    py2exe then apply the following patch::

        http://sourceforge.net/p/py2exe/patches/28/

    Basic steps of the setup::

        * Run pre-build tasks
        * Call setup handler based on OS & options
            * Set up hicolor icons (if supported by platform)
            * Set up fallback pixmaps icon (if supported by platform)
            * Set up package level pixmaps icons (*.png)
            * Set up package level i18n files (*.mo)
            * Set up scripts (executables) (if supported by platform)
        * Run setup

"""

from distutils import cmd
from distutils.core import setup
from distutils.command.build import build

import os
import sys
import glob
from shutil import copyfile
from subprocess import call

PY2EXE = len(sys.argv) >= 2 and sys.argv[1] == "py2exe"

if PY2EXE:
    try:
        import py2exe
    except ImportError as error:
        print(error)
        sys.exit(1)

from youtube_dl_gui import (
    __author__,
    __appname__,
    __contact__,
    __version__,
    __license__,
    __projecturl__,
    __description__,
    __packagename__,
    __descriptionfull__
)

# Setup can not handle unicode
__packagename__ = str(__packagename__)

def on_windows():
    """Returns True if OS is Windows."""
    return os.name == "nt"

class BuildBin(cmd.Command):

    description = "build the youtube-dl-gui binary file"
    user_options = []

    def initialize_options(self):
        self.scripts_dir = None

    def finalize_options(self):
        self.scripts_dir = os.path.join("build", "_scripts")

    def run(self):
        if not os.path.exists(self.scripts_dir):
            os.makedirs(self.scripts_dir)

        copyfile(os.path.join(__packagename__, "__main__.py"),
                 os.path.join(self.scripts_dir, "youtube-dl-gui"))

class BuildTranslations(cmd.Command):

    description = "build the translation files"
    user_options = []

    def initialize_options(self):
        self.exec_name = None
        self.search_pattern = None

    def finalize_options(self):
        if on_windows():
            self.exec_name = "msgfmt.exe"
        else:
            self.exec_name = "msgfmt"

        self.search_pattern = os.path.join(__packagename__, "locale", "*", "LC_MESSAGES", "youtube_dl_gui.po")

    def run(self):
        for po_file in glob.glob(self.search_pattern):
            mo_file = po_file.replace(".po", ".mo")

            try:
                print("building MO file for '{}'").format(po_file)
                call([self.exec_name, "-o", mo_file, po_file])
            except OSError:
                print("could not locate file '{}', exiting...".format(self.exec_name))
                sys.exit(1)

class Build(build):

    """Overwrite the default 'build' behaviour."""

    sub_commands = [
        ("build_bin", None),
        ("build_trans", None)
    ] + build.sub_commands

    build.user_options.append(("no-updates", None, "build with updates disabled"))

    def initialize_options(self):
        build.initialize_options(self)
        self.no_updates = None

    def run(self):
        build.run(self)

        if self.no_updates:
            self.__disable_updates()

    def __disable_updates(self):
        lib_dir = os.path.join(self.build_lib, __packagename__)
        target_file = "optionsmanager.py"

        # Options file should be available from previous build commands
        optionsfile = os.path.join(lib_dir, target_file)
        data = None

        with open(optionsfile, "r") as input_file:
            data = input_file.readlines()

        if data is None:
            print("building with updates disabled failed!")
            sys.exit(1)

        for index, line in enumerate(data):
            if "'disable_update': False" in line:
                print("disabling updates")
                data[index] = line.replace("False", "True")
                break

        with open(optionsfile, "w") as output_file:
            output_file.writelines(data)

# Overwrite cmds
cmdclass = {
    "build": Build,
    "build_bin": BuildBin,
    "build_trans": BuildTranslations
}

def linux_setup():
    scripts = []
    data_files = []
    package_data = {}

    # Add hicolor icons
    for path in glob.glob("youtube_dl_gui/data/icons/hicolor/*x*"):
        size = os.path.basename(path)

        dst = "share/icons/hicolor/{size}/apps".format(size=size)
        src = "{icon_path}/apps/youtube-dl-gui.png".format(icon_path=path)

        data_files.append((dst, [src]))

    # Add fallback icon, see issue #14
    data_files.append(
        ("share/pixmaps", ["youtube_dl_gui/data/pixmaps/youtube-dl-gui.png"])
    )

    # Add man page
    data_files.append(
        ("share/man/man1", ["youtube-dl-gui.1"])
    )

    # Add pixmaps icons (*.png) & i18n files
    package_data[__packagename__] = [
        "data/pixmaps/*.png",
        "locale/*/LC_MESSAGES/*.mo"
    ]

    # Add scripts
    scripts.append("build/_scripts/youtube-dl-gui")

    setup_params = {
        "scripts": scripts,
        "data_files": data_files,
        "package_data": package_data
    }

    return setup_params

def windows_setup():
    def normal_setup():
        package_data = {}

        # Add pixmaps icons (*.png) & i18n files
        package_data[__packagename__] = [
            "data\\pixmaps\\*.png",
            "locale\\*\\LC_MESSAGES\\*.mo"
        ]

        setup_params = {
            "package_data": package_data
        }

        return setup_params

    def py2exe_setup():
        windows = []
        data_files = []

        # py2exe dependencies & options
        # TODO change directory for ffmpeg.exe & ffprobe.exe
        dependencies = [
            "C:\\Windows\\System32\\ffmpeg.exe",
            "C:\\Windows\\System32\\ffprobe.exe",
            "C:\\python27\\DLLs\\MSVCP90.dll"
        ]

        options = {
            "includes": ["wx.lib.pubsub.*",
                         "wx.lib.pubsub.core.*",
                         "wx.lib.pubsub.core.arg1.*"]
        }
        #############################################

        # Add py2exe deps & pixmaps icons (*.png)
        data_files.extend([
            ("", dependencies),
            ("data\\pixmaps", glob.glob("youtube_dl_gui\\data\\pixmaps\\*.png")),
        ])

        # We have to manually add the translation files since py2exe cant do it
        for lang in os.listdir("youtube_dl_gui\\locale"):
            dst = os.path.join("locale", lang, "LC_MESSAGES")
            src = os.path.join("youtube_dl_gui", dst, "youtube_dl_gui.mo")

            data_files.append((dst, [src]))

        # Add GUI executable details
        windows.append({
            "script": "build\\_scripts\\youtube-dl-gui",
            "icon_resources": [(0, "youtube_dl_gui\\data\\pixmaps\\youtube-dl-gui.ico")]
        })

        setup_params = {
            "windows": windows,
            "data_files": data_files,
            "options": {"py2exe": options}
        }

        return setup_params

    if PY2EXE:
        return py2exe_setup()

    return normal_setup()

if on_windows():
    params = windows_setup()
else:
    params = linux_setup()

setup(
    author              = __author__,
    name                = __appname__,
    version             = __version__,
    license             = __license__,
    author_email        = __contact__,
    url                 = __projecturl__,
    description         = __description__,
    long_description    = __descriptionfull__,
    packages            = [__packagename__],
    cmdclass            = cmdclass,

    **params
)
<commit_msg>setup.py: Replace print statements with log functions<commit_after>#!/usr/bin/env python2
# -*- coding: utf-8 -*-

"""Youtube-dlg setup file.

Examples:
    Windows::

        python setup.py py2exe

    Linux::

        python setup.py install

    Build source distribution::

        python setup.py sdist

    Build platform distribution::

        python setup.py bdist

    Build the translations::

        python setup.py build_trans

    Build with updates disabled::

        python setup.py build --no-updates

Requirements:

    * GNU gettext utilities

Notes:
    If you get 'TypeError: decoding Unicode is not supported' when you run
    py2exe then apply the following patch::

        http://sourceforge.net/p/py2exe/patches/28/

    Basic steps of the setup::

        * Run pre-build tasks
        * Call setup handler based on OS & options
            * Set up hicolor icons (if supported by platform)
            * Set up fallback pixmaps icon (if supported by platform)
            * Set up package level pixmaps icons (*.png)
            * Set up package level i18n files (*.mo)
            * Set up scripts (executables) (if supported by platform)
        * Run setup

"""

from distutils import cmd, log
from distutils.core import setup
from distutils.command.build import build

import os
import sys
import glob
from shutil import copyfile
from subprocess import call

PY2EXE = len(sys.argv) >= 2 and sys.argv[1] == "py2exe"

if PY2EXE:
    try:
        import py2exe
    except ImportError as error:
        print(error)
        sys.exit(1)

from youtube_dl_gui import (
    __author__,
    __appname__,
    __contact__,
    __version__,
    __license__,
    __projecturl__,
    __description__,
    __packagename__,
    __descriptionfull__
)

# Setup can not handle unicode
__packagename__ = str(__packagename__)

def on_windows():
    """Returns True if OS is Windows."""
    return os.name == "nt"

class BuildBin(cmd.Command):

    description = "build the youtube-dl-gui binary file"
    user_options = []

    def initialize_options(self):
        self.scripts_dir = None

    def finalize_options(self):
        self.scripts_dir = os.path.join("build", "_scripts")

    def run(self):
        if not os.path.exists(self.scripts_dir):
            os.makedirs(self.scripts_dir)

        copyfile(os.path.join(__packagename__, "__main__.py"),
                 os.path.join(self.scripts_dir, "youtube-dl-gui"))

class BuildTranslations(cmd.Command):

    description = "build the translation files"
    user_options = []

    def initialize_options(self):
        self.exec_name = None
        self.search_pattern = None

    def finalize_options(self):
        if on_windows():
            self.exec_name = "msgfmt.exe"
        else:
            self.exec_name = "msgfmt"

        self.search_pattern = os.path.join(__packagename__, "locale", "*", "LC_MESSAGES", "youtube_dl_gui.po")

    def run(self):
        for po_file in glob.glob(self.search_pattern):
            mo_file = po_file.replace(".po", ".mo")

            try:
                log.info("building MO file for '{}'".format(po_file))
                call([self.exec_name, "-o", mo_file, po_file])
            except OSError:
                log.error("could not locate file '{}', exiting...".format(self.exec_name))
                sys.exit(1)

class Build(build):

    """Overwrite the default 'build' behaviour."""

    sub_commands = [
        ("build_bin", None),
        ("build_trans", None)
    ] + build.sub_commands

    build.user_options.append(("no-updates", None, "build with updates disabled"))

    def initialize_options(self):
        build.initialize_options(self)
        self.no_updates = None

    def run(self):
        build.run(self)

        if self.no_updates:
            self.__disable_updates()

    def __disable_updates(self):
        lib_dir = os.path.join(self.build_lib, __packagename__)
        target_file = "optionsmanager.py"

        # Options file should be available from previous build commands
        optionsfile = os.path.join(lib_dir, target_file)
        data = None

        with open(optionsfile, "r") as input_file:
            data = input_file.readlines()

        if data is None:
            log.error("building with updates disabled failed!")
            sys.exit(1)

        for index, line in enumerate(data):
            if "'disable_update': False" in line:
                log.info("disabling updates")
                data[index] = line.replace("False", "True")
                break

        with open(optionsfile, "w") as output_file:
            output_file.writelines(data)

# Overwrite cmds
cmdclass = {
    "build": Build,
    "build_bin": BuildBin,
    "build_trans": BuildTranslations
}

def linux_setup():
    scripts = []
    data_files = []
    package_data = {}

    # Add hicolor icons
    for path in glob.glob("youtube_dl_gui/data/icons/hicolor/*x*"):
        size = os.path.basename(path)

        dst = "share/icons/hicolor/{size}/apps".format(size=size)
        src = "{icon_path}/apps/youtube-dl-gui.png".format(icon_path=path)

        data_files.append((dst, [src]))

    # Add fallback icon, see issue #14
    data_files.append(
        ("share/pixmaps", ["youtube_dl_gui/data/pixmaps/youtube-dl-gui.png"])
    )

    # Add man page
    data_files.append(
        ("share/man/man1", ["youtube-dl-gui.1"])
    )

    # Add pixmaps icons (*.png) & i18n files
    package_data[__packagename__] = [
        "data/pixmaps/*.png",
        "locale/*/LC_MESSAGES/*.mo"
    ]

    # Add scripts
    scripts.append("build/_scripts/youtube-dl-gui")

    setup_params = {
        "scripts": scripts,
        "data_files": data_files,
        "package_data": package_data
    }

    return setup_params

def windows_setup():
    def normal_setup():
        package_data = {}

        # Add pixmaps icons (*.png) & i18n files
        package_data[__packagename__] = [
            "data\\pixmaps\\*.png",
            "locale\\*\\LC_MESSAGES\\*.mo"
        ]

        setup_params = {
            "package_data": package_data
        }

        return setup_params

    def py2exe_setup():
        windows = []
        data_files = []

        # py2exe dependencies & options
        # TODO change directory for ffmpeg.exe & ffprobe.exe
        dependencies = [
            "C:\\Windows\\System32\\ffmpeg.exe",
            "C:\\Windows\\System32\\ffprobe.exe",
            "C:\\python27\\DLLs\\MSVCP90.dll"
        ]

        options = {
            "includes": ["wx.lib.pubsub.*",
                         "wx.lib.pubsub.core.*",
                         "wx.lib.pubsub.core.arg1.*"]
        }
        #############################################

        # Add py2exe deps & pixmaps icons (*.png)
        data_files.extend([
            ("", dependencies),
            ("data\\pixmaps", glob.glob("youtube_dl_gui\\data\\pixmaps\\*.png")),
        ])

        # We have to manually add the translation files since py2exe cant do it
        for lang in os.listdir("youtube_dl_gui\\locale"):
            dst = os.path.join("locale", lang, "LC_MESSAGES")
            src = os.path.join("youtube_dl_gui", dst, "youtube_dl_gui.mo")

            data_files.append((dst, [src]))

        # Add GUI executable details
        windows.append({
            "script": "build\\_scripts\\youtube-dl-gui",
            "icon_resources": [(0, "youtube_dl_gui\\data\\pixmaps\\youtube-dl-gui.ico")]
        })

        setup_params = {
            "windows": windows,
            "data_files": data_files,
            "options": {"py2exe": options}
        }

        return setup_params

    if PY2EXE:
        return py2exe_setup()

    return normal_setup()

if on_windows():
    params = windows_setup()
else:
    params = linux_setup()

setup(
    author              = __author__,
    name                = __appname__,
    version             = __version__,
    license             = __license__,
    author_email        = __contact__,
    url                 = __projecturl__,
    description         = __description__,
    long_description    = __descriptionfull__,
    packages            = [__packagename__],
    cmdclass            = cmdclass,

    **params
)
<|endoftext|>


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

from __future__ import print_function

import os
import sys
import codecs

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

from setuptools.command.test import test as TestCommand

if sys.version_info < (2, 6):
	raise SystemExit("Python 2.6 or later is required.")
elif sys.version_info > (3, 0) and sys.version_info < (3, 2):
	raise SystemExit("Python 3.2 or later is required.")

exec(open(os.path.join("marrow", "package", "release.py")).read())

class PyTest(TestCommand):
	def finalize_options(self):
		TestCommand.finalize_options(self)

		self.test_args = []
		self.test_suite = True

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

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

tests_require = ['pytest', 'pytest-cov', 'pytest-flakes', 'pytest-cagoule', 'pytest-spec<=0.2.22']

setup(
	name = "marrow.package",
	version = version,

	description = description,
	long_description = codecs.open(os.path.join(here, 'README.rst'), 'r', 'utf8').read(),
	url = url,

	author = author.name,
	author_email = author.email,

	license = 'MIT',
	keywords = '',
	classifiers = [
			"Development Status :: 5 - Production/Stable",
			"Intended Audience :: Developers",
			"License :: OSI Approved :: MIT License",
			"Operating System :: OS Independent",
			"Programming Language :: Python",
			"Programming Language :: Python :: 2",
			"Programming Language :: Python :: 2.6",
			"Programming Language :: Python :: 2.7",
			"Programming Language :: Python :: 3",
			"Programming Language :: Python :: 3.2",
			"Programming Language :: Python :: 3.3",
			"Programming Language :: Python :: 3.4",
			"Programming Language :: Python :: Implementation :: CPython",
			"Programming Language :: Python :: Implementation :: PyPy",
			"Topic :: Software Development :: Libraries :: Python Modules",
			"Topic :: Utilities"
		],

	packages = find_packages(exclude=['test', 'script', 'example']),
	include_package_data = True,
	namespace_packages = ['marrow'],

	install_requires = [],

	extras_require = dict(
			development = tests_require,
		),

	tests_require = tests_require,

	dependency_links = [
			'git+https://github.com/illico/pytest-spec.git@feature/py26#egg=pytest-spec-0.2.22'
		],

	zip_safe = False,
	cmdclass = dict(
			test = PyTest,
		)
)
<commit_msg>Removed test dependency on custom `pytest-spec`.<commit_after>#!/usr/bin/env python
# encoding: utf-8

from __future__ import print_function

import os
import sys
import codecs

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

from setuptools.command.test import test as TestCommand

if sys.version_info < (2, 6):
	raise SystemExit("Python 2.6 or later is required.")
elif sys.version_info > (3, 0) and sys.version_info < (3, 2):
	raise SystemExit("Python 3.2 or later is required.")

exec(open(os.path.join("marrow", "package", "release.py")).read())

class PyTest(TestCommand):
	def finalize_options(self):
		TestCommand.finalize_options(self)

		self.test_args = []
		self.test_suite = True

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

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

tests_require = ['pytest', 'pytest-cov', 'pytest-flakes', 'pytest-cagoule', 'pytest-spec']

setup(
	name = "marrow.package",
	version = version,

	description = description,
	long_description = codecs.open(os.path.join(here, 'README.rst'), 'r', 'utf8').read(),
	url = url,

	author = author.name,
	author_email = author.email,

	license = 'MIT',
	keywords = '',
	classifiers = [
			"Development Status :: 5 - Production/Stable",
			"Intended Audience :: Developers",
			"License :: OSI Approved :: MIT License",
			"Operating System :: OS Independent",
			"Programming Language :: Python",
			"Programming Language :: Python :: 2",
			"Programming Language :: Python :: 2.6",
			"Programming Language :: Python :: 2.7",
			"Programming Language :: Python :: 3",
			"Programming Language :: Python :: 3.2",
			"Programming Language :: Python :: 3.3",
			"Programming Language :: Python :: 3.4",
			"Programming Language :: Python :: Implementation :: CPython",
			"Programming Language :: Python :: Implementation :: PyPy",
			"Topic :: Software Development :: Libraries :: Python Modules",
			"Topic :: Utilities"
		],

	packages = find_packages(exclude=['test', 'script', 'example']),
	include_package_data = True,
	namespace_packages = ['marrow'],

	install_requires = [],

	extras_require = dict(
			development = tests_require,
		),

	tests_require = tests_require,

	dependency_links = [
		],

	zip_safe = False,
	cmdclass = dict(
			test = PyTest,
		)
)
<|endoftext|>


<commit_before>"""
    kaptan
    ~~~~~~

    :copyright: (c) 2013 by the authors and contributors (See AUTHORS file).
    :license: BSD, see LICENSE for more details.
"""

from setuptools import find_packages, setup

setup(
    name='kaptan',
    version='0.5.4',
    packages=find_packages(),
    url='https://github.com/emre/kaptan',
    license='BSD',
    author='Emre Yilmaz',
    author_email='mail@emreyilmaz.me',
    description='Configuration Manager',
    install_requires=['PyYAML'],
    entry_points=dict(
        console_scripts=[
            'kaptan = kaptan:main',
        ],
    ),
    classifiers=(
        'Development Status :: 5 - Production/Stable',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
    ),
)
<commit_msg>version bump: python3 support added. thanks @berkerpeksag<commit_after>"""
    kaptan
    ~~~~~~

    :copyright: (c) 2013 by the authors and contributors (See AUTHORS file).
    :license: BSD, see LICENSE for more details.
"""

from setuptools import find_packages, setup

setup(
    name='kaptan',
    version='0.5.5',
    packages=find_packages(),
    url='https://github.com/emre/kaptan',
    license='BSD',
    author='Emre Yilmaz',
    author_email='mail@emreyilmaz.me',
    description='Configuration Manager',
    install_requires=['PyYAML'],
    entry_points=dict(
        console_scripts=[
            'kaptan = kaptan:main',
        ],
    ),
    classifiers=(
        'Development Status :: 5 - Production/Stable',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
    ),
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages, Extension
try:
    import numpy
except ImportError:
    raise ImportError("numpy not found.  Please install numpy (e.g. 'pip install numpy') before installing ratcave.")

setup(name='ratcave',
      version='0.7rc1',
      url='https://www.github.com/neuroneuro15/ratcave',
      description='3D Graphics Engine for CAVE VR setups',
      author='Nicholas A. Del Grosso',
      author_email='delgrosso.nick@gmail.com',
      license='MIT',
      packages=find_packages(exclude=['docs']),
      include_package_data=True,
      package_data={'': ['../assets/*.'+el for el in ['png', 'obj', 'mtl']] +
                        ['../shaders/*/*'+el for el in ['vert', 'frag']]
                    },
      install_requires=['pyglet', 'numpy', 'wavefront_reader', 'future', 'six'],
      ext_modules=[Extension('_transformations', sources=['third_party/transformations.c'], include_dirs=[numpy.get_include()])],
      setup_requires=['numpy', 'pytest-runner'],
      tests_require = ['pytest'],
      keywords='graphics 3D pyglet psychopy python virtual reality VR',
      classifiers=[
          "Topic :: Multimedia :: Graphics :: 3D Rendering",
          "Development Status :: 3 - Alpha",
          "License :: OSI Approved :: MIT License",
          "Intended Audience :: Science/Research",
          "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>new release number<commit_after>from setuptools import setup, find_packages, Extension
try:
    import numpy
except ImportError:
    raise ImportError("numpy not found.  Please install numpy (e.g. 'pip install numpy') before installing ratcave.")

setup(name='ratcave',
      version='0.7.1rc1',
      url='https://www.github.com/neuroneuro15/ratcave',
      description='3D Graphics Engine for CAVE VR setups',
      author='Nicholas A. Del Grosso',
      author_email='delgrosso.nick@gmail.com',
      license='MIT',
      packages=find_packages(exclude=['docs']),
      include_package_data=True,
      package_data={'': ['../assets/*.'+el for el in ['png', 'obj', 'mtl']] +
                        ['../shaders/*/*'+el for el in ['vert', 'frag']]
                    },
      install_requires=['pyglet', 'numpy', 'wavefront_reader', 'future', 'six'],
      ext_modules=[Extension('_transformations', sources=['third_party/transformations.c'], include_dirs=[numpy.get_include()])],
      setup_requires=['numpy', 'pytest-runner'],
      tests_require = ['pytest'],
      keywords='graphics 3D pyglet psychopy python virtual reality VR',
      classifiers=[
          "Topic :: Multimedia :: Graphics :: 3D Rendering",
          "Development Status :: 3 - Alpha",
          "License :: OSI Approved :: MIT License",
          "Intended Audience :: Science/Research",
          "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>from distutils.core import setup
from setuptools import find_packages

setup(
    name='autokeras',
    packages=find_packages(exclude=('tests',)),
    install_requires=['scipy==1.2.0',
                      'torch==0.4.1',
                      'torchvision==0.2.1',
                      'numpy==1.15.4',
                      'keras==2.2.4',
                      'scikit-learn==0.20.2',
                      'scikit-image==0.14.2',
                      'tqdm==4.29.1',
                      'tensorflow==1.12.0',
                      'imageio==2.4.1',
                      'requests==2.21.0',
                      'lightgbm==2.2.2',
                      'pandas==0.23.4',
                      'librosa==0.6.2',
                      'numba',
                      'inflect',
                      'unidecode',
                      'nltk==3.3',
                      'lws==1.2',
                      'opencv-python==4.0.0.21',
                      'boto3'],
    version='0.3.6',
    description='AutoML for deep learning',
    author='DATA Lab at Texas A&M University',
    author_email='jhfjhfj1@gmail.com',
    url='http://autokeras.com',
    download_url='https://github.com/jhfjhfj1/autokeras/archive/0.3.6.tar.gz',
    keywords=['AutoML', 'keras'],
    classifiers=[]
)
<commit_msg>Bump torch from 0.4.1 to 1.0.1 (#515)<commit_after>from distutils.core import setup
from setuptools import find_packages

setup(
    name='autokeras',
    packages=find_packages(exclude=('tests',)),
    install_requires=['scipy==1.2.0',
                      'torch==1.0.1',
                      'torchvision==0.2.1',
                      'numpy==1.15.4',
                      'keras==2.2.4',
                      'scikit-learn==0.20.2',
                      'scikit-image==0.14.2',
                      'tqdm==4.29.1',
                      'tensorflow==1.12.0',
                      'imageio==2.4.1',
                      'requests==2.21.0',
                      'lightgbm==2.2.2',
                      'pandas==0.23.4',
                      'librosa==0.6.2',
                      'numba',
                      'inflect',
                      'unidecode',
                      'nltk==3.3',
                      'lws==1.2',
                      'opencv-python==4.0.0.21',
                      'boto3'],
    version='0.3.6',
    description='AutoML for deep learning',
    author='DATA Lab at Texas A&M University',
    author_email='jhfjhfj1@gmail.com',
    url='http://autokeras.com',
    download_url='https://github.com/jhfjhfj1/autokeras/archive/0.3.6.tar.gz',
    keywords=['AutoML', 'keras'],
    classifiers=[]
)
<|endoftext|>


<commit_before>#!-*- coding: utf-8 -*-

import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README')).read()
CHANGES = open(os.path.join(here, 'CHANGELOG')).read()

setup(
    name='timecode',
    version='0.3.0',
    description="SMPTE Time Code Manipulation Library",
    long_description='%s\n\n%s' % (README, CHANGES),
    classifiers=[
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Development Status :: 5 - Production/Stable",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    author=['Joshua Banton', 'Erkan Ozgur Yilmaz'],
    author_email=['bantonj@gmail.com', 'eoyilmaz@gmail.com'],
    url='http://bantonj.wordpress.com/software/open-source/',
    keywords=['video', 'timecode', 'smpte'],
    packages=find_packages(),
    include_package_data=True,
    zip_safe=True,
)
<commit_msg>updated setup.py<commit_after>#!-*- coding: utf-8 -*-

import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README')).read()
CHANGES = open(os.path.join(here, 'CHANGELOG')).read()

setup(
    name='timecode',
    version='0.3.0',
    description="SMPTE Time Code Manipulation Library",
    long_description='%s\n\n%s' % (README, CHANGES),
    classifiers=[
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Development Status :: 5 - Production/Stable",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    author=['Erkan Ozgur Yilmaz'],
    author_email=['eoyilmaz@gmail.com'],
    url='https://github.com/eoyilmaz/timecode',
    keywords=['video', 'timecode', 'smpte'],
    packages=find_packages(),
    include_package_data=True,
    zip_safe=True,
)
<|endoftext|>


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

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

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

requirements = open('requirements.txt').readlines()
"""[
    # TODO: put package requirements here
    'hexdump == 3.3',
    'yapsy == 1.10.323',
    'pyxdg == 0.25',
    'sphinxcontrib-napoleon == 0.2.8',
]"""

test_requirements = [
    # TODO: put package test requirements here
    'nose>=1.0',
    'mock==2.0.0',
]

setup(
    name='rawdisk',
    version='0.2.1',
    description='Experimental python code to explore different volume formats',
    long_description=readme + '\n\n' + history,
    author='Darius Bakunas-Milanowski',
    author_email='bakunas@gmail.com',
    url='https://github.com/dariusbakunas/rawdisk',
    packages=[
        'rawdisk',
        'rawdisk.filesystems',
        'rawdisk.ui',
        'rawdisk.ui.cli',
        'rawdisk.plugins',
        'rawdisk.plugins.filesystems',
        'rawdisk.plugins.filesystems.apple_boot',
        'rawdisk.plugins.filesystems.efi_system',
        'rawdisk.plugins.filesystems.hfs_plus',
        'rawdisk.plugins.filesystems.ntfs',
        'rawdisk.plugins.filesystems.ext2',
        'rawdisk.scheme',
        'rawdisk.util',
    ],
    package_dir={'rawdisk':
                 'rawdisk'},
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='rawdisk',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        "Programming Language :: Python :: 3.5",
    ],
    test_suite='tests',
    tests_require=test_requirements,
    entry_points={
        'console_scripts': [
            'rawdisk = rawdisk.main:main',
            'rawdisk-ui = rawdisk.ui:main'
        ]
    }
)
<commit_msg>use nose to run tests<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

requirements = open('requirements.txt').readlines()
"""[
    # TODO: put package requirements here
    'hexdump == 3.3',
    'yapsy == 1.10.323',
    'pyxdg == 0.25',
    'sphinxcontrib-napoleon == 0.2.8',
]"""

test_requirements = [
    # TODO: put package test requirements here
    'nose>=1.0',
    'mock==2.0.0',
]

setup(
    name='rawdisk',
    version='0.2.1',
    description='Experimental python code to explore different volume formats',
    long_description=readme + '\n\n' + history,
    author='Darius Bakunas-Milanowski',
    author_email='bakunas@gmail.com',
    url='https://github.com/dariusbakunas/rawdisk',
    packages=[
        'rawdisk',
        'rawdisk.filesystems',
        'rawdisk.ui',
        'rawdisk.ui.cli',
        'rawdisk.plugins',
        'rawdisk.plugins.filesystems',
        'rawdisk.plugins.filesystems.apple_boot',
        'rawdisk.plugins.filesystems.efi_system',
        'rawdisk.plugins.filesystems.hfs_plus',
        'rawdisk.plugins.filesystems.ntfs',
        'rawdisk.plugins.filesystems.ext2',
        'rawdisk.scheme',
        'rawdisk.util',
    ],
    package_dir={'rawdisk':
                 'rawdisk'},
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='rawdisk',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        "Programming Language :: Python :: 3.5",
    ],
    test_suite='nose.collector',
    tests_require=test_requirements,
    entry_points={
        'console_scripts': [
            'rawdisk = rawdisk.main:main',
            'rawdisk-ui = rawdisk.ui:main'
        ]
    }
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name = 'pygres',
    packages = ['pygres'], # this must be the same as the name above
    version = '1.1',
    description = 'Postgres simple driver',
    author = 'Rodrigo Gamba',
    author_email = 'gamba.lavin@gmail.com',
    url = 'https://github.com/rogamba/pygres', # use the URL to the github repo
    download_url = 'https://github.com/rogamba/pygres/tarball/0.1', # I'll explain this in a second
    keywords = ['postgres', 'psql', 'postgresql'],
    install_requires=[
        'psycopg2>=2.6.2',
    ],
    classifiers = [],
)
<commit_msg>Fix version setup<commit_after>from setuptools import setup

setup(
    name = 'pygres',
    packages = ['pygres'], # this must be the same as the name above
    version = '1.2',
    description = 'Postgres simple driver',
    author = 'Rodrigo Gamba',
    author_email = 'gamba.lavin@gmail.com',
    url = 'https://github.com/rogamba/pygres', # use the URL to the github repo
    download_url = 'https://github.com/rogamba/pygres/tarball/0.1', # I'll explain this in a second
    keywords = ['postgres', 'psql', 'postgresql'],
    install_requires=[
        'psycopg2>=2.6.2',
    ],
    classifiers = [],
)
<|endoftext|>


<commit_before>import re
from setuptools import setup

# Load version from module (without loading the whole module)
with open('pyscreeze/__init__.py', 'r') as fd:
    version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                        fd.read(), re.MULTILINE).group(1)

# Read in the README.md for the long description.
with open("README.md", "r") as fh:
    long_description = fh.read()

setup(
    name='PyScreeze',
    version=version,
    url='https://github.com/asweigart/pyscreeze',
    author='Al Sweigart',
    author_email='al@inventwithpython.com',
    description='A simple, cross-platform screenshot module for Python 2 and 3.',
    long_description=long_description,
    license='BSD',
    packages=['pyscreeze'],
    test_suite='tests',
    install_requires=['Pillow'],
    requires_python='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', # Copied from the Pillow library, since PyScreeze is built on top of it.
    keywords="screenshot screen screencap capture scrot screencapture image",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Environment :: MacOS X',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
         # Copied from the Pillow library, since PyScreeze is built on top of it:
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],
)<commit_msg>Refactoring setup.py.<commit_after>import io
import os
import re
from setuptools import setup

scriptFolder = os.path.dirname(os.path.realpath(__file__))
os.chdir(scriptFolder)

# Load version from module (without loading the whole module)
with open('pyscreeze/__init__.py', 'r') as fileObj:
    version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                        fileObj.read(), re.MULTILINE).group(1)

# Use the README.md content for the long description:
with io.open('README.md', encoding='utf-8') as fileObj:
    long_description = fileObj.read()

setup(
    name='PyScreeze',
    version=version,
    url='https://github.com/asweigart/pyscreeze',
    author='Al Sweigart',
    author_email='al@inventwithpython.com',
    description='A simple, cross-platform screenshot module for Python 2 and 3.',
    long_description=long_description,
    license='MIT',
    packages=['pyscreeze'],
    test_suite='tests',
    install_requires=['Pillow'],
    requires_python='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', # Copied from the Pillow library, since PyScreeze is built on top of it.
    keywords="screenshot screen screencap capture scrot screencapture image",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Environment :: MacOS X',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
         # Copied from the Pillow library, since PyScreeze is built on top of it:
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],
)<|endoftext|>


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

from setuptools import setup, find_packages, Extension

import os
import io
import re
try:
    import numpy
except ModuleNotFoundError as e:
    #raise ModuleNotFoundError(
    print(
        "Please install numpy before installing Camoco,"
    )
    sys.exit(1)

def read(*names, **kwargs):
    with io.open(
        os.path.join(os.path.dirname(__file__), *names),
        encoding=kwargs.get("encoding", "utf8")
    ) as fp:
        return fp.read()

def find_version(*file_paths):
    version_file = read(*file_paths)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Unable to find version string.")

pccup = Extension(
    'camoco.PCCUP',
    sources=['camoco/PCCUP.pyx'],
    include_dirs=[numpy.get_include()]
)
refgendist = Extension(
    'camoco.RefGenDist',
    sources=['camoco/RefGenDist.pyx'],
    include_dirs=[numpy.get_include()]
)

# Check if running Windows
if os.name == 'nt':
    raise ValueError("Camoco isn't supported for windows! Camoco runs best on Linux!")
    sys.exit(1)

setup(
    name = 'camoco',
    version = find_version('camoco','__init__.py'),
    packages = find_packages(),
    scripts = [
        'camoco/cli/camoco'
    ],
    ext_modules = [pccup,refgendist],
    cmdclass = {
    },
    package_data = {
        '':['*.cyx']
    },
    python_requires='>=3.8',
    setup_requires = [
        # Setuptools 18.0 properly handles Cython extensions.
        'setuptools>=18.0',
        'numpy>=1.14.5',
        'cython>=0.29.10',
    ],
    install_requires = [
        'minus80>=1.0.0',
        'cython>=0.29.10',
        'igraph==0.1.11',
        'pyyaml>=5.1.1',
        'matplotlib>=3.1.0',
        'numpy>=1.16.4',
        'scipy>=1.2.1',
        'pandas==0.23.4',
        'fa2>=0.3.5',
        'scikit-learn>=0.21.2',
        'statsmodels>=0.8.0',
        'termcolor>=1.1.0',
        'powerlaw>=1.4.6',
        'flask==1.0.3',
        'markov-clustering>=0.0.6.dev0',
        'fastcluster>=1.1.25',
        'bcolz>=1.2.1',
        'psutil>=5.6.3',
        'odo>=0.5.0',
        'blaze>=0.10.1'
    ],
    extras_require={
        'docs' : [
            'ipython>=6.5.0',
            'matplotlib>=2.2.3',
            'numpydoc',
            'sphinx_materialdesign_theme',
            'sphinx_rtd_theme',
            'sphinxcontrib-programoutput'
        ]
    },
    dependency_links = [
        #'git+https://github.com/LinkageIO/Minus80'
        #'git+https://github.com/rogerbinns/apsw'
    ],
    include_package_data=True,
    author = 'Rob Schaefer',
    author_email = 'rob@linkage.io',
    description = 'Library for Co-Analysis of Molecular Componenets.',
    license = "Copyright Linkage Analytics 2017, Available under the MIT License",
    url = 'https://github.com/schae234/camoco'
)
<commit_msg>add check for non-linux systems, fixes #95<commit_after>#!/usr/bin/env python3

from setuptools import setup, find_packages, Extension

import os
import io
import re
import sys

try:
    import numpy
except ModuleNotFoundError as e:
    #raise ModuleNotFoundError(
    print(
        "Please install numpy before installing Camoco,"
    )
    sys.exit(1)

def read(*names, **kwargs):
    with io.open(
        os.path.join(os.path.dirname(__file__), *names),
        encoding=kwargs.get("encoding", "utf8")
    ) as fp:
        return fp.read()

def find_version(*file_paths):
    version_file = read(*file_paths)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Unable to find version string.")

pccup = Extension(
    'camoco.PCCUP',
    sources=['camoco/PCCUP.pyx'],
    include_dirs=[numpy.get_include()]
)
refgendist = Extension(
    'camoco.RefGenDist',
    sources=['camoco/RefGenDist.pyx'],
    include_dirs=[numpy.get_include()]
)

# Check if running Windows or OSX
if (
    not sys.platform.startswith('linux')
    and int(os.environ.get('CAMOCO_FORCE_INSTALL',default='0')) != 1
    ):
    print(
        "Sorry! Camoco is not currently supported on non-linux systems "
        "If you would like to proceed with installation please set the "
        "ENV variable 'CAMOCO_FORCE_INSTALL' to '1'"
    )
    sys.exit(1)

setup(
    name = 'camoco',
    version = find_version('camoco','__init__.py'),
    packages = find_packages(),
    scripts = [
        'camoco/cli/camoco'
    ],
    ext_modules = [pccup,refgendist],
    cmdclass = {
    },
    package_data = {
        '':['*.cyx']
    },
    python_requires='>=3.8',
    setup_requires = [
        # Setuptools 18.0 properly handles Cython extensions.
        'setuptools>=18.0',
        'numpy>=1.14.5',
        'cython>=0.29.10',
    ],
    install_requires = [
        'minus80>=1.0.0',
        'cython>=0.29.10',
        'igraph==0.1.11',
        'pyyaml>=5.1.1',
        'matplotlib>=3.1.0',
        'numpy>=1.16.4',
        'scipy>=1.2.1',
        'pandas==0.23.4',
        'fa2>=0.3.5',
        'scikit-learn>=0.21.2',
        'statsmodels>=0.8.0',
        'termcolor>=1.1.0',
        'powerlaw>=1.4.6',
        'flask==1.0.3',
        'markov-clustering>=0.0.6.dev0',
        'fastcluster>=1.1.25',
        'bcolz>=1.2.1',
        'psutil>=5.6.3',
        'odo>=0.5.0',
        'blaze>=0.10.1'
    ],
    extras_require={
        'docs' : [
            'ipython>=6.5.0',
            'matplotlib>=2.2.3',
            'numpydoc',
            'sphinx_materialdesign_theme',
            'sphinx_rtd_theme',
            'sphinxcontrib-programoutput'
        ]
    },
    dependency_links = [
        #'git+https://github.com/LinkageIO/Minus80'
        #'git+https://github.com/rogerbinns/apsw'
    ],
    include_package_data=True,
    author = 'Rob Schaefer',
    author_email = 'rob@linkage.io',
    description = 'Library for Co-Analysis of Molecular Componenets.',
    license = "Copyright Linkage Analytics 2017, Available under the MIT License",
    url = 'https://github.com/schae234/camoco'
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(
    name='social',
    version='0.2.9',
    description='Django app for easily including a social content api.',
    author='MadeinHaus',
    author_email='cms-admin@madeinhaus.com',
    url='https://github.com/MadeInHaus/django-social',
    packages=find_packages(),
    include_package_data=True,
    install_requires=['twython', 'gevent==0.13.8', 'celery==3.0.12',
                      'django-celery==3.0.11', 'feedparser==5.1.3',
                      'beautifulsoup4==4.1.3', 'requests==1.2.3', 'django-taggit==0.12',],
    zip_safe=False,
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Framework :: Django',
    ]
)
<commit_msg>1.7 bump for taggit<commit_after>from setuptools import setup, find_packages

setup(
    name='social',
    version='0.2.9',
    description='Django app for easily including a social content api.',
    author='MadeinHaus',
    author_email='cms-admin@madeinhaus.com',
    url='https://github.com/MadeInHaus/django-social',
    packages=find_packages(),
    include_package_data=True,
    install_requires=['twython', 'gevent==0.13.8', 'celery==3.0.12',
                      'django-celery==3.0.11', 'feedparser==5.1.3',
                      'beautifulsoup4==4.1.3', 'requests==1.2.3', 'django-taggit==0.12.2',],
    zip_safe=False,
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Framework :: Django',
    ]
)
<|endoftext|>


<commit_before># coding=utf-8
from setuptools import setup, find_packages

setup(
    name="tinydb",
    version="1.4.0",
    packages=find_packages(),

    # development metadata
    zip_safe=True,

    # metadata for upload to PyPI
    author="Markus Siemens",
    author_email="markus@m-siemens.de",
    description="TinyDB is a tiny, document oriented database optimized for "
                "your happiness :)",
    license="MIT",
    keywords="database nosql",
    url="https://github.com/msiemens/tinydb",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: MIT License",
        "Topic :: Database",
        "Topic :: Database :: Database Engines/Servers",
        "Topic :: Utilities",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Operating System :: OS Independent"
    ],

    long_description=open('README.rst', 'r').read(),
)
<commit_msg>Preparing for 2.0 release<commit_after># coding=utf-8
from setuptools import setup, find_packages

setup(
    name="tinydb",
    version="2.0.0",
    packages=find_packages(),

    # development metadata
    zip_safe=True,

    # metadata for upload to PyPI
    author="Markus Siemens",
    author_email="markus@m-siemens.de",
    description="TinyDB is a tiny, document oriented database optimized for "
                "your happiness :)",
    license="MIT",
    keywords="database nosql",
    url="https://github.com/msiemens/tinydb",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: MIT License",
        "Topic :: Database",
        "Topic :: Database :: Database Engines/Servers",
        "Topic :: Utilities",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Operating System :: OS Independent"
    ],

    long_description=open('README.rst', 'r').read(),
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
from distutils.core import setup
setup(
  name = 'nolds',
  packages = ['nolds'],
  version = '0.1.0',
  description = 'Nonlinear measures for dynamical systems (based on one-dimensional time series)',
  author = 'Christopher Schölzel',
  author_email = 'christopher.schoelzel@gmx.net',
  url = 'https://github.com/CSchoel/nolds',
  download_url = 'https://github.com/CSchoel/nolds/tarball/0.1.0',
  keywords = [
    'nonlinear', 'dynamical system', 'chaos',
    'lyapunov', 'hurst', 'hurst exponent', 'rescaled range', 'DFA',
    'detrended fluctuation analysis', 'sample entropy', 'correlation dimension'],
  classifiers = [],
)
<commit_msg>uses setuptools instead of old distutils<commit_after># -*- coding: utf-8 -*-
from setuptools import setup
setup(
  name = 'nolds',
  packages = ['nolds'],
  version = '0.1.0',
  description = 'Nonlinear measures for dynamical systems (based on one-dimensional time series)',
  author = 'Christopher Schölzel',
  author_email = 'christopher.schoelzel@gmx.net',
  url = 'https://github.com/CSchoel/nolds',
  download_url = 'https://github.com/CSchoel/nolds/tarball/0.1.0',
  keywords = [
    'nonlinear', 'dynamical system', 'chaos',
    'lyapunov', 'hurst', 'hurst exponent', 'rescaled range', 'DFA',
    'detrended fluctuation analysis', 'sample entropy', 'correlation dimension'],
  classifiers = [],
)
<|endoftext|>