<commit_before># This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

import os
import platform
import subprocess
import sys
from distutils.command.build import build

import pkg_resources

from setuptools import find_packages, setup
from setuptools.command.install import install
from setuptools.command.test import test

base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")

# When executing the setup.py, we need to be able to import ourselves, this
# means that we need to add the src/ directory to the sys.path.
sys.path.insert(0, src_dir)

about = {}
with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f:
    exec(f.read(), about)

VECTORS_DEPENDENCY = "cryptography_vectors=={0}".format(about['__version__'])

requirements = [
    "pyasn1",
    "six>=1.4.1",
    "setuptools"
]

if sys.version_info < (3, 4):
    requirements.append("enum34")

if sys.version_info < (3, 3):
    requirements.append("ipaddress")

if platform.python_implementation() != "PyPy":
    requirements.append("cffi>=0.8")

# If you add a new dep here you probably need to add it in the tox.ini as well
test_requirements = [
    "pytest",
    "pretend",
    "iso8601",
]

# If there's no vectors locally that probably means we are in a tarball and
# need to go and get the matching vectors package from PyPi
if not os.path.exists(os.path.join(base_dir, "vectors/setup.py")):
    test_requirements.append(VECTORS_DEPENDENCY)

def cc_is_available():
    return sys.platform == "darwin" and list(map(
        int, platform.mac_ver()[0].split("."))) >= [10, 8, 0]

backends = [
    "openssl = cryptography.hazmat.backends.openssl:backend"
]

if cc_is_available():
    backends.append(
        "commoncrypto = cryptography.hazmat.backends.commoncrypto:backend",
    )

def get_ext_modules():
    from cryptography.hazmat.bindings.commoncrypto.binding import (
        Binding as CommonCryptoBinding
    )
    from cryptography.hazmat.bindings.openssl.binding import (
        Binding as OpenSSLBinding
    )
    from cryptography.hazmat.primitives import constant_time, padding

    ext_modules = [
        OpenSSLBinding.ffi.verifier.get_extension(),
        constant_time._ffi.verifier.get_extension(),
        padding._ffi.verifier.get_extension()
    ]
    if cc_is_available():
        ext_modules.append(CommonCryptoBinding.ffi.verifier.get_extension())
    return ext_modules

class CFFIBuild(build):
    """
    This class exists, instead of just providing ``ext_modules=[...]`` directly
    in ``setup()`` because importing cryptography requires we have several
    packages installed first.

    By doing the imports here we ensure that packages listed in
    ``setup_requires`` are already installed.
    """

    def finalize_options(self):
        self.distribution.ext_modules = get_ext_modules()
        build.finalize_options(self)

class CFFIInstall(install):
    """
    As a consequence of CFFIBuild and it's late addition of ext_modules, we
    need the equivalent for the ``install`` command to install into platlib
    install-dir rather than purelib.
    """

    def finalize_options(self):
        self.distribution.ext_modules = get_ext_modules()
        install.finalize_options(self)

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

        # This means there's a vectors/ folder with the package in here.
        # cd into it, install the vectors package and then refresh sys.path
        if VECTORS_DEPENDENCY not in test_requirements:
            subprocess.check_call(
                [sys.executable, "setup.py", "install"], cwd="vectors"
            )
            pkg_resources.get_distribution("cryptography_vectors").activate()

    def run_tests(self):
        # Import here because in module scope the eggs are not loaded.
        import pytest
        test_args = [os.path.join(base_dir, "tests")]
        errno = pytest.main(test_args)
        sys.exit(errno)

def keywords_with_side_effects(argv):
    """
    Get a dictionary with setup keywords that (can) have side effects.

    :param argv: A list of strings with command line arguments.
    :returns: A dictionary with keyword arguments for the ``setup()`` function.

    This setup.py script uses the setuptools 'setup_requires' feature because
    this is required by the cffi package to compile extension modules. The
    purpose of ``keywords_with_side_effects()`` is to avoid triggering the cffi
    build process as a result of setup.py invocations that don't need the cffi
    module to be built (setup.py serves the dual purpose of exposing package
    metadata).

    All of the options listed by ``python setup.py --help`` that print
    information should be recognized here. The commands ``clean``,
    ``egg_info``, ``register``, ``sdist`` and ``upload`` are also recognized.
    Any combination of these options and commands is also supported.

    This function was originally based on the `setup.py script`_ of SciPy (see
    also the discussion in `pip issue #25`_).

    .. _pip issue #25: https://github.com/pypa/pip/issues/25
    .. _setup.py script: https://github.com/scipy/scipy/blob/master/setup.py
    """
    no_setup_requires_arguments = (
        '-h', '--help',
        '-n', '--dry-run',
        '-q', '--quiet',
        '-v', '--verbose',
        '-V', '--version',
        '--author',
        '--author-email',
        '--classifiers',
        '--contact',
        '--contact-email',
        '--description',
        '--egg-base',
        '--fullname',
        '--help-commands',
        '--keywords',
        '--licence',
        '--license',
        '--long-description',
        '--maintainer',
        '--maintainer-email',
        '--name',
        '--no-user-cfg',
        '--obsoletes',
        '--platforms',
        '--provides',
        '--requires',
        '--url',
        'clean',
        'egg_info',
        'register',
        'sdist',
        'upload',
    )

    def is_short_option(argument):
        """Check whether a command line argument is a short option."""
        return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-'

    def expand_short_options(argument):
        """Expand combined short options into canonical short options."""
        return ('-' + char for char in argument[1:])

    def argument_without_setup_requirements(argv, i):
        """Check whether a command line argument needs setup requirements."""
        if argv[i] in no_setup_requires_arguments:
            # Simple case: An argument which is either an option or a command
            # which doesn't need setup requirements.
            return True
        elif (is_short_option(argv[i]) and
              all(option in no_setup_requires_arguments
                  for option in expand_short_options(argv[i]))):
            # Not so simple case: Combined short options none of which need
            # setup requirements.
            return True
        elif argv[i - 1:i] == ['--egg-base']:
            # Tricky case: --egg-info takes an argument which should not make
            # us use setup_requires (defeating the purpose of this code).
            return True
        else:
            return False

    if all(argument_without_setup_requirements(argv, i)
           for i in range(1, len(argv))):
        return {
            "cmdclass": {
                "build": DummyCFFIBuild,
                "install": DummyCFFIInstall,
                "test": DummyPyTest,
            }
        }
    else:
        return {
            "setup_requires": requirements,
            "cmdclass": {
                "build": CFFIBuild,
                "install": CFFIInstall,
                "test": PyTest,
            }
        }

setup_requires_error = ("Requested setup command that needs 'setup_requires' "
                        "while command line arguments implied a side effect "
                        "free command or option.")

class DummyCFFIBuild(build):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py build`` as
    one of the 'side effect free' commands or options.
    """

    def run(self):
        raise RuntimeError(setup_requires_error)

class DummyCFFIInstall(install):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py install``
    as one of the 'side effect free' commands or options.
    """

    def run(self):
        raise RuntimeError(setup_requires_error)

class DummyPyTest(test):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py test`` as
    one of the 'side effect free' commands or options.
    """

    def run_tests(self):
        raise RuntimeError(setup_requires_error)

with open(os.path.join(base_dir, "README.rst")) as f:
    long_description = f.read()

setup(
    name=about["__title__"],
    version=about["__version__"],

    description=about["__summary__"],
    long_description=long_description,
    license=about["__license__"],
    url=about["__uri__"],

    author=about["__author__"],
    author_email=about["__email__"],

    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "License :: OSI Approved :: BSD License",
        "Natural Language :: English",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: BSD",
        "Operating System :: POSIX :: Linux",
        "Operating System :: Microsoft :: Windows",
        "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 :: Security :: Cryptography",
    ],

    package_dir={"": "src"},
    packages=find_packages(where="src", exclude=["tests", "tests.*"]),
    include_package_data=True,

    install_requires=requirements,
    tests_require=test_requirements,

    # for cffi
    zip_safe=False,
    ext_package="cryptography",
    entry_points={
        "cryptography.backends": backends,
    },
    **keywords_with_side_effects(sys.argv)
)
<commit_msg>remove python 3.2 from the classifiers<commit_after># This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

import os
import platform
import subprocess
import sys
from distutils.command.build import build

import pkg_resources

from setuptools import find_packages, setup
from setuptools.command.install import install
from setuptools.command.test import test

base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")

# When executing the setup.py, we need to be able to import ourselves, this
# means that we need to add the src/ directory to the sys.path.
sys.path.insert(0, src_dir)

about = {}
with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f:
    exec(f.read(), about)

VECTORS_DEPENDENCY = "cryptography_vectors=={0}".format(about['__version__'])

requirements = [
    "pyasn1",
    "six>=1.4.1",
    "setuptools"
]

if sys.version_info < (3, 4):
    requirements.append("enum34")

if sys.version_info < (3, 3):
    requirements.append("ipaddress")

if platform.python_implementation() != "PyPy":
    requirements.append("cffi>=0.8")

# If you add a new dep here you probably need to add it in the tox.ini as well
test_requirements = [
    "pytest",
    "pretend",
    "iso8601",
]

# If there's no vectors locally that probably means we are in a tarball and
# need to go and get the matching vectors package from PyPi
if not os.path.exists(os.path.join(base_dir, "vectors/setup.py")):
    test_requirements.append(VECTORS_DEPENDENCY)

def cc_is_available():
    return sys.platform == "darwin" and list(map(
        int, platform.mac_ver()[0].split("."))) >= [10, 8, 0]

backends = [
    "openssl = cryptography.hazmat.backends.openssl:backend"
]

if cc_is_available():
    backends.append(
        "commoncrypto = cryptography.hazmat.backends.commoncrypto:backend",
    )

def get_ext_modules():
    from cryptography.hazmat.bindings.commoncrypto.binding import (
        Binding as CommonCryptoBinding
    )
    from cryptography.hazmat.bindings.openssl.binding import (
        Binding as OpenSSLBinding
    )
    from cryptography.hazmat.primitives import constant_time, padding

    ext_modules = [
        OpenSSLBinding.ffi.verifier.get_extension(),
        constant_time._ffi.verifier.get_extension(),
        padding._ffi.verifier.get_extension()
    ]
    if cc_is_available():
        ext_modules.append(CommonCryptoBinding.ffi.verifier.get_extension())
    return ext_modules

class CFFIBuild(build):
    """
    This class exists, instead of just providing ``ext_modules=[...]`` directly
    in ``setup()`` because importing cryptography requires we have several
    packages installed first.

    By doing the imports here we ensure that packages listed in
    ``setup_requires`` are already installed.
    """

    def finalize_options(self):
        self.distribution.ext_modules = get_ext_modules()
        build.finalize_options(self)

class CFFIInstall(install):
    """
    As a consequence of CFFIBuild and it's late addition of ext_modules, we
    need the equivalent for the ``install`` command to install into platlib
    install-dir rather than purelib.
    """

    def finalize_options(self):
        self.distribution.ext_modules = get_ext_modules()
        install.finalize_options(self)

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

        # This means there's a vectors/ folder with the package in here.
        # cd into it, install the vectors package and then refresh sys.path
        if VECTORS_DEPENDENCY not in test_requirements:
            subprocess.check_call(
                [sys.executable, "setup.py", "install"], cwd="vectors"
            )
            pkg_resources.get_distribution("cryptography_vectors").activate()

    def run_tests(self):
        # Import here because in module scope the eggs are not loaded.
        import pytest
        test_args = [os.path.join(base_dir, "tests")]
        errno = pytest.main(test_args)
        sys.exit(errno)

def keywords_with_side_effects(argv):
    """
    Get a dictionary with setup keywords that (can) have side effects.

    :param argv: A list of strings with command line arguments.
    :returns: A dictionary with keyword arguments for the ``setup()`` function.

    This setup.py script uses the setuptools 'setup_requires' feature because
    this is required by the cffi package to compile extension modules. The
    purpose of ``keywords_with_side_effects()`` is to avoid triggering the cffi
    build process as a result of setup.py invocations that don't need the cffi
    module to be built (setup.py serves the dual purpose of exposing package
    metadata).

    All of the options listed by ``python setup.py --help`` that print
    information should be recognized here. The commands ``clean``,
    ``egg_info``, ``register``, ``sdist`` and ``upload`` are also recognized.
    Any combination of these options and commands is also supported.

    This function was originally based on the `setup.py script`_ of SciPy (see
    also the discussion in `pip issue #25`_).

    .. _pip issue #25: https://github.com/pypa/pip/issues/25
    .. _setup.py script: https://github.com/scipy/scipy/blob/master/setup.py
    """
    no_setup_requires_arguments = (
        '-h', '--help',
        '-n', '--dry-run',
        '-q', '--quiet',
        '-v', '--verbose',
        '-V', '--version',
        '--author',
        '--author-email',
        '--classifiers',
        '--contact',
        '--contact-email',
        '--description',
        '--egg-base',
        '--fullname',
        '--help-commands',
        '--keywords',
        '--licence',
        '--license',
        '--long-description',
        '--maintainer',
        '--maintainer-email',
        '--name',
        '--no-user-cfg',
        '--obsoletes',
        '--platforms',
        '--provides',
        '--requires',
        '--url',
        'clean',
        'egg_info',
        'register',
        'sdist',
        'upload',
    )

    def is_short_option(argument):
        """Check whether a command line argument is a short option."""
        return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-'

    def expand_short_options(argument):
        """Expand combined short options into canonical short options."""
        return ('-' + char for char in argument[1:])

    def argument_without_setup_requirements(argv, i):
        """Check whether a command line argument needs setup requirements."""
        if argv[i] in no_setup_requires_arguments:
            # Simple case: An argument which is either an option or a command
            # which doesn't need setup requirements.
            return True
        elif (is_short_option(argv[i]) and
              all(option in no_setup_requires_arguments
                  for option in expand_short_options(argv[i]))):
            # Not so simple case: Combined short options none of which need
            # setup requirements.
            return True
        elif argv[i - 1:i] == ['--egg-base']:
            # Tricky case: --egg-info takes an argument which should not make
            # us use setup_requires (defeating the purpose of this code).
            return True
        else:
            return False

    if all(argument_without_setup_requirements(argv, i)
           for i in range(1, len(argv))):
        return {
            "cmdclass": {
                "build": DummyCFFIBuild,
                "install": DummyCFFIInstall,
                "test": DummyPyTest,
            }
        }
    else:
        return {
            "setup_requires": requirements,
            "cmdclass": {
                "build": CFFIBuild,
                "install": CFFIInstall,
                "test": PyTest,
            }
        }

setup_requires_error = ("Requested setup command that needs 'setup_requires' "
                        "while command line arguments implied a side effect "
                        "free command or option.")

class DummyCFFIBuild(build):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py build`` as
    one of the 'side effect free' commands or options.
    """

    def run(self):
        raise RuntimeError(setup_requires_error)

class DummyCFFIInstall(install):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py install``
    as one of the 'side effect free' commands or options.
    """

    def run(self):
        raise RuntimeError(setup_requires_error)

class DummyPyTest(test):
    """
    This class makes it very obvious when ``keywords_with_side_effects()`` has
    incorrectly interpreted the command line arguments to ``setup.py test`` as
    one of the 'side effect free' commands or options.
    """

    def run_tests(self):
        raise RuntimeError(setup_requires_error)

with open(os.path.join(base_dir, "README.rst")) as f:
    long_description = f.read()

setup(
    name=about["__title__"],
    version=about["__version__"],

    description=about["__summary__"],
    long_description=long_description,
    license=about["__license__"],
    url=about["__uri__"],

    author=about["__author__"],
    author_email=about["__email__"],

    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "License :: OSI Approved :: BSD License",
        "Natural Language :: English",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: BSD",
        "Operating System :: POSIX :: Linux",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Topic :: Security :: Cryptography",
    ],

    package_dir={"": "src"},
    packages=find_packages(where="src", exclude=["tests", "tests.*"]),
    include_package_data=True,

    install_requires=requirements,
    tests_require=test_requirements,

    # for cffi
    zip_safe=False,
    ext_package="cryptography",
    entry_points={
        "cryptography.backends": backends,
    },
    **keywords_with_side_effects(sys.argv)
)
<|endoftext|>


<commit_before>"""\
Gaphas is a MVC canvas that uses Cairo_ for rendering. One of the nicer things
of this widget is that the user (model) is not bothered with bounding box
calculations: this is all done through Cairo.

Some more features:

- Each item has it's own separate coordinate space (easy when items are
  rotated).
- Items on the canvas can be connected to each other. Connections are
  maintained by a linear constraint solver.
- Multiple views on one Canvas.
- What is drawn is determined by Painters. Multiple painters can be used and
  painters can be chained.
- User interaction is handled by Tools. Tools can be chained.
- Versatile undo/redo system

GTK+ and PyGTK_ are required.

.. _Cairo: http://cairographics.org/
.. _PyGTK: http://www.pygtk.org/
"""

VERSION = '0.4.0'

from ez_setup import use_setuptools

use_setuptools()

from setuptools import setup, find_packages
from distutils.cmd import Command

class build_doc(Command):
    description = 'Builds the documentation'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        epydoc_conf = 'epydoc.conf'

        try:
            import sys
            from epydoc import cli
            old_argv = sys.argv[1:]
            sys.argv[1:] = [
                '--config=%s' % epydoc_conf,
                '--no-private', # epydoc bug, not read from config
                '--simple-term',
                '--verbose'
            ]
            cli.cli()
            sys.argv[1:] = old_argv

        except ImportError:
            print 'epydoc not installed, skipping API documentation.'

setup(
    name='gaphas',
    version=VERSION,
    description='Gaphas is a GTK+ based diagramming widget',
    long_description=__doc__,

    classifiers=[
    'Development Status :: 4 - Beta',
    'Environment :: X11 Applications :: GTK',
    'Intended Audience :: Developers',
    'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
    'Programming Language :: Python',
    'Topic :: Software Development :: Libraries :: Python Modules',
    ],

    keywords='',

    author="Arjan J. Molenaar",
    author_email='arjanmol@users.sourceforge.net',

    url='http://gaphor.devjavu.com/wiki/Subprojects/Gaphas',

    #download_url='http://cheeseshop.python.org/',

    license='GNU Library General Public License (LGPL, see COPYING)',

    packages=find_packages(exclude=['ez_setup']),

    setup_requires = 'nose >= 0.10.4',

    install_requires=[
     'decorator >= 3.0.0',
#    'PyGTK >= 2.8.0',
#    'cairo >= 1.8.2'
    ],

    zip_safe=False,

    package_data={
    # -*- package_data: -*-
    },

    entry_points = {
    },

    test_suite = 'nose.collector',

    cmdclass={'build_doc': build_doc },
    )

<commit_msg>Added git tooling to setup script.<commit_after>"""\
Gaphas is a MVC canvas that uses Cairo_ for rendering. One of the nicer things
of this widget is that the user (model) is not bothered with bounding box
calculations: this is all done through Cairo.

Some more features:

- Each item has it's own separate coordinate space (easy when items are
  rotated).
- Items on the canvas can be connected to each other. Connections are
  maintained by a linear constraint solver.
- Multiple views on one Canvas.
- What is drawn is determined by Painters. Multiple painters can be used and
  painters can be chained.
- User interaction is handled by Tools. Tools can be chained.
- Versatile undo/redo system

GTK+ and PyGTK_ are required.

.. _Cairo: http://cairographics.org/
.. _PyGTK: http://www.pygtk.org/
"""

VERSION = '0.4.0'

from ez_setup import use_setuptools

use_setuptools()

from setuptools import setup, find_packages
from distutils.cmd import Command

class build_doc(Command):
    description = 'Builds the documentation'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        epydoc_conf = 'epydoc.conf'

        try:
            import sys
            from epydoc import cli
            old_argv = sys.argv[1:]
            sys.argv[1:] = [
                '--config=%s' % epydoc_conf,
                '--no-private', # epydoc bug, not read from config
                '--simple-term',
                '--verbose'
            ]
            cli.cli()
            sys.argv[1:] = old_argv

        except ImportError:
            print 'epydoc not installed, skipping API documentation.'

setup(
    name='gaphas',
    version=VERSION,
    description='Gaphas is a GTK+ based diagramming widget',
    long_description=__doc__,

    classifiers=[
    'Development Status :: 4 - Beta',
    'Environment :: X11 Applications :: GTK',
    'Intended Audience :: Developers',
    'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
    'Programming Language :: Python',
    'Topic :: Software Development :: Libraries :: Python Modules',
    ],

    keywords='',

    author="Arjan J. Molenaar",
    author_email='arjanmol@users.sourceforge.net',

    url='http://gaphor.devjavu.com/wiki/Subprojects/Gaphas',

    #download_url='http://cheeseshop.python.org/',

    license='GNU Library General Public License (LGPL, see COPYING)',

    packages=find_packages(exclude=['ez_setup']),

    setup_requires = [
     'nose >= 0.10.4',
     'setuptools-git >= 0.3.4'
    ],

    install_requires=[
     'decorator >= 3.0.0',
#    'PyGTK >= 2.8.0',
#    'cairo >= 1.8.2'
    ],

    zip_safe=False,

    package_data={
    # -*- package_data: -*-
    },

    entry_points = {
    },

    test_suite = 'nose.collector',

    cmdclass={'build_doc': build_doc },
    )

<|endoftext|>


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

import io
import os
import sys
from shutil import rmtree

from setuptools import find_packages, setup, Command

# Meta-data
NAME = "emission"
DESCRIPTION = """Emission calculator library to calculate total emissions
given a start and stop position. Various possible routes will be presented
sorted after the least pollutant route.

Vehicle types will be: personal cars, busses and trailers of different sizes.

NOTE that this extension only works for Norway, since we are using the
NPRA (Norwegian Public Roads Administration) road database https://www.vegvesen.no/nvdb/apidokumentasjon/
"""
URL = "https://github.com/NPRA/EmissionCalculatorLib"
EMAIL = "asbjorn@fellinghaug.com"
AUTHOR = """Juraj Cirbus <Juraj.Cirbus@norconsult.com>,
Tomas Levin <tomas.levin@vegvesen.no>,
Asbjørn Alexander Fellinghaug <asbjorn.fellinghaug@webstep.no>"""

REQUIRED = [
    'numpy'
]

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

with io.open(os.path.join(here, 'README.rst'), encoding="utf-8") as f:
    long_description = '\n' + f.read()

about = {}
with open(os.path.join(here, NAME, '__version__.py')) as f:
    exec(f.read(), about)

class PublishCommand(Command):
    """Support setup.py publish
    """

    description = 'Build and publish the package'
    user_options = []

    @staticmethod
    def status(s):
        """Prints things in bold"""
        print('\033[1m{0}\033[0m'.format(s))

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        try:
            self.status('Removing previous builds...')
            rmtree(os.path.join(here, 'dist'))
        except OSError:
            pass

        self.status('Building Source and Wheel (univeral) distribution...')
        os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))

        self.status('Uploading the package to PyPi via Twine...')
        # os.system('twine upload dist/*')
        sys.exit()

setup(
    name=NAME,
    version=about['__version__'],
    description=DESCRIPTION,
    long_description=long_description,
    author=AUTHOR,
    author_email=EMAIL,
    url=URL,
    packages=['emission'],
    install_requires=REQUIRED,
    include_package_data=True,
    license='BSD',
    classifiers=[
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python',
        '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',
        'Programming Language :: Implementation :: CPython',
    ],
    # $ setup.py publish support
    cmdclass={
        'publish': PublishCommand,
    },
)
<commit_msg>Changed classifiers, also a shorter description since we already include Readme.rst. Trying to include the json.gz data files.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import io
import os
import sys
from shutil import rmtree

from setuptools import find_packages, setup, Command

# Meta-data
NAME = "emission"
DESCRIPTION = "Emission calculator library"
DESCRIPTION_OLD = """Emission calculator library to calculate total emissions
given a start and stop position. Various possible routes will be presented
sorted after the least pollutant route.

Vehicle types will be: personal cars, busses and trailers of different sizes.

NOTE that this extension only works for Norway, since we are using the
NPRA (Norwegian Public Roads Administration) road database https://www.vegvesen.no/nvdb/apidokumentasjon/
"""
URL = "https://github.com/NPRA/EmissionCalculatorLib"
EMAIL = "asbjorn@fellinghaug.com"
AUTHOR = """Juraj Cirbus <Juraj.Cirbus@norconsult.com>, Tomas Levin <tomas.levin@vegvesen.no>, Asbjørn Alexander Fellinghaug <asbjorn.fellinghaug@webstep.no>"""

REQUIRED = [
    'numpy'
]

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

with io.open(os.path.join(here, 'README.rst'), encoding="utf-8") as f:
    long_description = '\n' + f.read()

about = {}
with open(os.path.join(here, NAME, '__version__.py')) as f:
    exec(f.read(), about)

class PublishCommand(Command):
    """Support setup.py publish
    """

    description = 'Build and publish the package'
    user_options = []

    @staticmethod
    def status(s):
        """Prints things in bold"""
        print('\033[1m{0}\033[0m'.format(s))

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        try:
            self.status('Removing previous builds...')
            rmtree(os.path.join(here, 'dist'))
        except OSError:
            pass

        self.status('Building Source and Wheel (univeral) distribution...')
        os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))

        self.status('Uploading the package to PyPi via Twine...')
        os.system('twine upload --repository-url https://test.pypi.org/legacy/ dist/*')
        #os.system('twine upload dist/*')
        #sys.exit()

print("Version: {}".format(about['__version__']))

setup(
    name=NAME,
    version=about['__version__'],
    description=DESCRIPTION,
    long_description=long_description,
    keywords="Emission calculation library using the NVDB (Norway)",
    author=AUTHOR,
    author_email=EMAIL,
    url=URL,
    packages=['emission'],
    install_requires=REQUIRED,
    package_data={
        'emission': ['*.json.gz'],
    },
    include_package_data=True,
    license='BSD',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python',
        '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',
        'Programming Language :: Python :: Implementation :: CPython',
    ],
    # $ setup.py publish support
    cmdclass={
        'publish': PublishCommand,
    },
)
<|endoftext|>


<commit_before>import os
from setuptools import setup

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

setup(
    name="feedinlib",
    version="0.1.0rc2",
    description="Creating time series from pv or wind power plants.",
    url="http://github.com/oemof/feedinlib",
    author="oemof developer group",
    author_email="windpowerlib@rl-institut.de",
    license="MIT",
    packages=["feedinlib"],
    long_description=read("README.rst"),
    long_description_content_type="text/x-rst",
    zip_safe=False,
    install_requires=[
        "cdsapi >= 0.1.4",
        "geopandas",
        "numpy >= 1.7.0",
        "oedialect >= 0.0.6.dev0",
        "open_FRED-cli",
        "pandas >= 0.13.1",
        "pvlib >= 0.7.0",
        "tables",
        "windpowerlib >= 0.2.0",
        "xarray >= 0.12.0",
    ],
    extras_require={
        "dev": [
            "jupyter",
            "nbformat",
            "punch.py",
            "pytest",
            "sphinx_rtd_theme",
        ],
        "examples": ["jupyter"],
    },
)
<commit_msg>Add tables package to run pvlib modelchain with default parameters<commit_after>import os
from setuptools import setup

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

setup(
    name="feedinlib",
    version="0.1.0rc2",
    description="Creating time series from pv or wind power plants.",
    url="http://github.com/oemof/feedinlib",
    author="oemof developer group",
    author_email="windpowerlib@rl-institut.de",
    license="MIT",
    packages=["feedinlib"],
    long_description=read("README.rst"),
    long_description_content_type="text/x-rst",
    zip_safe=False,
    install_requires=[
        "cdsapi >= 0.1.4",
        "geopandas",
        "numpy >= 1.7.0",
        "oedialect >= 0.0.6.dev0",
        "open_FRED-cli",
        "pandas >= 0.13.1",
        "pvlib >= 0.7.0",
        "tables",
        "windpowerlib >= 0.2.0",
        "xarray >= 0.12.0",
        "tables"
    ],
    extras_require={
        "dev": [
            "jupyter",
            "nbformat",
            "punch.py",
            "pytest",
            "sphinx_rtd_theme",
        ],
        "examples": ["jupyter"],
    },
)
<|endoftext|>


<commit_before>"""
~~~~~~~~~~~
Dictalchemy
~~~~~~~~~~~

Contains asdict() and fromdict() methods that will work on SQLAlchemy
declarative models.

Read more in the source or on github
<https://github.com/danielholmstrom/dictalchemy>.
"""

import os
import sys
from setuptools import find_packages, setup

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

# Requirements for the package
install_requires = [
    'SQLAlchemy>=0.9.4',
]

# Requirement for running tests
test_requires = install_requires

extra = {}
if sys.version_info >= (3,):
    extra['use_2to3'] = True

setup(name='dictalchemy',
      version='0.1.2.5',
      description="Contains asdict and fromdict methods for SQL-Alchemy "
      "declarative models",
      long_description=README,
      url='http://github.com/danielholmstrom/dictalchemy/',
      license='MIT',
      author='Daniel Holmstrom',
      author_email='holmstrom.daniel@gmail.com',
      platforms='any',
      classifiers=['Development Status :: 4 - Beta',
                   'License :: OSI Approved :: MIT License',
                   'Environment :: Web Environment',
                   'Intended Audience :: Developers',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
                   'Topic :: Software Development :: '
                   'Libraries :: Python Modules'],
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      install_requires=install_requires,
      tests_require=test_requires,
      test_suite='dictalchemy',
      **extra
      )
<commit_msg>PEP-8<commit_after>"""
~~~~~~~~~~~
Dictalchemy
~~~~~~~~~~~

Contains asdict() and fromdict() methods that will work on SQLAlchemy
declarative models.

Read more in the source or on github
<https://github.com/danielholmstrom/dictalchemy>.
"""

import os
import sys
from setuptools import find_packages, setup

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

# Requirements for the package
install_requires = [
    'SQLAlchemy>=0.9.4',
]

# Requirement for running tests
test_requires = install_requires

extra = {}
if sys.version_info >= (3,):
    extra['use_2to3'] = True

setup(name='dictalchemy',
      version='0.1.2.5',
      description="Contains asdict and fromdict methods for SQL-Alchemy "
      "declarative models",
      long_description=README,
      url='http://github.com/danielholmstrom/dictalchemy/',
      license='MIT',
      author='Daniel Holmstrom',
      author_email='holmstrom.daniel@gmail.com',
      platforms='any',
      classifiers=['Development Status :: 4 - Beta',
                   'License :: OSI Approved :: MIT License',
                   'Environment :: Web Environment',
                   'Intended Audience :: Developers',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
                   'Topic :: Software Development :: '
                   'Libraries :: Python Modules'],
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      install_requires=install_requires,
      tests_require=test_requires,
      test_suite='dictalchemy',
      **extra)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

from chained_selectbox import __version__

github_url = 'https://github.com/s-block/django-nested-inline'
long_desc = open('README.md').read()

setup(
    name='django-nested-inline',
    version='.'.join(str(v) for v in __version__),
    description='Recursive nesting of inline forms for Django Admin',
    long_description=long_desc,
    url=github_url,
    author='Josh Rowe',
    author_email='josh@s-block.com',
    packages=find_packages(exclude=['tests']),
    include_package_data=True,
    license='MIT License',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
)<commit_msg>[issue #3] update setup file<commit_after>from setuptools import setup, find_packages

from nested_inline import __version__

github_url = 'https://github.com/s-block/django-nested-inline'
long_desc = open('README.md').read()

setup(
    name='django-nested-inline',
    version='.'.join(str(v) for v in __version__),
    description='Recursive nesting of inline forms for Django Admin',
    long_description=long_desc,
    url=github_url,
    author='Josh Rowe',
    author_email='josh@s-block.com',
    packages=find_packages(exclude=['tests']),
    include_package_data=True,
    license='MIT License',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
)
<|endoftext|>


<commit_before>import os
from setuptools import setup

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

setup(
    name='pck',
    version='0.1',
    packages=['pck'],
    url='https://github.com/hirokiky/pck',
    license='MIT',
    author='hirokiky',
    author_email='hirokiky@gmail.com',
    description='A package development framework',
    long_description=README + '\n\n' + CHANGES,
    classifiers=[
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: MIT License",
        "Environment :: Web Environment",
    ],
    install_requires=[
    ],
    include_package_data=True,
    zip_safe=False,
    entry_points={
        'console_scripts': [
            "pck=pck.commands:main",
        ]
    }
)
<commit_msg>Initial<commit_after>import os
from setuptools import setup

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

setup(
    name='pck',
    version='0.1',
    packages=['pck'],
    url='https://github.com/hirokiky/pck',
    license='MIT',
    author='hirokiky',
    author_email='hirokiky@gmail.com',
    description='A package development framework',
    long_description=README + '\n\n' + CHANGES,
    classifiers=[
        "Development Status :: 1 - Planning",
        "License :: OSI Approved :: MIT License",
        "Environment :: Console",
        "Topic :: Software Development",
    ],
    install_requires=[
    ],
    include_package_data=True,
    zip_safe=False,
    entry_points={
        'console_scripts': [
            "pck=pck.commands:main",
        ]
    }
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='random-ansible-host',
    version='0.1',
    py_modules=['random_ansible_host'],
    install_requires=[
        'Click',
    ],
    entry_points='''
        [console_scripts]
        rah=random_ansible_host:cli
    ''',
)
<commit_msg>require ansible in setup.py<commit_after>from setuptools import setup

setup(
    name='random-ansible-host',
    version='0.1',
    py_modules=['random_ansible_host'],
    install_requires=[
        'Click',
        'ansible',
    ],
    entry_points='''
        [console_scripts]
        rah=random_ansible_host:cli
    ''',
)
<|endoftext|>


<commit_before>"""
Opinionated CLI for Singularity PAAS
"""
from setuptools import find_packages, setup
try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
    long_description = open('README.md').read()

dependencies = ['click', 'requests', 'tabulate']

setup(
    name='singularity-cli',
    version='0.1.1',
    url='https://github.com/yieldbot/singularity-py',
    license='BSD',
    author='Dave White',
    author_email='dwhite@yieldbot.com',
    description='Opinionated CLI for Singularity PAAS',
    long_description=long_description,
    download_url='https://github.com/yieldbot/singularity-py/tarball/0.1.0',
    packages=find_packages(exclude=['tests']),
    include_package_data=True,
    zip_safe=False,
    platforms='any',
    install_requires=dependencies,
    entry_points={
        'console_scripts': [
            'singularity = singularity.cli:cli',
        ],
    },
    classifiers=[
        # As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
        # 'Development Status :: 1 - Planning',
        # 'Development Status :: 2 - Pre-Alpha',
        # 'Development Status :: 3 - Alpha',
        'Development Status :: 4 - Beta',
        # 'Development Status :: 5 - Production/Stable',
        # 'Development Status :: 6 - Mature',
        # 'Development Status :: 7 - Inactive',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: POSIX',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Unix',
        'Operating System :: Microsoft :: Windows',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)
<commit_msg>bump version for request pause/unpause fix on sync<commit_after>"""
Opinionated CLI for Singularity PAAS
"""
from setuptools import find_packages, setup
try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
    long_description = open('README.md').read()

dependencies = ['click', 'requests', 'tabulate']

setup(
    name='singularity-cli',
    version='0.1.2',
    url='https://github.com/yieldbot/singularity-py',
    license='BSD',
    author='Dave White',
    author_email='dwhite@yieldbot.com',
    description='Opinionated CLI for Singularity PAAS',
    long_description=long_description,
    download_url='https://github.com/yieldbot/singularity-py/tarball/0.1.0',
    packages=find_packages(exclude=['tests']),
    include_package_data=True,
    zip_safe=False,
    platforms='any',
    install_requires=dependencies,
    entry_points={
        'console_scripts': [
            'singularity = singularity.cli:cli',
        ],
    },
    classifiers=[
        # As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
        # 'Development Status :: 1 - Planning',
        # 'Development Status :: 2 - Pre-Alpha',
        # 'Development Status :: 3 - Alpha',
        'Development Status :: 4 - Beta',
        # 'Development Status :: 5 - Production/Stable',
        # 'Development Status :: 6 - Mature',
        # 'Development Status :: 7 - Inactive',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: POSIX',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Unix',
        'Operating System :: Microsoft :: Windows',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)
<|endoftext|>


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

import os
import setuptools

# Enable the option of building/installing Fabric 2.x as "fabric2". This allows
# users migrating from 1.x to 2.x to have both in the same process space and
# migrate piecemeal.
#
# NOTE: this requires some irritating tomfoolery; to wit:
# - the repo has a fabric2/ symlink to fabric/ so that things looking for
# fabric2/<whatever> will find it OK, whether that's code in here or deeper in
# setuptools/wheel/etc
# - wheels do _not_ execute this on install, only on generation, so maintainers
# just build wheels with the env var below turned on, and those wheels install
# 'fabric2' no problem
# - sdists execute this _both_ on package creation _and_ on install, so the env
# var only helps with inbound package metadata; on install by a user, if they
# don't have the env var, they'd end up with errors because this file tries to
# look in fabric/, not fabric2/
# - thus, we use a different test that looks locally to see if only one dir
# is present, and that overrides the env var test.
#
# See also sites/www/installing.txt.

env_wants_v2 = os.environ.get("PACKAGE_AS_FABRIC2", False)

here = os.path.abspath(os.path.dirname(__file__))
fabric2_present = os.path.isdir(os.path.join(here, "fabric2"))
fabric_present = os.path.isdir(os.path.join(here, "fabric"))
only_v2_present = fabric2_present and not fabric_present

package_name = "fabric"
binary_name = "fab"
if env_wants_v2 or only_v2_present:
    package_name = "fabric2"
    binary_name = "fab2"

# Version info -- read without importing
_locals = {}
with open(os.path.join(package_name, "_version.py")) as fp:
    exec(fp.read(), None, _locals)
version = _locals["__version__"]

# Frankenstein long_description: changelog note + README
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://fabfile.org/changelog.html>`_.

{}
""".format(
    open("README.rst").read()
)

setuptools.setup(
    name=package_name,
    version=version,
    description="High level SSH command execution",
    license="BSD",
    long_description=long_description,
    author="Jeff Forcier",
    author_email="jeff@bitprophet.org",
    url="http://fabfile.org",
    install_requires=[
        "invoke>=1.0,<2.0",
        "paramiko>=2.4",
        "cryptography>=1.1",
    ],
    packages=[package_name],
    entry_points={
        "console_scripts": [
            "{} = {}.main:program.run".format(binary_name, package_name)
        ]
    },
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: BSD License",
        "Operating System :: POSIX",
        "Operating System :: Unix",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Software Development",
        "Topic :: Software Development :: Build Tools",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Clustering",
        "Topic :: System :: Software Distribution",
        "Topic :: System :: Systems Administration",
    ],
)
<commit_msg>Better package finding that covers subpackages<commit_after>#!/usr/bin/env python

import os
import setuptools

# Enable the option of building/installing Fabric 2.x as "fabric2". This allows
# users migrating from 1.x to 2.x to have both in the same process space and
# migrate piecemeal.
#
# NOTE: this requires some irritating tomfoolery; to wit:
# - the repo has a fabric2/ symlink to fabric/ so that things looking for
# fabric2/<whatever> will find it OK, whether that's code in here or deeper in
# setuptools/wheel/etc
# - wheels do _not_ execute this on install, only on generation, so maintainers
# just build wheels with the env var below turned on, and those wheels install
# 'fabric2' no problem
# - sdists execute this _both_ on package creation _and_ on install, so the env
# var only helps with inbound package metadata; on install by a user, if they
# don't have the env var, they'd end up with errors because this file tries to
# look in fabric/, not fabric2/
# - thus, we use a different test that looks locally to see if only one dir
# is present, and that overrides the env var test.
#
# See also sites/www/installing.txt.

env_wants_v2 = os.environ.get("PACKAGE_AS_FABRIC2", False)

here = os.path.abspath(os.path.dirname(__file__))
fabric2_present = os.path.isdir(os.path.join(here, "fabric2"))
fabric_present = os.path.isdir(os.path.join(here, "fabric"))
only_v2_present = fabric2_present and not fabric_present

package_name = "fabric"
binary_name = "fab"
if env_wants_v2 or only_v2_present:
    package_name = "fabric2"
    binary_name = "fab2"
packages = setuptools.find_packages(
    include=[package_name, "{}.*".format(package_name)],
)

# Version info -- read without importing
_locals = {}
with open(os.path.join(package_name, "_version.py")) as fp:
    exec(fp.read(), None, _locals)
version = _locals["__version__"]

# Frankenstein long_description: changelog note + README
long_description = """
To find out what's new in this version of Fabric, please see `the changelog
<http://fabfile.org/changelog.html>`_.

{}
""".format(
    open("README.rst").read()
)

setuptools.setup(
    name=package_name,
    version=version,
    description="High level SSH command execution",
    license="BSD",
    long_description=long_description,
    author="Jeff Forcier",
    author_email="jeff@bitprophet.org",
    url="http://fabfile.org",
    install_requires=[
        "invoke>=1.0,<2.0",
        "paramiko>=2.4",
        "cryptography>=1.1",
    ],
    packages=packages,
    entry_points={
        "console_scripts": [
            "{} = {}.main:program.run".format(binary_name, package_name)
        ]
    },
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: BSD License",
        "Operating System :: POSIX",
        "Operating System :: Unix",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Software Development",
        "Topic :: Software Development :: Build Tools",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Clustering",
        "Topic :: System :: Software Distribution",
        "Topic :: System :: Systems Administration",
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

config = {
    'description': "A suite of tools for portable automated scientific protocols.",
    'author': "OpenTrons",
    'url': 'http://opentrons.com',
    'version': '0.3',
    'install_requires': ['pyyaml'],
    'packages': find_packages(),
    'package_data': {
        "labsuite": [
            "config/containers/**/*.yml",
            "config/containers/legacy_containers.json",
            "compilers/data/*"
        ]
    },
    'name': 'labsuite',
    'test_suite': 'nose.collector',
    'zip_safe': False
}

setup(**config)
<commit_msg>Setup: Added template directory.<commit_after>from setuptools import setup, find_packages

config = {
    'description': "A suite of tools for portable automated scientific protocols.",
    'author': "OpenTrons",
    'url': 'http://opentrons.com',
    'version': '0.32',
    'install_requires': ['pyyaml'],
    'packages': find_packages(),
    'package_data': {
        "labsuite": [
            "config/containers/**/*.yml",
            "config/containers/legacy_containers.json",
            "compilers/data/*",
            "compilers/templates/*"
        ]
    },
    'name': 'labsuite',
    'test_suite': 'nose.collector',
    'zip_safe': False
}

setup(**config)
<|endoftext|>


<commit_before>import sys
import shutil
from os.path import join, dirname, realpath, sep
from os import walk
from glob import glob
from distutils.core import setup
from distutils.extension import Extension

# extract version (simulate doc generation, kivy will be not imported)
import kivy

# extra build commands go in the cmdclass dict {'command-name': CommandClass}
# see tools.packaging.{platform}.build.py for custom build commands for portable packages
# also e.g. we use build_ext command from cython if its installed for c extensions
cmdclass = {}

# add build rules for portable packages to cmdclass
if sys.platform == 'win32':
    from kivy.tools.packaging.win32.build import WindowsPortableBuild
    cmdclass['build_portable'] = WindowsPortableBuild
elif sys.platform == 'darwin':
   from kivy.tools.packaging.osx.build import OSXPortableBuild
   cmdclass['build_portable'] = OSXPortableBuild

from kivy.tools.packaging.factory import FactoryBuild
cmdclass['build_factory'] = FactoryBuild

# extension modules
ext_modules = []

# list all files to compile
import fnmatch
import os

pyx_files = []
kivy_libs_dir = realpath(kivy.kivy_libs_dir)
for root, dirnames, filenames in os.walk(join(dirname(__file__), 'kivy')):
    # ignore lib directory
    if realpath(root).startswith(kivy_libs_dir):
        continue
    for filename in fnmatch.filter(filenames, '*.pyx'):
        pyx_files.append(os.path.join(root, filename))

# check for cython
try:
    have_cython = True
    from Cython.Distutils import build_ext
except:
    have_cython = False

# create .c for every module
if 'sdist' in sys.argv and have_cython:
    from Cython.Compiler.Main import compile
    print 'Generating C files...',
    compile(pyx_files)
    print 'Done !'

#add cython core extension modules if cython is available
if have_cython:
    cmdclass['build_ext'] = build_ext
else:
    pyx_files = ['%s.c' % x[:-4] for x in pyx_files]

if True:
    libraries = []
    include_dirs = []
    extra_link_args = []
    if sys.platform == 'win32':
        libraries.append('opengl32')
    elif sys.platform == 'darwin':
        '''
        # On OSX, gl.h is not in GL/gl.h but OpenGL/gl.h. Cython has no
        # such thing as #ifdef, hence we just copy the file here.
        source = '/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h'
        incl = 'build/include/'
        dest = os.path.join(incl, 'GL/')
        try:
            os.makedirs(dest)
        except OSError:
            # Already exists, so don't care
            pass
        shutil.copy(source, dest)
        include_dirs = [incl]
        '''
        # On OSX, it's not -lGL, but -framework OpenGL...
        extra_link_args = ['-framework', 'OpenGL']
    elif sys.platform.startswith('freebsd'):
        include_dirs += ['/usr/local/include']
        extra_link_args += ['-L', '/usr/local/lib']
    else:
        libraries.append('GL')

    # simple extensions
    for pyx in (x for x in pyx_files if not 'graphics' in x):
        module_name = '.'.join(pyx.split('.')[:-1]).replace(sep, '.')
        ext_modules.append(Extension(module_name, [pyx]))

    # opengl aware modules
    for pyx in (x for x in pyx_files if 'graphics' in x):
        module_name = '.'.join(pyx.split('.')[:-1]).replace(sep, '.')
        ext_modules.append(Extension(
            module_name, [pyx],
            libraries=libraries,
            include_dirs=include_dirs,
            extra_link_args=extra_link_args
        ))

    #poly2try extension
    """
    ext_modules.append(Extension('kivy.c_ext.p2t', [
     'kivy/lib/poly2tri/src/p2t.pyx',
     'kivy/lib/poly2tri/poly2tri/common/shapes.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/advancing_front.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/cdt.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/sweep.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/sweep_context.cc'
    ], language="c++"))
    """

#setup datafiles to be included in the disytibution, liek examples...
#extracts all examples files except sandbox
data_file_prefix = 'share/kivy-'
examples = {}
examples_allowed_ext = ('readme', 'py', 'wav', 'png', 'jpg', 'svg',
                        'avi', 'gif', 'txt', 'ttf', 'obj', 'mtl')
for root, subFolders, files in walk('examples'):
    if 'sandbox' in root:
        continue
    for file in files:
        ext = file.split('.')[-1].lower()
        if ext not in examples_allowed_ext:
            continue
        filename = join(root, file)
        directory = '%s%s' % (data_file_prefix, dirname(filename))
        if not directory in examples:
            examples[directory] = []
        examples[directory].append(filename)

# setup !
setup(
    name='Kivy',
    version=kivy.__version__,
    author='Kivy Crew',
    author_email='kivy-dev@googlegroups.com',
    url='http://kivy.org/',
    license='LGPL',
    description='A framework for making accelerated multitouch UI',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    test_suite='nose.collector',
    packages=[
        'kivy',
        'kivy.core',
        'kivy.core.audio',
        'kivy.core.camera',
        'kivy.core.clipboard',
        'kivy.core.image',
        'kivy.core.gl',
        'kivy.core.spelling',
        'kivy.core.svg',
        'kivy.core.text',
        'kivy.core.video',
        'kivy.core.window',
        'kivy.graphics',
        'kivy.input',
        'kivy.input.postproc',
        'kivy.input.providers',
        'kivy.lib',
        'kivy.lib.osc',
        'kivy.modules',
        'kivy.tools',
        'kivy.tools.packaging',
        'kivy.tools.packaging.win32',
        'kivy.tools.packaging.osx',
        'kivy.uix',
    ],
    package_dir={'kivy': 'kivy'},
    package_data={'kivy': [
        'data/*.kv',
        'data/fonts/*.ttf',
        'data/images/*.png',
        'data/glsl/*.png',
        'data/glsl/*.vs',
        'data/glsl/*.fs',
        'tools/packaging/README.txt',
        'tools/packaging/win32/kivy.bat',
        'tools/packaging/win32/README.txt',
        'tools/packaging/osx/kivy.sh',]
    },
    data_files=examples.items(),
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: MacOS X',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Information Technology',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: BSD :: FreeBSD',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Artistic Software',
        'Topic :: Games/Entertainment',
        'Topic :: Multimedia :: Graphics :: 3D Rendering',
        'Topic :: Multimedia :: Graphics :: Capture :: Digital Camera',
        'Topic :: Multimedia :: Graphics :: Presentation',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Sound/Audio :: Players :: MP3',
        'Topic :: Multimedia :: Video :: Display',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',
        'Topic :: Scientific/Engineering :: Visualization',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
        'Topic :: Software Development :: User Interfaces',
    ]
)
<commit_msg>setup: remove unused import<commit_after>import sys
import shutil
from os.path import join, dirname, realpath, sep
from os import walk
from distutils.core import setup
from distutils.extension import Extension

# extract version (simulate doc generation, kivy will be not imported)
import kivy

# extra build commands go in the cmdclass dict {'command-name': CommandClass}
# see tools.packaging.{platform}.build.py for custom build commands for portable packages
# also e.g. we use build_ext command from cython if its installed for c extensions
cmdclass = {}

# add build rules for portable packages to cmdclass
if sys.platform == 'win32':
    from kivy.tools.packaging.win32.build import WindowsPortableBuild
    cmdclass['build_portable'] = WindowsPortableBuild
elif sys.platform == 'darwin':
   from kivy.tools.packaging.osx.build import OSXPortableBuild
   cmdclass['build_portable'] = OSXPortableBuild

from kivy.tools.packaging.factory import FactoryBuild
cmdclass['build_factory'] = FactoryBuild

# extension modules
ext_modules = []

# list all files to compile
import fnmatch
import os

pyx_files = []
kivy_libs_dir = realpath(kivy.kivy_libs_dir)
for root, dirnames, filenames in os.walk(join(dirname(__file__), 'kivy')):
    # ignore lib directory
    if realpath(root).startswith(kivy_libs_dir):
        continue
    for filename in fnmatch.filter(filenames, '*.pyx'):
        pyx_files.append(os.path.join(root, filename))

# check for cython
try:
    have_cython = True
    from Cython.Distutils import build_ext
except:
    have_cython = False

# create .c for every module
if 'sdist' in sys.argv and have_cython:
    from Cython.Compiler.Main import compile
    print 'Generating C files...',
    compile(pyx_files)
    print 'Done !'

#add cython core extension modules if cython is available
if have_cython:
    cmdclass['build_ext'] = build_ext
else:
    pyx_files = ['%s.c' % x[:-4] for x in pyx_files]

if True:
    libraries = []
    include_dirs = []
    extra_link_args = []
    if sys.platform == 'win32':
        libraries.append('opengl32')
    elif sys.platform == 'darwin':
        '''
        # On OSX, gl.h is not in GL/gl.h but OpenGL/gl.h. Cython has no
        # such thing as #ifdef, hence we just copy the file here.
        source = '/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h'
        incl = 'build/include/'
        dest = os.path.join(incl, 'GL/')
        try:
            os.makedirs(dest)
        except OSError:
            # Already exists, so don't care
            pass
        shutil.copy(source, dest)
        include_dirs = [incl]
        '''
        # On OSX, it's not -lGL, but -framework OpenGL...
        extra_link_args = ['-framework', 'OpenGL']
    elif sys.platform.startswith('freebsd'):
        include_dirs += ['/usr/local/include']
        extra_link_args += ['-L', '/usr/local/lib']
    else:
        libraries.append('GL')

    # simple extensions
    for pyx in (x for x in pyx_files if not 'graphics' in x):
        module_name = '.'.join(pyx.split('.')[:-1]).replace(sep, '.')
        ext_modules.append(Extension(module_name, [pyx]))

    # opengl aware modules
    for pyx in (x for x in pyx_files if 'graphics' in x):
        module_name = '.'.join(pyx.split('.')[:-1]).replace(sep, '.')
        ext_modules.append(Extension(
            module_name, [pyx],
            libraries=libraries,
            include_dirs=include_dirs,
            extra_link_args=extra_link_args
        ))

    #poly2try extension
    """
    ext_modules.append(Extension('kivy.c_ext.p2t', [
     'kivy/lib/poly2tri/src/p2t.pyx',
     'kivy/lib/poly2tri/poly2tri/common/shapes.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/advancing_front.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/cdt.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/sweep.cc',
     'kivy/lib/poly2tri/poly2tri/sweep/sweep_context.cc'
    ], language="c++"))
    """

#setup datafiles to be included in the disytibution, liek examples...
#extracts all examples files except sandbox
data_file_prefix = 'share/kivy-'
examples = {}
examples_allowed_ext = ('readme', 'py', 'wav', 'png', 'jpg', 'svg',
                        'avi', 'gif', 'txt', 'ttf', 'obj', 'mtl')
for root, subFolders, files in walk('examples'):
    if 'sandbox' in root:
        continue
    for file in files:
        ext = file.split('.')[-1].lower()
        if ext not in examples_allowed_ext:
            continue
        filename = join(root, file)
        directory = '%s%s' % (data_file_prefix, dirname(filename))
        if not directory in examples:
            examples[directory] = []
        examples[directory].append(filename)

# setup !
setup(
    name='Kivy',
    version=kivy.__version__,
    author='Kivy Crew',
    author_email='kivy-dev@googlegroups.com',
    url='http://kivy.org/',
    license='LGPL',
    description='A framework for making accelerated multitouch UI',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    test_suite='nose.collector',
    packages=[
        'kivy',
        'kivy.core',
        'kivy.core.audio',
        'kivy.core.camera',
        'kivy.core.clipboard',
        'kivy.core.image',
        'kivy.core.gl',
        'kivy.core.spelling',
        'kivy.core.svg',
        'kivy.core.text',
        'kivy.core.video',
        'kivy.core.window',
        'kivy.graphics',
        'kivy.input',
        'kivy.input.postproc',
        'kivy.input.providers',
        'kivy.lib',
        'kivy.lib.osc',
        'kivy.modules',
        'kivy.tools',
        'kivy.tools.packaging',
        'kivy.tools.packaging.win32',
        'kivy.tools.packaging.osx',
        'kivy.uix',
    ],
    package_dir={'kivy': 'kivy'},
    package_data={'kivy': [
        'data/*.kv',
        'data/fonts/*.ttf',
        'data/images/*.png',
        'data/glsl/*.png',
        'data/glsl/*.vs',
        'data/glsl/*.fs',
        'tools/packaging/README.txt',
        'tools/packaging/win32/kivy.bat',
        'tools/packaging/win32/README.txt',
        'tools/packaging/osx/kivy.sh',]
    },
    data_files=examples.items(),
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: MacOS X',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Information Technology',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: BSD :: FreeBSD',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Artistic Software',
        'Topic :: Games/Entertainment',
        'Topic :: Multimedia :: Graphics :: 3D Rendering',
        'Topic :: Multimedia :: Graphics :: Capture :: Digital Camera',
        'Topic :: Multimedia :: Graphics :: Presentation',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Sound/Audio :: Players :: MP3',
        'Topic :: Multimedia :: Video :: Display',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',
        'Topic :: Scientific/Engineering :: Visualization',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
        'Topic :: Software Development :: User Interfaces',
    ]
)
<|endoftext|>


<commit_before># coding: utf-8
import os
import re

from setuptools import setup, find_packages

# https://bitbucket.org/zzzeek/alembic/raw/f38eaad4a80d7e3d893c3044162971971ae0
# 09bf/setup.py
v = open(os.path.join(os.path.dirname(__file__), 'stellar', 'app.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()

with open("README.md") as readme:
    long_description = readme.read()

setup(
    name='stellar',
    description=(
        'stellar is a tool for creating and restoring database snapshots'
    ),
    long_description=long_description,
    version=VERSION,
    url='https://github.com/fastmonkeys/stellar',
    license='BSD',
    author=u'Teemu Kokkonen, Pekka Pöyry',
    author_email='teemu@fastmonkeys.com, pekka@fastmonkeys.com',
    packages=find_packages('.', exclude=['examples*', 'test*']),
    entry_points={
        'console_scripts': [ 'stellar = stellar.command:main' ],
    },
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: MacOS :: MacOS X',
        'Topic :: Utilities',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Database',
        'Topic :: Software Development :: Version Control',
    ],
    install_requires = [
        'PyYAML',
        'SQLAlchemy',
        'humanize',
        'pytest',
        'schema',
        'click',
        'SQLAlchemy-Utils',
        'psutil',
    ]
)
<commit_msg>Use with statement to close file handle<commit_after># coding: utf-8
import os
import re

from setuptools import setup, find_packages

# https://bitbucket.org/zzzeek/alembic/raw/f38eaad4a80d7e3d893c3044162971971ae0
# 09bf/setup.py
with open(os.path.join(os.path.dirname(__file__), 'stellar', 'app.py')) as app_file
    VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(app_file.read()).group(1)

with open("README.md") as readme:
    long_description = readme.read()

setup(
    name='stellar',
    description=(
        'stellar is a tool for creating and restoring database snapshots'
    ),
    long_description=long_description,
    version=VERSION,
    url='https://github.com/fastmonkeys/stellar',
    license='BSD',
    author=u'Teemu Kokkonen, Pekka Pöyry',
    author_email='teemu@fastmonkeys.com, pekka@fastmonkeys.com',
    packages=find_packages('.', exclude=['examples*', 'test*']),
    entry_points={
        'console_scripts': [ 'stellar = stellar.command:main' ],
    },
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: MacOS :: MacOS X',
        'Topic :: Utilities',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Database',
        'Topic :: Software Development :: Version Control',
    ],
    install_requires = [
        'PyYAML',
        'SQLAlchemy',
        'humanize',
        'pytest',
        'schema',
        'click',
        'SQLAlchemy-Utils',
        'psutil',
    ]
)
<|endoftext|>


<commit_before>import io
import re
import sys
import textwrap

import setuptools

def has_environment_marker_support():
    """
    Tests that setuptools has support for PEP-426 environment marker support.

    The first known release to support it is 0.7 (and the earliest on PyPI seems to be 0.7.2
    so we're using that), see: https://pythonhosted.org/setuptools/history.html#id142

    References:

    * https://wheel.readthedocs.org/en/latest/index.html#defining-conditional-dependencies
    * https://www.python.org/dev/peps/pep-0426/#environment-markers
    """
    import pkg_resources

    try:
        v = pkg_resources.parse_version(setuptools.__version__)
        return v >= pkg_resources.parse_version("0.7.2")
    except Exception as e:
        sys.stderr.write("Could not test setuptool's version: {}\n".format(e))
        return False

def fix_changelog(text):
    # first we need to prune the include draft, we don't have a draft for PyPi release
    text = text.replace(".. include:: ../_draft.rst", "")
    # now we need to fix the user custom directives: user
    pattern = re.compile(r":user:`(\w+)`")
    text = pattern.sub(r"`\1 <https://github.com/\1>`_", text)
    return text

def get_long_description():
    with io.open("README.rst", encoding="utf-8") as f:
        with io.open("CHANGELOG.rst", encoding="utf-8") as g:
            return u"{}\n\n{}".format(f.read(), fix_changelog(g.read()))

def main():
    setuptools.setup(
        name="tox",
        description="virtualenv-based automation of test activities",
        long_description=get_long_description(),
        url="https://tox.readthedocs.org/",
        use_scm_version={
            "write_to": "src/tox/version.py",
            "write_to_template": textwrap.dedent(
                """
                 # coding: utf-8
                 from __future__ import unicode_literals

                 __version__ = {version!r}
                 """
            ).lstrip(),
        },
        license="https://opensource.org/licenses/MIT",
        platforms=["unix", "linux", "osx", "cygwin", "win32"],
        author="holger krekel",
        author_email="holger@merlinux.eu",
        packages=setuptools.find_packages("src"),
        package_dir={"": "src"},
        entry_points={
            "console_scripts": ["tox=tox:cmdline", "tox-quickstart=tox._quickstart:main"]
        },
        python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
        setup_requires=[
            "setuptools-scm"
        ],  # needed for https://github.com/pypa/readme_renderer/issues/118
        install_requires=[
            "setuptools  >= 30.0.0",
            "pluggy >= 0.3.0, <1",
            "py >= 1.4.17, <2",
            "six >= 1.0.0, <2",
            "virtualenv >= 1.11.2",
            "toml >=0.9.4",
        ],
        extras_require={
            "testing": [
                "pytest >= 3.0.0, <4",
                "pytest-cov >= 2.5.1, <3",
                "pytest-mock >= 1.10.0, <2",
                "pytest-timeout >= 1.3.0, <2",
                "pytest-xdist >= 1.22.2, <2",
                "pytest-randomly >= 1.2.3, <2",
            ],
            "docs": [
                "sphinx >= 1.7.5, < 2",
                "towncrier >= 18.5.0",
                "pygments-github-lexers >= 0.0.5",
            ],
        },
        classifiers=[
            "Development Status :: 5 - Production/Stable",
            "Framework :: tox",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: MIT License",
            "Operating System :: POSIX",
            "Operating System :: Microsoft :: Windows",
            "Operating System :: MacOS :: MacOS X",
            "Topic :: Software Development :: Testing",
            "Topic :: Software Development :: Libraries",
            "Topic :: Utilities",
        ]
        + [
            ("Programming Language :: Python :: {}".format(x))
            for x in "2 2.7 3 3.4 3.5 3.6".split()
        ],
    )

if __name__ == "__main__":
    main()
<commit_msg>Added Python 3.7 to trove classifiers<commit_after>import io
import re
import sys
import textwrap

import setuptools

def has_environment_marker_support():
    """
    Tests that setuptools has support for PEP-426 environment marker support.

    The first known release to support it is 0.7 (and the earliest on PyPI seems to be 0.7.2
    so we're using that), see: https://pythonhosted.org/setuptools/history.html#id142

    References:

    * https://wheel.readthedocs.org/en/latest/index.html#defining-conditional-dependencies
    * https://www.python.org/dev/peps/pep-0426/#environment-markers
    """
    import pkg_resources

    try:
        v = pkg_resources.parse_version(setuptools.__version__)
        return v >= pkg_resources.parse_version("0.7.2")
    except Exception as e:
        sys.stderr.write("Could not test setuptool's version: {}\n".format(e))
        return False

def fix_changelog(text):
    # first we need to prune the include draft, we don't have a draft for PyPi release
    text = text.replace(".. include:: ../_draft.rst", "")
    # now we need to fix the user custom directives: user
    pattern = re.compile(r":user:`(\w+)`")
    text = pattern.sub(r"`\1 <https://github.com/\1>`_", text)
    return text

def get_long_description():
    with io.open("README.rst", encoding="utf-8") as f:
        with io.open("CHANGELOG.rst", encoding="utf-8") as g:
            return u"{}\n\n{}".format(f.read(), fix_changelog(g.read()))

def main():
    setuptools.setup(
        name="tox",
        description="virtualenv-based automation of test activities",
        long_description=get_long_description(),
        url="https://tox.readthedocs.org/",
        use_scm_version={
            "write_to": "src/tox/version.py",
            "write_to_template": textwrap.dedent(
                """
                 # coding: utf-8
                 from __future__ import unicode_literals

                 __version__ = {version!r}
                 """
            ).lstrip(),
        },
        license="https://opensource.org/licenses/MIT",
        platforms=["unix", "linux", "osx", "cygwin", "win32"],
        author="holger krekel",
        author_email="holger@merlinux.eu",
        packages=setuptools.find_packages("src"),
        package_dir={"": "src"},
        entry_points={
            "console_scripts": ["tox=tox:cmdline", "tox-quickstart=tox._quickstart:main"]
        },
        python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
        setup_requires=[
            "setuptools-scm"
        ],  # needed for https://github.com/pypa/readme_renderer/issues/118
        install_requires=[
            "setuptools  >= 30.0.0",
            "pluggy >= 0.3.0, <1",
            "py >= 1.4.17, <2",
            "six >= 1.0.0, <2",
            "virtualenv >= 1.11.2",
            "toml >=0.9.4",
        ],
        extras_require={
            "testing": [
                "pytest >= 3.0.0, <4",
                "pytest-cov >= 2.5.1, <3",
                "pytest-mock >= 1.10.0, <2",
                "pytest-timeout >= 1.3.0, <2",
                "pytest-xdist >= 1.22.2, <2",
                "pytest-randomly >= 1.2.3, <2",
            ],
            "docs": [
                "sphinx >= 1.7.5, < 2",
                "towncrier >= 18.5.0",
                "pygments-github-lexers >= 0.0.5",
            ],
        },
        classifiers=[
            "Development Status :: 5 - Production/Stable",
            "Framework :: tox",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: MIT License",
            "Operating System :: POSIX",
            "Operating System :: Microsoft :: Windows",
            "Operating System :: MacOS :: MacOS X",
            "Topic :: Software Development :: Testing",
            "Topic :: Software Development :: Libraries",
            "Topic :: Utilities",
        ]
        + [
            ("Programming Language :: Python :: {}".format(x))
            for x in "2 2.7 3 3.4 3.5 3.6 3.7".split()
        ],
    )

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


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

import os
import sys
from setuptools import setup, Extension, find_packages

is_windows = os.name == 'nt'

lib = ["libkytea"] if is_windows else ["kytea"]

ext_module = Extension('_Mykytea',
                       sources=['lib/kytea/mykytea_wrap.cxx', 'lib/kytea/mykytea.cpp'],
                       library_dirs=["lib/kytea"],
                       libraries=lib,
                       include_dirs=['lib/kytea', 'include']
                       )

libdir = 'lib/kytea'
sys.path.append('./lib/kytea')
sys.path.append('./lib/test')
VERSION = "0.1.4"

setup(
      name='kytea',
      version=VERSION,
      author='Michiaki Ariga',
      author_email='chezou@gmail.com',
      description=('An text analysis toolkit KyTea binding'),
      long_description=open('README.md').read(),
      long_description_content_type="text/markdown",
      license='MIT License',
      keywords=['KyTea', 'NLP', 'Japanese morphological analyzer'],
      url='https://github.com/chezou/Mykytea-python',
      download_url='https://github.com/chezou/Mykytea-python/tarball/{}'.format(VERSION),
      classifiers=[
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "License :: OSI Approved :: MIT License",
        "Topic :: Text Processing :: Linguistic",
      ],
      ext_modules=[ext_module],
      packages=find_packages(libdir),
      package_dir={"": libdir},
      py_modules=['Mykytea'],
      test_suite='mykytea_test.suite'
      )
<commit_msg>chore: bump up 0.1.5<commit_after>#!/usr/bin/env python

import os
import sys
from setuptools import setup, Extension, find_packages

is_windows = os.name == 'nt'

lib = ["libkytea"] if is_windows else ["kytea"]

ext_module = Extension('_Mykytea',
                       sources=['lib/kytea/mykytea_wrap.cxx', 'lib/kytea/mykytea.cpp'],
                       library_dirs=["lib/kytea"],
                       libraries=lib,
                       include_dirs=['lib/kytea', 'include']
                       )

libdir = 'lib/kytea'
sys.path.append('./lib/kytea')
sys.path.append('./lib/test')
VERSION = "0.1.5"

setup(
      name='kytea',
      version=VERSION,
      author='Michiaki Ariga',
      author_email='chezou@gmail.com',
      description=('An text analysis toolkit KyTea binding'),
      long_description=open('README.md').read(),
      long_description_content_type="text/markdown",
      license='MIT License',
      keywords=['KyTea', 'NLP', 'Japanese morphological analyzer'],
      url='https://github.com/chezou/Mykytea-python',
      download_url='https://github.com/chezou/Mykytea-python/tarball/{}'.format(VERSION),
      classifiers=[
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "License :: OSI Approved :: MIT License",
        "Topic :: Text Processing :: Linguistic",
      ],
      ext_modules=[ext_module],
      packages=find_packages(libdir),
      package_dir={"": libdir},
      py_modules=['Mykytea'],
      test_suite='mykytea_test.suite'
      )
<|endoftext|>


<commit_before># Setup file for equnaimousoctotribble

from setuptools import setup, find_packages
# from setuptools.command.test import test as TestCommand
# To use a consistent encoding
from codecs import open
import os

long_description = " "

base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)))

about = {}
with open(os.path.join(base_dir, "optimal_nod_combo", "__about__.py")) as f:
    exec(f.read(), about)

# https://www.reddit.com/r/Python/comments/3uzl2a/setuppy_requirementstxt_or_a_combination/
with open('requirements.txt') as f:
    requirements = f.read().splitlines()

setup(
    name='nod_combination',

    # 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=about["__version__"],

    description='Combine optimal-nonoptimal nod-cycle extracted spectra with sigma clipping.',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/jason-neal/nod_combination',
    author='Jason Neal',
    author_email='jason.neal@astro.up.pt',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: Astronomy',
        'Topic :: Scientific/Engineering :: Physics',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Natural Language :: English',
    ],

    # What does your project relate to?
    keywords=['astronomy', "nod cycle", "NIR Spectroscopy", "CRIRES"],

    # 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', 'test']),

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

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=requirements,
    # install_requires=[],
    setup_requires=['pytest-runner'],
    tests_require=['pytest', "hypothesis"],
    # 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', 'pytest', 'pytest-cov', 'python-coveralls', 'hypothesis'],
        'docs': ['sphinx >= 1.4', 'sphinx_rtd_theme', 'pyastronomy']
    },

    # 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={"spectrum_overload": ["data/*.fits"]},
    package_data={"optimal_nod_combo": ["data/*.dat"]},

    data_files=[],

    scripts=['bin/combine_nods'],

    # 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>unfix install requirements<commit_after># Setup file for equnaimousoctotribble

from setuptools import setup, find_packages
# from setuptools.command.test import test as TestCommand
# To use a consistent encoding
from codecs import open
import os

long_description = " "

base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)))

about = {}
with open(os.path.join(base_dir, "optimal_nod_combo", "__about__.py")) as f:
    exec(f.read(), about)

# https://www.reddit.com/r/Python/comments/3uzl2a/setuppy_requirementstxt_or_a_combination/
# with open('requirements.txt') as f:
#    requirements = f.read().splitlines()

setup(
    name='nod_combination',

    # 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=about["__version__"],

    description='Combine optimal-nonoptimal nod-cycle extracted spectra with sigma clipping.',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/jason-neal/nod_combination',
    author='Jason Neal',
    author_email='jason.neal@astro.up.pt',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: Astronomy',
        'Topic :: Scientific/Engineering :: Physics',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Natural Language :: English',
    ],

    # What does your project relate to?
    keywords=['astronomy', "nod cycle", "NIR Spectroscopy", "CRIRES"],

    # 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', 'test']),

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

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=["argparse", "astropy", "numpy", "matplotlib", "tqdm"],
    # install_requires=[],
    setup_requires=['pytest-runner'],
    tests_require=['pytest', "hypothesis"],
    # 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', 'pytest', 'pytest-cov', 'python-coveralls', 'hypothesis'],
        'docs': ['sphinx >= 1.4', 'sphinx_rtd_theme', 'pyastronomy']
    },

    # 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={"spectrum_overload": ["data/*.fits"]},
    package_data={"optimal_nod_combo": ["data/*.dat"]},

    data_files=[],

    scripts=['bin/combine_nods'],

    # 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 python
# -*- coding: utf-8 -*-

__author__ = 'Jorge Niedbalski R. <jnr@metaklass.org>'

from setuptools import setup, find_packages

dependencies = ["PyYaml"]

setup(
    name="juju-deployerizer",
    version="0.1.3",
    author="Jorge Niedbalski R.",
    include_package_data=True,
    author_email="jnr@metaklass.org",
    description="",
    install_requires=dependencies,
    packages=find_packages(),
    test_suite='nose.collector',
    classifiers=[
        "Development Status :: 3 - Alpha",
    ],
    entry_points="""
[console_scripts]
juju-deployerizer = juju_deployerizer.cli:main
"""
)
<commit_msg>environment argument is not longer required<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'Jorge Niedbalski R. <jnr@metaklass.org>'

from setuptools import setup, find_packages

dependencies = ["PyYaml"]

setup(
    name="juju-deployerizer",
    version="0.1.4",
    author="Jorge Niedbalski R.",
    include_package_data=True,
    author_email="jnr@metaklass.org",
    description="",
    install_requires=dependencies,
    packages=find_packages(),
    test_suite='nose.collector',
    classifiers=[
        "Development Status :: 3 - Alpha",
    ],
    entry_points="""
[console_scripts]
juju-deployerizer = juju_deployerizer.cli:main
"""
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Copyright (c) 2010-2011 Tyler Kennedy <tk@tkte.ch>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
from distutils.core import setup

setup(
    name = "Sŏlum",
    packages = ["solum", "solum.classfile", "solum.context"],
    version = "0.2.0",
    description = "A low-level library for JVM class file disassembly.",
    author = "Tyler Kennedy",
    author_email = "tk@tkte.ch",
    url = "http://github.com/TkTech/Solum",
    keywords = ["java", "disassembly", "disassembler"],
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Topic :: Software Development :: Disassemblers"
    ]
)
<commit_msg>Fix a completely broken setup.py (not even the right project) Fixes #14.<commit_after>#!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages

setup(
    name="Burger",
    packages=find_packages(),
    version="0.3.0",
    description="Extract information from Minecraft bytecode.",
    author="Tyler Kennedy",
    author_email="tk@tkte.ch",
    url="http://github.com/mcdevs/Burger",
    keywords=["java", "minecraft"],
    install_requires=[
        'Jawa'
    ],
    dependency_links=[
        'https://github.com/tktech/Jawa/tarball/master#egg=Jawa'
    ],
    classifiers=[
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Topic :: Software Development :: Disassemblers"
    ]
)
<|endoftext|>