<commit_before>from compas.geometry import Line
from compas.geometry import NurbsCurve

from .exceptions import COMPASRhinoInteropError

from .primitives import compas_line_to_rhino_line
from .primitives import compas_circle_to_rhino_circle
from .primitives import compas_ellipse_to_rhino_ellipse
from .primitives import rhino_point_to_compas_point
from .primitives import rhino_circle_to_compas_circle
from .primitives import rhino_ellipse_to_compas_ellipse
from .primitives import rhino_polyline_to_compas_polyline

from Rhino.Geometry import NurbsCurve as RhinoNurbsCurve

def rhino_curve_to_compas_line(curve):
    """Convert a Rhino curve to a COMPAS line.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Line`
    """
    return Line(rhino_point_to_compas_point(curve.PointAtStart),
                rhino_point_to_compas_point(curve.PointAtEnd))

def compas_line_to_rhino_curve(line):
    """Convert a COMPAS line to a Rhino curve.

    Parameters
    ----------
    line: :class:`compas.geometry.Line`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromLine(compas_line_to_rhino_line(line))

def rhino_curve_to_compas_circle(curve):
    """Convert a Rhino curve to a COMPAS circle.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Circle`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to a circle.
    """
    result, circle = curve.TryGetCircle()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to a circle.')
    return rhino_circle_to_compas_circle(circle)

def compas_circle_to_rhino_curve(circle):
    """Convert a COMPAS circle to a Rhino curve.

    Parameters
    ----------
    circle: :class:`compas.geometry.Circle`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromCircle(compas_circle_to_rhino_circle(circle))

def rhino_curve_to_compas_ellipse(curve):
    """Convert a Rhino curve to a COMPAS ellipse.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Ellipse`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to an ellipse.
    """
    result, ellipse = curve.TryGetEllipse()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to an ellipse.')
    return rhino_ellipse_to_compas_ellipse(ellipse)

def compas_ellipse_to_rhino_curve(ellipse):
    """Convert a COMPAS ellipse to a Rhino curve.

    Parameters
    ----------
    ellipse: :class:`compas.geometry.Ellipse`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromEllipse(compas_ellipse_to_rhino_ellipse(ellipse))

def rhino_curve_to_compas_polyline(curve):
    """Convert a Rhino curve to a COMPAS polyline.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Polyline`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to a polyline.
    """
    result, polyline = curve.TryGetPolyline()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to a polyline.')
    return rhino_polyline_to_compas_polyline(polyline)

def rhino_curve_to_compas_curve(curve):
    """Convert a Rhino curve to a COMPAS curve.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Curve`
    """
    curve = curve.ToNurbsCurve()
    points = []
    weights = []
    knots = []
    multiplicities = []
    degree = curve.Degree
    is_periodic = curve.IsPeriodic

    for index in range(curve.Points.Count):
        point = curve.Points.Item[index]
        points.append(rhino_point_to_compas_point(point.Location))
        weights.append(point.Weight)

    for index in range(curve.Knots.Count):
        knots.append(curve.Knots.Item[index])
        multiplicities.append(curve.Knots.KnotMultiplicity(index))

    return NurbsCurve.from_parameters(points, weights, knots, multiplicities, degree, is_periodic)

def compas_curve_to_rhino_curve(curve):
    """Convert a COMPAS curve to a Rhino curve.

    Parameters
    ----------
    curve: :class:`compas.geometry.Curve`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    rhinocurve = RhinoNurbsCurve(3, curve.is_rational, curve.order, len(curve.points))
    for index, point in enumerate(curve.points):
        rhinocurve.Points.SetPoint(index, point.x, point.y, point.z)
    for index, knot in enumerate(curve.knots):
        rhinocurve.Knots[index] = knot
    return rhinocurve
<commit_msg>fix types<commit_after>from compas.geometry import Line
from compas.geometry import NurbsCurve

from .exceptions import COMPASRhinoInteropError

from .primitives import compas_line_to_rhino_line
from .primitives import compas_circle_to_rhino_circle
from .primitives import compas_ellipse_to_rhino_ellipse
from .primitives import rhino_point_to_compas_point
from .primitives import rhino_circle_to_compas_circle
from .primitives import rhino_ellipse_to_compas_ellipse
from .primitives import rhino_polyline_to_compas_polyline

from Rhino.Geometry import NurbsCurve as RhinoNurbsCurve

def rhino_curve_to_compas_line(curve):
    """Convert a Rhino curve to a COMPAS line.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Line`
    """
    return Line(rhino_point_to_compas_point(curve.PointAtStart),
                rhino_point_to_compas_point(curve.PointAtEnd))

def compas_line_to_rhino_curve(line):
    """Convert a COMPAS line to a Rhino curve.

    Parameters
    ----------
    line: :class:`compas.geometry.Line`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromLine(compas_line_to_rhino_line(line))

def rhino_curve_to_compas_circle(curve):
    """Convert a Rhino curve to a COMPAS circle.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Circle`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to a circle.
    """
    result, circle = curve.TryGetCircle()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to a circle.')
    return rhino_circle_to_compas_circle(circle)

def compas_circle_to_rhino_curve(circle):
    """Convert a COMPAS circle to a Rhino curve.

    Parameters
    ----------
    circle: :class:`compas.geometry.Circle`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromCircle(compas_circle_to_rhino_circle(circle))

def rhino_curve_to_compas_ellipse(curve):
    """Convert a Rhino curve to a COMPAS ellipse.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Ellipse`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to an ellipse.
    """
    result, ellipse = curve.TryGetEllipse()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to an ellipse.')
    return rhino_ellipse_to_compas_ellipse(ellipse)

def compas_ellipse_to_rhino_curve(ellipse):
    """Convert a COMPAS ellipse to a Rhino curve.

    Parameters
    ----------
    ellipse: :class:`compas.geometry.Ellipse`

    Returns
    -------
    :class:`Rhino.Geometry.Curve`
    """
    return NurbsCurve.CreateFromEllipse(compas_ellipse_to_rhino_ellipse(ellipse))

def rhino_curve_to_compas_polyline(curve):
    """Convert a Rhino curve to a COMPAS polyline.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.Polyline`

    Raises
    ------
    COMPASRhinoInteropError
        If the curve cannot be converted to a polyline.
    """
    result, polyline = curve.TryGetPolyline()
    if not result:
        raise COMPASRhinoInteropError('The curve cannot be converted to a polyline.')
    return rhino_polyline_to_compas_polyline(polyline)

def rhino_curve_to_compas_curve(curve):
    """Convert a Rhino curve to a COMPAS curve.

    Parameters
    ----------
    curve: :class:`Rhino.Geometry.Curve`

    Returns
    -------
    :class:`compas.geometry.NurbsCurve`
    """
    curve = curve.ToNurbsCurve()
    points = []
    weights = []
    knots = []
    multiplicities = []
    degree = curve.Degree
    is_periodic = curve.IsPeriodic

    for index in range(curve.Points.Count):
        point = curve.Points.Item[index]
        points.append(rhino_point_to_compas_point(point.Location))
        weights.append(point.Weight)

    for index in range(curve.Knots.Count):
        knots.append(curve.Knots.Item[index])
        multiplicities.append(curve.Knots.KnotMultiplicity(index))

    return NurbsCurve.from_parameters(points, weights, knots, multiplicities, degree, is_periodic)

def compas_curve_to_rhino_curve(curve):
    """Convert a COMPAS curve to a Rhino curve.

    Parameters
    ----------
    curve: :class:`compas.geometry.NurbsCurve`

    Returns
    -------
    :class:`Rhino.Geometry.NurbsCurve`
    """
    rhinocurve = RhinoNurbsCurve(3, curve.is_rational, curve.order, len(curve.points))
    for index, point in enumerate(curve.points):
        rhinocurve.Points.SetPoint(index, point.x, point.y, point.z)
    for index, knot in enumerate(curve.knots):
        rhinocurve.Knots.Item[index] = knot
    return rhinocurve
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
	name = 'django-test-addons',
	packages = ['test_addons'],
	version = '0.3.2',
	description = 'Library to provide support for testing multiple database system like Mongo, Redis, Neo4j along with django.',
	author = 'Hakampreet Singh Pandher',
	author_email = 'hspandher@outlook.com',
	url = 'https://github.com/hspandher/django-test-utils',
	download_url = 'https://github.com/hspandher/django-test-utils/tarball/0.1',
	keywords = ['testing', 'django', 'mongo', 'redis', 'neo4j', 'TDD', 'python', 'memcache', 'django rest framework'],
	license = 'MIT',
    install_requires = [
        'django>1.6'
    ],
    extras_require = {
        'mongo_testing': ['mongoengine>=0.8.7'],
        'redis_testing': ['django-redis>=3.8.2'],
        'neo4j_testing': ['py2neo>=2.0.6'],
        'rest_framework_testing': ['djangorestframework>=3.0.5'],
    },
	classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Testing',
        'Topic :: Database',
    ],
)
<commit_msg>release version 0.3.3<commit_after>from distutils.core import setup

setup(
	name = 'django-test-addons',
	packages = ['test_addons'],
	version = '0.3.3',
	description = 'Library to provide support for testing multiple database system like Mongo, Redis, Neo4j along with django.',
	author = 'Hakampreet Singh Pandher',
	author_email = 'hspandher@outlook.com',
	url = 'https://github.com/hspandher/django-test-utils',
	download_url = 'https://github.com/hspandher/django-test-utils/tarball/0.1',
	keywords = ['testing', 'django', 'mongo', 'redis', 'neo4j', 'TDD', 'python', 'memcache', 'django rest framework'],
	license = 'MIT',
    install_requires = [
        'django>1.6'
    ],
    extras_require = {
        'mongo_testing': ['mongoengine>=0.8.7'],
        'redis_testing': ['django-redis>=3.8.2'],
        'neo4j_testing': ['py2neo>=2.0.6'],
        'rest_framework_testing': ['djangorestframework>=3.0.5'],
    },
	classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Testing',
        'Topic :: Database',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

VERSION = "0.7.2"

setup(
    name='wikidataintegrator',
    version=VERSION,
    author='Andra Waagmeester, Greg Stupp, Sebastian Burgstaller-Muehlbacher ',
    author_email='andra@micel.io',
    description='Python package for reading and writing to/from Wikidata',
    license='MIT',
    keywords='Wikidata genewiki biology chemistry medicine ShEx citations',
    url='https://github.com/sulab/WikidataIntegrator',
    packages=find_packages(),
    # packages=['wikidataintegrator',
    #          'wikidataintegrator.ref_handlers', 'wikidataintegrator.wdi_helpers'],
    include_package_data=True,
    ## long_description=read('README.md'),
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.7",
        "Development Status :: 4 - Beta",
        "Operating System :: POSIX",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Intended Audience :: Science/Research",
        "Intended Audience :: Information Technology",
        "Intended Audience :: Healthcare Industry",
        "Intended Audience :: Developers",
        "Topic :: Utilities",
        "Topic :: Scientific/Engineering :: Bio-Informatics",
    ],
    install_requires=[
        'requests',
        'python-dateutil',
        'simplejson',
        'pandas',
        'tqdm',
        'mwoauth',
        'oauthlib',
        'sparql_slurper',
        'ShExJSG',
        'jsonasobj',
        'pyshex',
        'backoff',
        'shexer'
    ],
)
<commit_msg>version 0.7.3<commit_after>from setuptools import setup, find_packages

VERSION = "0.7.3"

setup(
    name='wikidataintegrator',
    version=VERSION,
    author='Andra Waagmeester, Greg Stupp, Sebastian Burgstaller-Muehlbacher ',
    author_email='andra@micel.io',
    description='Python package for reading and writing to/from Wikidata',
    license='MIT',
    keywords='Wikidata genewiki biology chemistry medicine ShEx citations',
    url='https://github.com/sulab/WikidataIntegrator',
    packages=find_packages(),
    # packages=['wikidataintegrator',
    #          'wikidataintegrator.ref_handlers', 'wikidataintegrator.wdi_helpers'],
    include_package_data=True,
    ## long_description=read('README.md'),
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Development Status :: 4 - Beta",
        "Operating System :: POSIX",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Intended Audience :: Science/Research",
        "Intended Audience :: Information Technology",
        "Intended Audience :: Healthcare Industry",
        "Intended Audience :: Developers",
        "Topic :: Utilities",
        "Topic :: Scientific/Engineering :: Bio-Informatics",
    ],
    install_requires=[
        'requests',
        'python-dateutil',
        'simplejson',
        'pandas',
        'tqdm',
        'mwoauth',
        'oauthlib',
        'sparql_slurper',
        'ShExJSG',
        'jsonasobj',
        'pyshex',
        'backoff',
        'shexer'
    ],
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
"""pyramid_decoy setup module."""

import os
from setuptools import setup, find_packages

here = os.path.dirname(__file__)

def read(fname):
    """
    Read file passed by filename.

    :param str fname: filename
    """
    return open(os.path.join(here, fname)).read()

requirements = [
    'pyramid',
]

test_requires = [
    'pytest==4.4.1',
    'pytest-cov==2.7.1',
    'pytest-pyramid==0.3.1',
]

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

setup(
    name='pyramid_decoy',
    version='0.1.0',
    description='It\'s a python package template only',
    long_description=(
        read('README.rst') + '\n\n' + read('CHANGES.rst')
    ),
    keywords='python template',
    author='Grzegorz Sliwinski',
    author_email='fizyk@fizyk.net.pl',
    url='https://github.com/fizyk/pyramid_decoy',
    license="MIT License",
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        '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 :: Libraries :: Python Modules',
    ],
    packages=find_packages(exclude=['tests', 'tests.*']),
    install_requires=requirements,
    tests_require=test_requires,
    test_suite='tests',
    include_package_data=True,
    zip_safe=False,
    extras_require=extras_require,
    entry_points="""
      [paste.app_factory]
      decoy = pyramid_decoy.app:main
    """
)
<commit_msg>[requires.io] dependency update<commit_after># -*- coding: utf-8 -*-
"""pyramid_decoy setup module."""

import os
from setuptools import setup, find_packages

here = os.path.dirname(__file__)

def read(fname):
    """
    Read file passed by filename.

    :param str fname: filename
    """
    return open(os.path.join(here, fname)).read()

requirements = [
    'pyramid',
]

test_requires = [
    'pytest==4.4.2',
    'pytest-cov==2.7.1',
    'pytest-pyramid==0.3.1',
]

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

setup(
    name='pyramid_decoy',
    version='0.1.0',
    description='It\'s a python package template only',
    long_description=(
        read('README.rst') + '\n\n' + read('CHANGES.rst')
    ),
    keywords='python template',
    author='Grzegorz Sliwinski',
    author_email='fizyk@fizyk.net.pl',
    url='https://github.com/fizyk/pyramid_decoy',
    license="MIT License",
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        '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 :: Libraries :: Python Modules',
    ],
    packages=find_packages(exclude=['tests', 'tests.*']),
    install_requires=requirements,
    tests_require=test_requires,
    test_suite='tests',
    include_package_data=True,
    zip_safe=False,
    extras_require=extras_require,
    entry_points="""
      [paste.app_factory]
      decoy = pyramid_decoy.app:main
    """
)
<|endoftext|>


<commit_before>import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name='scholarly',
    version='1.4.1',
    author='Steven A. Cholewiak, Panos Ipeirotis, Victor Silva, Arun Kannawadi',
    author_email='steven@cholewiak.com, panos@stern.nyu.edu, vsilva@ualberta.ca, arunkannawadi@astro.princeton.edu',
    description='Simple access to Google Scholar authors and citations',
    long_description=long_description,
    long_description_content_type="text/markdown",
    license='Unlicense',

    url='https://github.com/scholarly-python-package/scholarly',
    packages=setuptools.find_packages(),
    keywords=['Google Scholar', 'academics', 'citations'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules'],
    install_requires=['arrow',
                      'beautifulsoup4',
                      'bibtexparser',
                      'requests[security]',
                      'requests[socks]',
                      'stem',
                      'fake_useragent',
                      'PySocks',
                      'selenium',
                      'python-dotenv',
                      'free-proxy',
                      'sphinx_rtd_theme',
                      'typing_extensions'
                      ],
    test_suite="test_module.py"
)
<commit_msg>Releasing 1.4.2<commit_after>import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name='scholarly',
    version='1.4.2',
    author='Steven A. Cholewiak, Panos Ipeirotis, Victor Silva, Arun Kannawadi',
    author_email='steven@cholewiak.com, panos@stern.nyu.edu, vsilva@ualberta.ca, arunkannawadi@astro.princeton.edu',
    description='Simple access to Google Scholar authors and citations',
    long_description=long_description,
    long_description_content_type="text/markdown",
    license='Unlicense',

    url='https://github.com/scholarly-python-package/scholarly',
    packages=setuptools.find_packages(),
    keywords=['Google Scholar', 'academics', 'citations'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules'],
    install_requires=['arrow',
                      'beautifulsoup4',
                      'bibtexparser',
                      'requests[security]',
                      'requests[socks]',
                      'stem',
                      'fake_useragent',
                      'PySocks',
                      'selenium',
                      'python-dotenv',
                      'free-proxy',
                      'sphinx_rtd_theme',
                      'typing_extensions'
                      ],
    test_suite="test_module.py"
)
<|endoftext|>


<commit_before>#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os

from netifaces import interfaces
from sys import exit

from vyos.config import Config
from vyos.configdict import get_interface_dict
from vyos.configdict import is_node_changed
from vyos.configverify import verify_vrf
from vyos.configverify import verify_address
from vyos.configverify import verify_bridge_delete
from vyos.configverify import verify_mtu_ipv6
from vyos.configverify import verify_mirror_redirect
from vyos.configverify import verify_source_interface
from vyos.configverify import verify_bond_bridge_member
from vyos.ifconfig import MACsecIf
from vyos.ifconfig import Interface
from vyos.template import render
from vyos.util import call
from vyos.util import dict_search
from vyos.util import is_systemd_service_running
from vyos import ConfigError
from vyos import airbag
airbag.enable()

# XXX: wpa_supplicant works on the source interface
wpa_suppl_conf = '/run/wpa_supplicant/{source_interface}.conf'

def get_config(config=None):
    """
    Retrive CLI config as dictionary. Dictionary can never be empty, as at least the
    interface name will be added or a deleted flag
    """
    if config:
        conf = config
    else:
        conf = Config()
    base = ['interfaces', 'macsec']
    ifname, macsec = get_interface_dict(conf, base)

    # Check if interface has been removed
    if 'deleted' in macsec:
        source_interface = conf.return_effective_value(base + [ifname, 'source-interface'])
        macsec.update({'source_interface': source_interface})

    if is_node_changed(conf, base + [ifname, 'security']):
        macsec.update({'shutdown_required': {}})

    if is_node_changed(conf, base + [ifname, 'source_interface']):
        macsec.update({'shutdown_required': {}})

    return macsec

def verify(macsec):
    if 'deleted' in macsec:
        verify_bridge_delete(macsec)
        return None

    verify_source_interface(macsec)
    verify_vrf(macsec)
    verify_mtu_ipv6(macsec)
    verify_address(macsec)
    verify_bond_bridge_member(macsec)
    verify_mirror_redirect(macsec)

    if dict_search('security.cipher', macsec) == None:
        raise ConfigError('Cipher suite must be set for MACsec "{ifname}"'.format(**macsec))

    if dict_search('security.encrypt', macsec) != None:
        if dict_search('security.mka.cak', macsec) == None or dict_search('security.mka.ckn', macsec) == None:
            raise ConfigError('Missing mandatory MACsec security keys as encryption is enabled!')

        cak_len = len(dict_search('security.mka.cak', macsec))

        if dict_search('security.cipher', macsec) == 'gcm-aes-128' and cak_len != 32:
            # gcm-aes-128 requires a 128bit long key - 32 characters (string) = 16byte = 128bit
            raise ConfigError('gcm-aes-128 requires a 128bit long key!')

        elif dict_search('security.cipher', macsec) == 'gcm-aes-256' and cak_len != 64:
            # gcm-aes-128 requires a 128bit long key - 64 characters (string) = 32byte = 256bit
            raise ConfigError('gcm-aes-128 requires a 256bit long key!')

    if 'source_interface' in macsec:
        # MACsec adds a 40 byte overhead (32 byte MACsec + 8 bytes VLAN 802.1ad
        # and 802.1q) - we need to check the underlaying MTU if our configured
        # MTU is at least 40 bytes less then the MTU of our physical interface.
        lower_mtu = Interface(macsec['source_interface']).get_mtu()
        if lower_mtu < (int(macsec['mtu']) + 40):
            raise ConfigError('MACsec overhead does not fit into underlaying device MTU,\n' \
                              f'{lower_mtu} bytes is too small!')

    return None

def generate(macsec):
    render(wpa_suppl_conf.format(**macsec), 'macsec/wpa_supplicant.conf.j2', macsec)
    return None

def apply(macsec):
    systemd_service = 'wpa_supplicant-macsec@{source_interface}'.format(**macsec)

    # Remove macsec interface on deletion or mandatory parameter change
    if 'deleted' in macsec or 'shutdown_required' in macsec:
        call(f'systemctl stop {systemd_service}')

        if macsec['ifname'] in interfaces():
            tmp = MACsecIf(macsec['ifname'])
            tmp.remove()

        if 'deleted' in macsec:
            # delete configuration on interface removal
            if os.path.isfile(wpa_suppl_conf.format(**macsec)):
                os.unlink(wpa_suppl_conf.format(**macsec))

            return None

    # It is safe to "re-create" the interface always, there is a sanity
    # check that the interface will only be create if its non existent
    i = MACsecIf(**macsec)
    i.update(macsec)

    if not is_systemd_service_running(systemd_service) or 'shutdown_required' in macsec:
        call(f'systemctl reload-or-restart {systemd_service}')

    return None

if __name__ == '__main__':
    try:
        c = get_config()
        verify(c)
        generate(c)
        apply(c)
    except ConfigError as e:
        print(e)
        exit(1)
<commit_msg>macsec: T4592: can not create two interfaces using the same source-interface<commit_after>#!/usr/bin/env python3
#
# Copyright (C) 2020-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os

from netifaces import interfaces
from sys import exit

from vyos.config import Config
from vyos.configdict import get_interface_dict
from vyos.configdict import is_node_changed
from vyos.configdict import is_source_interface
from vyos.configverify import verify_vrf
from vyos.configverify import verify_address
from vyos.configverify import verify_bridge_delete
from vyos.configverify import verify_mtu_ipv6
from vyos.configverify import verify_mirror_redirect
from vyos.configverify import verify_source_interface
from vyos.configverify import verify_bond_bridge_member
from vyos.ifconfig import MACsecIf
from vyos.ifconfig import Interface
from vyos.template import render
from vyos.util import call
from vyos.util import dict_search
from vyos.util import is_systemd_service_running
from vyos import ConfigError
from vyos import airbag
airbag.enable()

# XXX: wpa_supplicant works on the source interface
wpa_suppl_conf = '/run/wpa_supplicant/{source_interface}.conf'

def get_config(config=None):
    """
    Retrive CLI config as dictionary. Dictionary can never be empty, as at least the
    interface name will be added or a deleted flag
    """
    if config:
        conf = config
    else:
        conf = Config()
    base = ['interfaces', 'macsec']
    ifname, macsec = get_interface_dict(conf, base)

    # Check if interface has been removed
    if 'deleted' in macsec:
        source_interface = conf.return_effective_value(base + [ifname, 'source-interface'])
        macsec.update({'source_interface': source_interface})

    if is_node_changed(conf, base + [ifname, 'security']):
        macsec.update({'shutdown_required': {}})

    if is_node_changed(conf, base + [ifname, 'source_interface']):
        macsec.update({'shutdown_required': {}})

    if 'source_interface' in macsec:
        tmp = is_source_interface(conf, macsec['source_interface'], 'macsec')
        if tmp and tmp != ifname: macsec.update({'is_source_interface' : tmp})

    return macsec

def verify(macsec):
    if 'deleted' in macsec:
        verify_bridge_delete(macsec)
        return None

    verify_source_interface(macsec)
    verify_vrf(macsec)
    verify_mtu_ipv6(macsec)
    verify_address(macsec)
    verify_bond_bridge_member(macsec)
    verify_mirror_redirect(macsec)

    if dict_search('security.cipher', macsec) == None:
        raise ConfigError('Cipher suite must be set for MACsec "{ifname}"'.format(**macsec))

    if dict_search('security.encrypt', macsec) != None:
        if dict_search('security.mka.cak', macsec) == None or dict_search('security.mka.ckn', macsec) == None:
            raise ConfigError('Missing mandatory MACsec security keys as encryption is enabled!')

        cak_len = len(dict_search('security.mka.cak', macsec))

        if dict_search('security.cipher', macsec) == 'gcm-aes-128' and cak_len != 32:
            # gcm-aes-128 requires a 128bit long key - 32 characters (string) = 16byte = 128bit
            raise ConfigError('gcm-aes-128 requires a 128bit long key!')

        elif dict_search('security.cipher', macsec) == 'gcm-aes-256' and cak_len != 64:
            # gcm-aes-128 requires a 128bit long key - 64 characters (string) = 32byte = 256bit
            raise ConfigError('gcm-aes-128 requires a 256bit long key!')

    if 'is_source_interface' in macsec:
        tmp = macsec['is_source_interface']
        src_ifname = macsec['source_interface']
        raise ConfigError(f'Can not use source-interface "{src_ifname}", it already ' \
                          f'belongs to interface "{tmp}"!')

    if 'source_interface' in macsec:
        # MACsec adds a 40 byte overhead (32 byte MACsec + 8 bytes VLAN 802.1ad
        # and 802.1q) - we need to check the underlaying MTU if our configured
        # MTU is at least 40 bytes less then the MTU of our physical interface.
        lower_mtu = Interface(macsec['source_interface']).get_mtu()
        if lower_mtu < (int(macsec['mtu']) + 40):
            raise ConfigError('MACsec overhead does not fit into underlaying device MTU,\n' \
                              f'{lower_mtu} bytes is too small!')

    return None

def generate(macsec):
    render(wpa_suppl_conf.format(**macsec), 'macsec/wpa_supplicant.conf.j2', macsec)
    return None

def apply(macsec):
    systemd_service = 'wpa_supplicant-macsec@{source_interface}'.format(**macsec)

    # Remove macsec interface on deletion or mandatory parameter change
    if 'deleted' in macsec or 'shutdown_required' in macsec:
        call(f'systemctl stop {systemd_service}')

        if macsec['ifname'] in interfaces():
            tmp = MACsecIf(macsec['ifname'])
            tmp.remove()

        if 'deleted' in macsec:
            # delete configuration on interface removal
            if os.path.isfile(wpa_suppl_conf.format(**macsec)):
                os.unlink(wpa_suppl_conf.format(**macsec))

            return None

    # It is safe to "re-create" the interface always, there is a sanity
    # check that the interface will only be create if its non existent
    i = MACsecIf(**macsec)
    i.update(macsec)

    if not is_systemd_service_running(systemd_service) or 'shutdown_required' in macsec:
        call(f'systemctl reload-or-restart {systemd_service}')

    return None

if __name__ == '__main__':
    try:
        c = get_config()
        verify(c)
        generate(c)
        apply(c)
    except ConfigError as e:
        print(e)
        exit(1)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from math import atan2, sin, cos

from .controller import Controller

class EulerMethodController(Controller):
    def __init__(self, trajectory, simulation_data, control_constants):
        Controller.__init__(self, trajectory, simulation_data)
        self.K_X = control_constants['x']
        self.K_Y = control_constants['y']
        self.K_THETA = control_constants['theta']

    def set_next_reference(self):
        reference = self.trajectory.get_position_at((self.i + 1) * self.delta)
        self.x_ref_n_plus_1 = reference.x
        self.y_ref_n_plus_1 = reference.y

    def get_delta_x_n(self):
        return self.x_ref_n_plus_1 - self.K_X * (self.x_ref_n - self.x_n) - self.x_n

    def get_delta_y_n(self):
        return self.y_ref_n_plus_1 - self.K_Y * (self.y_ref_n - self.y_n) - self.y_n

    def get_delta_theta_n(self):
        return self.theta_ez_n - self.K_THETA * (self.theta_ez_n - self.theta_n) - self.theta_n

    def compute_theta_ez_n(self):
         return atan2(self.get_delta_y_n(), self.get_delta_x_n())

    def compute_v_c_n(self):
        delta_x_n = self.get_delta_x_n()
        delta_y_n = self.get_delta_y_n()

        return (delta_x_n * cos(self.theta_ez_n) + delta_y_n * sin(self.theta_ez_n)) / self.delta

    def compute_w_c_n(self):
        w_n = self.get_delta_theta_n() / self.delta
        self.theta_ref_n = self.theta_ez_n

        # limit angular velocity to be between -pi and pi rad/s
        return atan2(sin(w_n), cos(w_n))

    def compute_control_actions(self, pose, twist, i):
        self.i = i
        self.set_current_orientation(pose.orientation)
        self.set_current_position(pose.position)
        self.set_current_reference(self.trajectory.get_position_at(i * self.delta))
        self.set_next_reference()

        self.theta_ez_n = self.compute_theta_ez_n()
        self.v_c_n = self.compute_v_c_n()
        self.w_c_n =  self.compute_w_c_n()
<commit_msg>refactor: Change formula<commit_after>#!/usr/bin/env python
from math import atan2, sin, cos

from .controller import Controller

class EulerMethodController(Controller):
    def __init__(self, trajectory, simulation_data, control_constants):
        Controller.__init__(self, trajectory, simulation_data)
        self.K_X = control_constants['x']
        self.K_Y = control_constants['y']
        self.K_THETA = control_constants['theta']

    def set_next_reference(self):
        reference = self.trajectory.get_position_at((self.i + 1) * self.delta)
        self.x_ref_n_plus_1 = reference.x
        self.y_ref_n_plus_1 = reference.y

    def get_delta_x_n(self):
        return self.x_ref_n_plus_1 - self.K_X * (self.x_ref_n - self.x_n) - self.x_n

    def get_delta_y_n(self):
        return self.y_ref_n_plus_1 - self.K_Y * (self.y_ref_n - self.y_n) - self.y_n

    def get_delta_theta_n(self):
        return self.theta_ref_n - self.K_THETA * (self.theta_ref_n - self.theta_n) - self.theta_n

    def compute_theta_ez_n(self):
         return atan2(self.get_delta_y_n(), self.get_delta_x_n())

    def compute_v_c_n(self):
        delta_x_n = self.get_delta_x_n()
        delta_y_n = self.get_delta_y_n()

        return (delta_x_n * cos(self.theta_ref_n) + delta_y_n * sin(self.theta_ref_n)) / self.delta

    def compute_w_c_n(self):
        w_n = self.get_delta_theta_n() / self.delta

        # limit angular velocity to be between -pi and pi rad/s
        return atan2(sin(w_n), cos(w_n))

    def compute_control_actions(self, pose, twist, i):
        self.i = i
        self.set_current_orientation(pose.orientation)
        self.set_current_position(pose.position)
        self.set_current_reference(self.trajectory.get_position_at(i * self.delta))
        self.set_next_reference()

        self.theta_ref_n = self.compute_theta_ez_n()
        self.v_c_n = self.compute_v_c_n()
        self.w_c_n =  self.compute_w_c_n()
<|endoftext|>


<commit_before>#!/usr/bin/env python
from math import atan2, sin
from math import cos

from .controller import Controller

class EulerMethodController(Controller):
    def __init__(self, trajectory, simulation_data, control_constants):
        Controller.__init__(self, trajectory, simulation_data)
        self.K_X = control_constants['x']
        self.K_Y = control_constants['y']
        self.K_THETA = control_constants['theta']
        self.theta_ez_n_minus_1 = 0
        self.theta_n_minus_1 = 0

    def set_next_reference(self):
        reference = self.trajectory.get_position_at((self.i + 1) * self.delta)
        self.x_ref_n_plus_1 = reference.x
        self.y_ref_n_plus_1 = reference.y

    def get_delta_x_n(self):
        return self.x_ref_n_plus_1 - self.K_X * (self.x_ref_n - self.x_n) - self.x_n

    def get_delta_y_n(self):
        return self.y_ref_n_plus_1 - self.K_Y * (self.y_ref_n - self.y_n) - self.y_n

    def get_delta_theta_n(self):
        return self.theta_ez_n - self.K_THETA * (self.theta_ez_n_minus_1 - self.theta_n) - self.theta_n

    def compute_theta_ez_n(self):
         return atan2(self.get_delta_y_n(), self.get_delta_x_n())

    def compute_v_c_n(self):
        delta_x_n = self.get_delta_x_n()
        delta_y_n = self.get_delta_y_n()

        return (delta_x_n * cos(self.theta_ez_n) + delta_y_n * sin(self.theta_ez_n)) / self.delta

    def compute_w_c_n(self):
        w_n = self.get_delta_theta_n() / self.delta

        self.theta_ez_n_minus_1 = self.theta_ez_n
        self.theta_n_minus_1 = self.theta_n
        self.theta_ref_n = self.theta_ez_n

        # limit angular velocity to be between -pi and pi rad/s
        return atan2(sin(w_n), cos(w_n))

    def compute_control_actions(self, pose, twist, i):
        self.i = i
        self.set_current_orientation(pose.orientation)
        self.set_current_position(pose.position)
        self.set_current_reference(self.trajectory.get_position_at(i * self.delta))
        self.set_next_reference()

        self.theta_ez_n = self.compute_theta_ez_n()
        self.v_c_n = self.compute_v_c_n()
        self.w_c_n =  self.compute_w_c_n()
<commit_msg>refactor: Remove needless variables<commit_after>#!/usr/bin/env python
from math import atan2, sin
from math import cos

from .controller import Controller

class EulerMethodController(Controller):
    def __init__(self, trajectory, simulation_data, control_constants):
        Controller.__init__(self, trajectory, simulation_data)
        self.K_X = control_constants['x']
        self.K_Y = control_constants['y']
        self.K_THETA = control_constants['theta']

    def set_next_reference(self):
        reference = self.trajectory.get_position_at((self.i + 1) * self.delta)
        self.x_ref_n_plus_1 = reference.x
        self.y_ref_n_plus_1 = reference.y

    def get_delta_x_n(self):
        return self.x_ref_n_plus_1 - self.K_X * (self.x_ref_n - self.x_n) - self.x_n

    def get_delta_y_n(self):
        return self.y_ref_n_plus_1 - self.K_Y * (self.y_ref_n - self.y_n) - self.y_n

    def get_delta_theta_n(self):
        return self.theta_ez_n - self.K_THETA * (self.theta_ez_n - self.theta_n) - self.theta_n

    def compute_theta_ez_n(self):
         return atan2(self.get_delta_y_n(), self.get_delta_x_n())

    def compute_v_c_n(self):
        delta_x_n = self.get_delta_x_n()
        delta_y_n = self.get_delta_y_n()

        return (delta_x_n * cos(self.theta_ez_n) + delta_y_n * sin(self.theta_ez_n)) / self.delta

    def compute_w_c_n(self):
        w_n = self.get_delta_theta_n() / self.delta
        self.theta_ref_n = self.theta_ez_n

        # limit angular velocity to be between -pi and pi rad/s
        return atan2(sin(w_n), cos(w_n))

    def compute_control_actions(self, pose, twist, i):
        self.i = i
        self.set_current_orientation(pose.orientation)
        self.set_current_position(pose.position)
        self.set_current_reference(self.trajectory.get_position_at(i * self.delta))
        self.set_next_reference()

        self.theta_ez_n = self.compute_theta_ez_n()
        self.v_c_n = self.compute_v_c_n()
        self.w_c_n =  self.compute_w_c_n()
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
    test_args = []

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = []

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

    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.pytest_args)
        sys.exit(errno)

setup(
    name='freepacktbook',
    version='1.0.2',
    description='Claim Your Free PacktPub eBook',
    author='Adam Bogdał',
    author_email='adam@bogdal.pl',
    url='https://github.com/bogdal/freepacktbook',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'beautifulsoup4',
        'python-slugify>=1.2.0',
        'requests',
        'tqdm>=3.4.0'],
    cmdclass={
        'test': PyTest},
    tests_require=[
        'mock',
        'pytest>=2.8.1',
        'pytest-cov',
        'requests-mock',
        'vcrpy>=1.7.3'],
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules'],
    entry_points={
        'console_scripts': [
            'claim_free_ebook = freepacktbook:claim_free_ebook',
            'download_ebooks = freepacktbook:download_ebooks']},
    zip_safe=False)
<commit_msg>Bump version<commit_after># -*- coding: utf-8 -*-
import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
    test_args = []

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = []

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

    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.pytest_args)
        sys.exit(errno)

setup(
    name='freepacktbook',
    version='1.1.0',
    description='Claim Your Free PacktPub eBook',
    author='Adam Bogdał',
    author_email='adam@bogdal.pl',
    url='https://github.com/bogdal/freepacktbook',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'beautifulsoup4',
        'python-slugify>=1.2.0',
        'requests',
        'tqdm>=3.4.0'],
    cmdclass={
        'test': PyTest},
    tests_require=[
        'mock',
        'pytest>=2.8.1',
        'pytest-cov',
        'requests-mock',
        'vcrpy>=1.7.3'],
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules'],
    entry_points={
        'console_scripts': [
            'claim_free_ebook = freepacktbook:claim_free_ebook',
            'download_ebooks = freepacktbook:download_ebooks']},
    zip_safe=False)
<|endoftext|>


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

from codecs import open
from os import path
from setuptools import setup, find_packages
from typing import Dict

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

about: Dict[str, str] = {}
with open(path.join(here, 'csv_ical', '__version__.py')) as f:
    exec(f.read(), about)

setup(
    name='csv-ical',

    version=about['__version__'],

    description='Convert between CSV and iCal',
    long_description=long_description,

    url='https://github.com/albertyw/csv-ical',

    author='Albert Wang',
    author_email='git@albertyw.com',

    license='MIT',

    classifiers=[
        'Development Status :: 5 - Production/Stable',

        'Intended Audience :: Developers',
        'Natural Language :: English',
        'Topic :: Software Development',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',

        'Typing :: Typed',
    ],

    keywords='',

    package_data={"csv_ical": ["py.typed"]},
    packages=find_packages(exclude=["tests"]),

    python_requires='>=3.5',
    install_requires=[
        'icalendar>=4.0.1,<5.0.0',
    ],

    test_suite="csv_ical.tests",

    # testing requires flake8 and coverage but they're listed separately
    # because they need to wrap setup.py
    extras_require={
        'dev': [],
        'test': [],
    },
)
<commit_msg>Set content type for package description<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from codecs import open
from os import path
from setuptools import setup, find_packages
from typing import Dict

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

about: Dict[str, str] = {}
with open(path.join(here, 'csv_ical', '__version__.py')) as f:
    exec(f.read(), about)

setup(
    name='csv-ical',

    version=about['__version__'],

    description='Convert between CSV and iCal',
    long_description=long_description,
    long_description_content_type='text/markdown',

    url='https://github.com/albertyw/csv-ical',

    author='Albert Wang',
    author_email='git@albertyw.com',

    license='MIT',

    classifiers=[
        'Development Status :: 5 - Production/Stable',

        'Intended Audience :: Developers',
        'Natural Language :: English',
        'Topic :: Software Development',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',

        'Typing :: Typed',
    ],

    keywords='',

    package_data={"csv_ical": ["py.typed"]},
    packages=find_packages(exclude=["tests"]),

    python_requires='>=3.5',
    install_requires=[
        'icalendar>=4.0.1,<5.0.0',
    ],

    test_suite="csv_ical.tests",

    # testing requires flake8 and coverage but they're listed separately
    # because they need to wrap setup.py
    extras_require={
        'dev': [],
        'test': [],
    },
)
<|endoftext|>


<commit_before>import os
from setuptools import setup, find_packages
import warnings

setup(
    name='cloud-compose',
    version='0.3.0',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'click>=6.6',
    ],
    entry_points={
        "console_scripts": [
            "cloud-compose=cloudcompose.cli:cli",
        ]
    },
    namespace_packages = ['cloudcompose'],
    author="Patrick Cullen and the WaPo platform tools team",
    author_email="opensource@washingtonpost.com",
    url="https://github.com/cloud-compose/cloud-compose",
    download_url = "https://github.com/cloud-compose/cloud-compose/tarball/v0.3.0",
    keywords = ['cloud', 'compose', 'aws'],
    classifiers = []
)
<commit_msg>updated version<commit_after>import os
from setuptools import setup, find_packages
import warnings

setup(
    name='cloud-compose',
    version='0.4.0',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'click>=6.6',
    ],
    entry_points={
        "console_scripts": [
            "cloud-compose=cloudcompose.cli:cli",
        ]
    },
    namespace_packages = ['cloudcompose'],
    author="Patrick Cullen and the WaPo platform tools team",
    author_email="opensource@washingtonpost.com",
    url="https://github.com/cloud-compose/cloud-compose",
    download_url = "https://github.com/cloud-compose/cloud-compose/tarball/v0.4.0",
    keywords = ['cloud', 'compose', 'aws'],
    classifiers = []
)
<|endoftext|>


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

import wsstat

py_version = sys.version_info[:2]

if py_version < (3, 3):
    raise Exception("websockets requires Python >= 3.3.")

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

with open('requirements.txt') as f:
    dependencies = f.read().splitlines()

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

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

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

setup(
    name='wsstat',
    version=wsstat.__version__,
    url='http://github.com/fitblip/wsstat/',
    author='Ryan Sears',
    tests_require=['pytest'],
    install_requires=dependencies,
    cmdclass={'test': PyTest},
    author_email='fitblip@gmail.com',
    description='Websocket health monitoring made simple (and beautiful)',
    long_description=long_description,
    packages=['wsstat'],
    include_package_data=True,
    test_suite='test.test_wsstat',
    entry_points={
        'console_scripts': [
            'wsstat = wsstat.main:run',
        ],
    },
    classifiers = [],
    extras_require={
        'testing': ['pytest'],
    },

)
<commit_msg>Update setup.py<commit_after>from setuptools import setup
from setuptools.command.test import test as TestCommand
import os
import sys

import wsstat

py_version = sys.version_info[:2]

if py_version < (3, 3):
    raise Exception("websockets requires Python >= 3.3.")

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

with open('requirements.txt') as f:
    dependencies = f.read().splitlines()

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

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

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

setup(
    name='wsstat',
    version=wsstat.__version__,
    url='http://github.com/fitblip/wsstat/',
    author='Ryan Sears',
    tests_require=['pytest'],
    install_requires=dependencies,
    cmdclass={'test': PyTest},
    author_email='fitblip@gmail.com',
    description='Websocket health monitoring made simple (and beautiful)',
    long_description=long_description,
    packages=['wsstat'],
    include_package_data=True,
    test_suite='test.test_wsstat',
    entry_points={
        'console_scripts': [
            'wsstat = wsstat.main:run',
        ],
    },
    license = "MIT",
    classifiers = [],
    extras_require={
        'testing': ['pytest'],
    },

)
<|endoftext|>


<commit_before># coding: utf-8
# Copyright (c) Materials Virtual Lab
# Distributed under the terms of the BSD License.

import glob
import os
from io import open

from setuptools import setup, find_packages

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

long_desc = """
Flamyngo is a customizable Flask frontend for MongoDB.

At the most basic level, the aim is to delegate most settings to a YAML
configuration file, which then allows the  underlying code to be reused for
any conceivable collection.

Detailed usage instructions are available at the project's `Github page
<https://github.com/materialsvirtuallab/flamyngo>`_.
"""

setup(
    name="flamyngo",
    packages=find_packages(),
    version="0.10.5",
    install_requires=["flask", "pyyaml", "monty>=0.7.0", "pymongo"],
    package_data={"flamyngo": ["static/*.*", "static/js/*.*",
                               "templates/*"]},
    author="Shyue Ping Ong",
    author_email="ongsp@eng.ucsd.edu",
    maintainer="Shyue Ping Ong",
    maintainer_email="ongsp@eng.ucsd.edu",
    url="https://github.com/materialsvirtuallab/flamyngo",
    license="BSD",
    description="Flamyngo is a customizable Flask frontend for MongoDB.",
    long_description=long_desc,
    keywords=["flask", "web", "frontend", "gui", "MongoDB"],
    classifiers=[
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent"
    ],
    entry_points={
          'console_scripts': [
              'flm = flamyngo.flm:main'
          ]
    }
)
<commit_msg>v0.10.6 release<commit_after># coding: utf-8
# Copyright (c) Materials Virtual Lab
# Distributed under the terms of the BSD License.

import glob
import os
from io import open

from setuptools import setup, find_packages

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

long_desc = """
Flamyngo is a customizable Flask frontend for MongoDB.

At the most basic level, the aim is to delegate most settings to a YAML
configuration file, which then allows the  underlying code to be reused for
any conceivable collection.

Detailed usage instructions are available at the project's `Github page
<https://github.com/materialsvirtuallab/flamyngo>`_.
"""

setup(
    name="flamyngo",
    packages=find_packages(),
    version="0.10.6",
    install_requires=["flask", "pyyaml", "monty>=0.7.0", "pymongo"],
    package_data={"flamyngo": ["static/*.*", "static/js/*.*",
                               "templates/*"]},
    author="Shyue Ping Ong",
    author_email="ongsp@eng.ucsd.edu",
    maintainer="Shyue Ping Ong",
    maintainer_email="ongsp@eng.ucsd.edu",
    url="https://github.com/materialsvirtuallab/flamyngo",
    license="BSD",
    description="Flamyngo is a customizable Flask frontend for MongoDB.",
    long_description=long_desc,
    keywords=["flask", "web", "frontend", "gui", "MongoDB"],
    classifiers=[
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent"
    ],
    entry_points={
          'console_scripts': [
              'flm = flamyngo.flm:main'
          ]
    }
)
<|endoftext|>


<commit_before>import re
import ast
import platform
from setuptools import setup, find_packages

_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('pgcli/__init__.py', 'rb') as f:
    version = str(ast.literal_eval(_version_re.search(
        f.read().decode('utf-8')).group(1)))

description = 'CLI for Postgres Database. With auto-completion and syntax highlighting.'

install_requirements = [
    'pgspecial>=1.8.0',
    'click >= 4.1',
    'Pygments >= 2.0',  # Pygments has to be Capitalcased. WTF?
    'prompt_toolkit>=1.0.10,<1.1.0',
    'psycopg2 >= 2.5.4',
    'sqlparse >=0.2.2,<0.3.0',
    'configobj >= 5.0.6',
    'humanize >= 0.5.1',
    'wcwidth >= 0.1.6',
    'cli_helpers >= 0.1.0',
]

# setproctitle is used to mask the password when running `ps` in command line.
# But this is not necessary in Windows since the password is never shown in the
# task manager. Also setproctitle is a hard dependency to install in Windows,
# so we'll only install it if we're not in Windows.
if platform.system() != 'Windows' and not platform.system().startswith("CYGWIN"):
    install_requirements.append('setproctitle >= 1.1.9')

setup(
    name='pgcli',
    author='Pgcli Core Team',
    author_email='pgcli-dev@googlegroups.com',
    version=version,
    license='LICENSE.txt',
    url='http://pgcli.com',
    packages=find_packages(),
    package_data={'pgcli': ['pgclirc',
                            'packages/pgliterals/pgliterals.json']},
    description=description,
    long_description=open('README.rst').read(),
    install_requires=install_requirements,
    entry_points='''
        [console_scripts]
        pgcli=pgcli.main:cli
    ''',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: Unix',
        '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 :: SQL',
        'Topic :: Database',
        'Topic :: Database :: Front-Ends',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<commit_msg>Bump cli_helpers version.<commit_after>import re
import ast
import platform
from setuptools import setup, find_packages

_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('pgcli/__init__.py', 'rb') as f:
    version = str(ast.literal_eval(_version_re.search(
        f.read().decode('utf-8')).group(1)))

description = 'CLI for Postgres Database. With auto-completion and syntax highlighting.'

install_requirements = [
    'pgspecial>=1.8.0',
    'click >= 4.1',
    'Pygments >= 2.0',  # Pygments has to be Capitalcased. WTF?
    'prompt_toolkit>=1.0.10,<1.1.0',
    'psycopg2 >= 2.5.4',
    'sqlparse >=0.2.2,<0.3.0',
    'configobj >= 5.0.6',
    'humanize >= 0.5.1',
    'wcwidth >= 0.1.6',
    'cli_helpers >= 0.2.0',
]

# setproctitle is used to mask the password when running `ps` in command line.
# But this is not necessary in Windows since the password is never shown in the
# task manager. Also setproctitle is a hard dependency to install in Windows,
# so we'll only install it if we're not in Windows.
if platform.system() != 'Windows' and not platform.system().startswith("CYGWIN"):
    install_requirements.append('setproctitle >= 1.1.9')

setup(
    name='pgcli',
    author='Pgcli Core Team',
    author_email='pgcli-dev@googlegroups.com',
    version=version,
    license='LICENSE.txt',
    url='http://pgcli.com',
    packages=find_packages(),
    package_data={'pgcli': ['pgclirc',
                            'packages/pgliterals/pgliterals.json']},
    description=description,
    long_description=open('README.rst').read(),
    install_requires=install_requirements,
    entry_points='''
        [console_scripts]
        pgcli=pgcli.main:cli
    ''',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: Unix',
        '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 :: SQL',
        'Topic :: Database',
        'Topic :: Database :: Front-Ends',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<|endoftext|>


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

from setuptools import setup

setup(
    name='sht',
    version='1.1',
    description='A fast spherical harmonic transform implementation',
    author='Praveen Venkatesh',
    url='https://github.com/praveenv253/sht',
    packages=['sht', ],
    install_requires=['numpy', 'scipy', ],
    setup_requires=['pytest-runner', ],
    tests_require=['pytest', ],
    license='MIT',
)
<commit_msg>Update version number in setup.py.<commit_after>#!/usr/bin/env python3

from setuptools import setup

setup(
    name='sht',
    version='1.2',
    description='A fast spherical harmonic transform implementation',
    author='Praveen Venkatesh',
    url='https://github.com/praveenv253/sht',
    packages=['sht', ],
    install_requires=['numpy', 'scipy', ],
    setup_requires=['pytest-runner', ],
    tests_require=['pytest', ],
    license='MIT',
)
<|endoftext|>


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

from os import path
from setuptools import setup, find_packages

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

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

setup(
    name='ogn-python',
    version='0.5.0',
    description='A database backend for the Open Glider Network',
    long_description=long_description,
    url='https://github.com/glidernet/ogn-python',
    author='Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel, Dominic Spreitz',
    author_email='kerel-fs@gmx.de',
    license='AGPLv3',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: GNU Affero General Public License v3',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9-dev'
    ],
    keywords='gliding ogn',
    packages=find_packages(exclude=['tests', 'tests.*']),
    install_requires=[
        'Flask==2.0.1',
        'Flask-SQLAlchemy==2.5.1',
        'Flask-Migrate==3.0.1',
        'Flask-Bootstrap==3.3.7.1',
        'Flask-WTF==0.15.1',
        'Flask-Caching==1.10.1',
        'Flask-Profiler==1.8.1',
        'geopy==2.2.0',
        'celery==4.4.7',
        'Flask-Redis==0.4.0',
        'redis==3.5.3',
        'aerofiles==1.0.0',
        'geoalchemy2==0.9.0',
        'shapely==1.7.1',
        'ogn-client==1.2.1',
        'mgrs==1.4.0',
        'psycopg2-binary==2.8.6',
        'xmlunittest==0.5.0',
        'flower==0.9.7',
        'tqdm==4.61.0',
        'requests==2.25.1',
        'matplotlib==3.3.4',
        'bokeh==2.3.2',
        'pandas==1.1.5',
        'flydenity==0.1.6',
        'gunicorn==20.1.0'
    ],
    test_require=[
        'pytest==5.0.1',
        'flake8==1.1.1',
        'xmlunittest==0.4.0',
    ],
    zip_safe=False
)
<commit_msg>Bump mgrs from 1.4.0 to 1.4.2<commit_after>#!/usr/bin/env python3

from os import path
from setuptools import setup, find_packages

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

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

setup(
    name='ogn-python',
    version='0.5.0',
    description='A database backend for the Open Glider Network',
    long_description=long_description,
    url='https://github.com/glidernet/ogn-python',
    author='Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel, Dominic Spreitz',
    author_email='kerel-fs@gmx.de',
    license='AGPLv3',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: GNU Affero General Public License v3',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9-dev'
    ],
    keywords='gliding ogn',
    packages=find_packages(exclude=['tests', 'tests.*']),
    install_requires=[
        'Flask==2.0.1',
        'Flask-SQLAlchemy==2.5.1',
        'Flask-Migrate==3.0.1',
        'Flask-Bootstrap==3.3.7.1',
        'Flask-WTF==0.15.1',
        'Flask-Caching==1.10.1',
        'Flask-Profiler==1.8.1',
        'geopy==2.2.0',
        'celery==4.4.7',
        'Flask-Redis==0.4.0',
        'redis==3.5.3',
        'aerofiles==1.0.0',
        'geoalchemy2==0.9.4',
        'shapely==1.7.1',
        'ogn-client==1.2.1',
        'mgrs==1.4.2',
        'psycopg2-binary==2.8.6',
        'xmlunittest==0.5.0',
        'flower==0.9.7',
        'tqdm==4.62.3',
        'requests==2.26.0',
        'matplotlib==3.3.4',
        'bokeh==2.3.2',
        'pandas==1.1.5',
        'flydenity==0.1.6',
        'gunicorn==20.1.0'
    ],
    test_require=[
        'pytest==5.0.1',
        'flake8==1.1.1',
        'xmlunittest==0.4.0',
    ],
    zip_safe=False
)
<|endoftext|>


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

#
# Jasy - Web Tooling Framework
# Copyright 2010-2012 Sebastian Werner
#

import sys, os, pkg_resources

major, minor = sys.version_info[:2]

if major < 3:
    print("Jasy requires Python 3")
    sys.exit(1)

# Load distutils and switch to distribute afterwards
from distutils.core import setup

# Import Jasy for version info etc.
import jasy

requires = [ 'pygments', 'polib', 'misaka', 'msgpack-python' ]

if not "sdist" in sys.argv:
    if sys.platform == "win32":
        try:
            import misaka
        except ImportError:
            print("Please install Misaka using a binary distribution first!")
            sys.exit(1)

        try:
            import msgpack
        except ImportError:
            print("Please install Msgpack-Python using a binary distribution first!")
            sys.exit(1)

        requires = [ 'pygments', 'polib' ]

    else:
        try:
            import cython
        except ImportError:
            print("Please install Cython first!")
            sys.exit(1)

setup(
      name = 'jasy',
      version = jasy.__version__,

      author = 'Sebastian Werner',
      author_email = 'info@sebastian-werner.net',

      url = 'http://github.com/wpbasti/jasy',
      download_url = "http://pypi.python.org/packages/source/j/jasy/jasy-%s.zip" % jasy.__version__,

      license = "Apache v2.0",
      platforms = 'any',

      description = "Web Tooling Framework",
      long_description = open('readme.md').read(),

      # Via: http://pypi.python.org/pypi?%3Aaction=list_classifiers
      classifiers = [

        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Topic :: Documentation',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Compilers',
        'Topic :: Software Development :: Code Generators',
        'Topic :: Software Development :: Internationalization',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Software Development :: Localization',
        'Topic :: Software Development :: Testing'

      ],

      packages = [
        'jasy',
        'jasy.asset',
        'jasy.core',
        'jasy.i18n',
        'jasy.js',
        'jasy.js.api',
        'jasy.js.clean',
        'jasy.js.optimize',
        'jasy.js.output',
        'jasy.js.parse',
        'jasy.js.tokenize',
        'jasy.js.util',
        'jasy.test',
        'jasy.util'
      ],

      package_data = {
        'jasy': [
          'data/cldr/VERSION',
          'data/cldr/keys/*.xml',
          'data/cldr/main/*.xml',
          'data/cldr/supplemental/*.xml'
        ]
      },

      install_requires=requires,

      scripts = [ "bin/jasy", "bin/jasy-test",  "bin/jasy-util", "bin/jasy.bat" ],

      data_files = [
        ("doc", [
          "license.md",
          "readme.md"
         ]
        )
      ]
)
<commit_msg>Added new scripts to setup.py<commit_after>#!/usr/bin/env python3

#
# Jasy - Web Tooling Framework
# Copyright 2010-2012 Sebastian Werner
#

import sys, os, pkg_resources

major, minor = sys.version_info[:2]

if major < 3:
    print("Jasy requires Python 3")
    sys.exit(1)

# Load distutils and switch to distribute afterwards
from distutils.core import setup

# Import Jasy for version info etc.
import jasy

requires = [ 'pygments', 'polib', 'misaka', 'msgpack-python' ]

if not "sdist" in sys.argv:
    if sys.platform == "win32":
        try:
            import misaka
        except ImportError:
            print("Please install Misaka using a binary distribution first!")
            sys.exit(1)

        try:
            import msgpack
        except ImportError:
            print("Please install Msgpack-Python using a binary distribution first!")
            sys.exit(1)

        requires = [ 'pygments', 'polib' ]

    else:
        try:
            import cython
        except ImportError:
            print("Please install Cython first!")
            sys.exit(1)

setup(
      name = 'jasy',
      version = jasy.__version__,

      author = 'Sebastian Werner',
      author_email = 'info@sebastian-werner.net',

      url = 'http://github.com/wpbasti/jasy',
      download_url = "http://pypi.python.org/packages/source/j/jasy/jasy-%s.zip" % jasy.__version__,

      license = "Apache v2.0",
      platforms = 'any',

      description = "Web Tooling Framework",
      long_description = open('readme.md').read(),

      # Via: http://pypi.python.org/pypi?%3Aaction=list_classifiers
      classifiers = [

        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Topic :: Documentation',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Compilers',
        'Topic :: Software Development :: Code Generators',
        'Topic :: Software Development :: Internationalization',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Software Development :: Localization',
        'Topic :: Software Development :: Testing'

      ],

      packages = [
        'jasy',
        'jasy.asset',
        'jasy.core',
        'jasy.i18n',
        'jasy.js',
        'jasy.js.api',
        'jasy.js.clean',
        'jasy.js.optimize',
        'jasy.js.output',
        'jasy.js.parse',
        'jasy.js.tokenize',
        'jasy.js.util',
        'jasy.test',
        'jasy.util'
      ],

      package_data = {
        'jasy': [
          'data/cldr/VERSION',
          'data/cldr/keys/*.xml',
          'data/cldr/main/*.xml',
          'data/cldr/supplemental/*.xml'
        ]
      },

      install_requires=requires,

      scripts = [ "bin/jasy", "bin/jasy-test",  "bin/jasy-util", "bin/jasy.bat", "bin/jasy-test.bat", "bin/jasy-util.bat" ],

      data_files = [
        ("doc", [
          "license.md",
          "readme.md"
         ]
        )
      ]
)
<|endoftext|>


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

# from distutils.core import setup
from setuptools import setup

setup(
    name='upcloud-api-python',
    version='0.1',
    description='UpCloud API Client',
    author='Elias Nygren',
    author_email='elias.nygren@upcloud.com',
    maintainer='Elias Nygren',
    maintainer_email='elias.nygren@upcloud.com',
    url='https://www.upcloud.com',
    packages=['upcloud', 'upcloud.cloud_manager'],
    download='https://github.com/UpCloudLtd/upcloud-python-api/tarball/v0.1',
    license='MIT',
    install_requires=[
        'mock==1.0.1',
        'py==1.4.26',
        'pytest==2.6.4',
        'requests==2.6.0',
        'responses==0.3.0',
        'six==1.9.0'
    ]
)
<commit_msg>bump version to 0.1.1<commit_after>#!/usr/bin/env python

# from distutils.core import setup
from setuptools import setup

setup(
    name='upcloud-api-python',
    version='0.1.1',
    description='UpCloud API Client',
    author='Elias Nygren',
    author_email='elias.nygren@upcloud.com',
    maintainer='Elias Nygren',
    maintainer_email='elias.nygren@upcloud.com',
    url='https://www.upcloud.com',
    packages=['upcloud', 'upcloud.cloud_manager'],
    download='https://github.com/UpCloudLtd/upcloud-python-api/tarball/v0.1.1',
    license='MIT',
    install_requires=[
        'mock==1.0.1',
        'py==1.4.26',
        'pytest==2.6.4',
        'requests==2.6.0',
        'responses==0.3.0',
        'six==1.9.0'
    ]
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name='scell',
    version='0.1.0',
    description='simple wrapper atop select',
    license='MIT',
    author='Eugene Eeo',
    author_email='packwolf58@gmail.com',
    url='https://github.com/eugene-eeo/scell',
    packages=['scell'],

    platforms='any',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
    ],
)
<commit_msg>bump version<commit_after>from distutils.core import setup

setup(
    name='scell',
    version='0.1.1',
    description='simple wrapper atop select',
    license='MIT',
    author='Eugene Eeo',
    author_email='packwolf58@gmail.com',
    url='https://github.com/eugene-eeo/scell',
    packages=['scell'],

    platforms='any',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
    ],
)
<|endoftext|>


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

# -*- coding: utf-8 -*-

# vim: tabstop=4 shiftwidth=4 softtabstop=4

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

import os
import re

from setuptools import setup

def _path(fn):
    return os.path.join(os.path.dirname(__file__), fn)

def _has_all(text, search_for):
    matches = 0
    for s in search_for:
        if text.find(s) != -1:
            matches += 1
    return matches == len(search_for)

def _readme():
    # Filter out screenshots...
    lines = []
    with open(_path("README.rst"), "rb") as handle:
        contents = handle.read().decode('utf-8')
        for line in contents.splitlines():
            screenshot = False
            if _has_all(line, ['screenshots', '.png']):
                if re.match(r"^..(\s+)image::(.*)$", line, re.I):
                    screenshot = True
            if not screenshot:
                lines.append(line)
    return "\n".join(lines)

setup(name='gerrit-view',
      version='0.4.4',
      description='Gerrit viewer tools',
      author="Joshua Harlow",
      author_email='harlowja@yahoo-inc.com',
      url='http://github.com/harlowja/gerrit_view/',
      scripts=[
          _path(os.path.join('scripts', 'cgerrit')),
          _path(os.path.join('scripts', 'qgerrit')),
          _path(os.path.join('scripts', 'czuul')),
      ],
      license="ASL 2.0",
      install_requires=[
          'gerritlib',
          'prettytable',
          'requests',
          'six',
          'sloq',
          'urwid',
      ],
      classifiers=[
        "Development Status :: 4 - Beta",
        "Topic :: Utilities",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python",
      ],
      keywords="gerrit curses urwid console",
      long_description=_readme(),
     )
<commit_msg>Bump for 0.4.5<commit_after>#!/usr/bin/env python

# -*- coding: utf-8 -*-

# vim: tabstop=4 shiftwidth=4 softtabstop=4

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

import os
import re

from setuptools import setup

def _path(fn):
    return os.path.join(os.path.dirname(__file__), fn)

def _has_all(text, search_for):
    matches = 0
    for s in search_for:
        if text.find(s) != -1:
            matches += 1
    return matches == len(search_for)

def _readme():
    # Filter out screenshots...
    lines = []
    with open(_path("README.rst"), "rb") as handle:
        contents = handle.read().decode('utf-8')
        for line in contents.splitlines():
            screenshot = False
            if _has_all(line, ['screenshots', '.png']):
                if re.match(r"^..(\s+)image::(.*)$", line, re.I):
                    screenshot = True
            if not screenshot:
                lines.append(line)
    return "\n".join(lines)

setup(name='gerrit-view',
      version='0.4.5',
      description='Gerrit viewer tools',
      author="Joshua Harlow",
      author_email='harlowja@yahoo-inc.com',
      url='http://github.com/harlowja/gerrit_view/',
      scripts=[
          _path(os.path.join('scripts', 'cgerrit')),
          _path(os.path.join('scripts', 'qgerrit')),
          _path(os.path.join('scripts', 'czuul')),
      ],
      license="ASL 2.0",
      install_requires=[
          'gerritlib',
          'prettytable',
          'requests',
          'six',
          'sloq',
          'urwid',
      ],
      classifiers=[
        "Development Status :: 4 - Beta",
        "Topic :: Utilities",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python",
      ],
      keywords="gerrit curses urwid console",
      long_description=_readme(),
     )
<|endoftext|>


<commit_before>from setuptools import setup
from sigopt_sklearn.version import VERSION

# keep this in sync with requirements.txt
install_requires=[
   'sigopt',
   'numpy',
   'sklearn',
   'joblib']

setup(
  name='sigopt_sklearn',
  version=VERSION,
  description='SigOpt + scikit-learn Integrations',
  author='SigOpt',
  author_email='support@sigopt.com',
  url='https://sigopt.com/',
  packages=['sigopt_sklearn'],
  install_requires=install_requires,
  classifiers=[
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Topic :: Software Development :: Libraries :: Python Modules",
  ]
)
<commit_msg>Sync up setup.py requirements<commit_after>from setuptools import setup
from sigopt_sklearn.version import VERSION

# keep this in sync with requirements.txt
install_requires = [
  'joblib==0.9.4',
  'numpy==1.10.1',
  'scikit-learn==0.17.1',
  'sigopt==1.6.4',
  'xgboost==0.4a30',
]

setup(
  name='sigopt_sklearn',
  version=VERSION,
  description='SigOpt + scikit-learn Integrations',
  author='SigOpt',
  author_email='support@sigopt.com',
  url='https://sigopt.com/',
  packages=['sigopt_sklearn'],
  install_requires=install_requires,
  classifiers=[
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Topic :: Software Development :: Libraries :: Python Modules",
  ]
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- encoding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import codecs
import os
import re

from setuptools import find_packages, setup

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

version = get_version('patchy')

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

with codecs.open('HISTORY.rst', 'r', 'utf-8') as history_file:
    history = history_file.read().replace('.. :changelog:', '')

requirements = [
    'six>=1.9.0',
]

setup(
    name='patchy',
    version=version,
    description="Patch the inner source of python functions at runtime.",
    long_description=readme + '\n\n' + history,
    author="Adam Johnson",
    author_email='me@adamj.eu',
    url='https://github.com/adamchainz/patchy',
    packages=find_packages(exclude=['tests', 'tests.*']),
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='patchy',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)
<commit_msg>setup.py - use codecs.open and context manager<commit_after>#!/usr/bin/env python
# -*- encoding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import codecs
import os
import re

from setuptools import find_packages, setup

def get_version(package):
    """
    Return package version as listed in `__version__` in `init.py`.
    """
    with codecs.open(os.path.join(package, '__init__.py'), 'r', 'utf-8') as fp:
        init_py = fp.read()
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)

version = get_version('patchy')

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

with codecs.open('HISTORY.rst', 'r', 'utf-8') as history_file:
    history = history_file.read().replace('.. :changelog:', '')

requirements = [
    'six>=1.9.0',
]

setup(
    name='patchy',
    version=version,
    description="Patch the inner source of python functions at runtime.",
    long_description=readme + '\n\n' + history,
    author="Adam Johnson",
    author_email='me@adamj.eu',
    url='https://github.com/adamchainz/patchy',
    packages=find_packages(exclude=['tests', 'tests.*']),
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='patchy',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)
<|endoftext|>


<commit_before>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
    name='django-remote-finder',
    version='0.1',
    author='Jim Garrison',
    packages=[
        'remote_finder',
    ],
    install_requires=['Django'],
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<commit_msg>django-remote-finder version 0.2<commit_after>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
    name='django-remote-finder',
    version='0.2',
    author='Jim Garrison',
    packages=[
        'remote_finder',
    ],
    install_requires=['Django'],
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)
<|endoftext|>


<commit_before># When pip installs anything from packages, py_modules, or ext_modules that
# includes a twistd plugin (which are installed to twisted/plugins/),
# setuptools/distribute writes a Package.egg-info/top_level.txt that includes
# "twisted".  If you later uninstall Package with `pip uninstall Package`,
# pip <1.2 removes all of twisted/ instead of just Package's twistd plugins.
# See https://github.com/pypa/pip/issues/355 (now fixed)
#
# To work around this problem, we monkeypatch
# setuptools.command.egg_info.write_toplevel_names to not write the line
# "twisted".  This fixes the behavior of `pip uninstall Package`.  Note that
# even with this workaround, `pip uninstall Package` still correctly uninstalls
# Package's twistd plugins from twisted/plugins/, since pip also uses
# Package.egg-info/installed-files.txt to determine what to uninstall,
# and the paths to the plugin files are indeed listed in installed-files.txt.
from distutils import log
from setuptools import setup

try:
    from setuptools.command import egg_info
    egg_info.write_toplevel_names
except (ImportError, AttributeError):
    pass
else:
    def _top_level_package(name):
        return name.split('.', 1)[0]

    def _hacked_write_toplevel_names(cmd, basename, filename):
        pkgs = dict.fromkeys(
            [_top_level_package(k)
                for k in cmd.distribution.iter_distribution_names()
                if _top_level_package(k) != "twisted"
            ]
        )
        cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')

    egg_info.write_toplevel_names = _hacked_write_toplevel_names

# Now actually define the setup
import txsockjs
import os

setup(
    author="Christopher Gamble",
    author_email="chris@chrisgamble.net",
    name="txsockjs",
    version=txsockjs.__version__,
    description="Twisted SockJS wrapper",
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
    url="http://github.com/Fugiman/sockjs-twisted",
    license='BSD License',
    platforms=['OS Independent'],
    packages=["txsockjs","txsockjs.protocols","twisted.plugins"],
    install_requires=[
        "Twisted",
    ],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Twisted",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet",
    ],
)

# Make Twisted regenerate the dropin.cache, if possible.  This is necessary
# because in a site-wide install, dropin.cache cannot be rewritten by
# normal users.
try:
    from twisted.plugin import IPlugin, getPlugins
    list(getPlugins(IPlugin))
except Exception, e:
    log.warn("*** Failed to update Twisted plugin cache. ***")
    log.warn(str(e))
<commit_msg>Removed Twisted plugins cache regeneration from setup.py<commit_after># When pip installs anything from packages, py_modules, or ext_modules that
# includes a twistd plugin (which are installed to twisted/plugins/),
# setuptools/distribute writes a Package.egg-info/top_level.txt that includes
# "twisted".  If you later uninstall Package with `pip uninstall Package`,
# pip <1.2 removes all of twisted/ instead of just Package's twistd plugins.
# See https://github.com/pypa/pip/issues/355 (now fixed)
#
# To work around this problem, we monkeypatch
# setuptools.command.egg_info.write_toplevel_names to not write the line
# "twisted".  This fixes the behavior of `pip uninstall Package`.  Note that
# even with this workaround, `pip uninstall Package` still correctly uninstalls
# Package's twistd plugins from twisted/plugins/, since pip also uses
# Package.egg-info/installed-files.txt to determine what to uninstall,
# and the paths to the plugin files are indeed listed in installed-files.txt.
from distutils import log
from setuptools import setup

try:
    from setuptools.command import egg_info
    egg_info.write_toplevel_names
except (ImportError, AttributeError):
    pass
else:
    def _top_level_package(name):
        return name.split('.', 1)[0]

    def _hacked_write_toplevel_names(cmd, basename, filename):
        pkgs = dict.fromkeys(
            [_top_level_package(k)
                for k in cmd.distribution.iter_distribution_names()
                if _top_level_package(k) != "twisted"
            ]
        )
        cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')

    egg_info.write_toplevel_names = _hacked_write_toplevel_names

# Now actually define the setup
import txsockjs
import os

setup(
    author="Christopher Gamble",
    author_email="chris@chrisgamble.net",
    name="txsockjs",
    version=txsockjs.__version__,
    description="Twisted SockJS wrapper",
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
    url="http://github.com/Fugiman/sockjs-twisted",
    license='BSD License',
    platforms=['OS Independent'],
    packages=["txsockjs","txsockjs.protocols","twisted.plugins"],
    install_requires=[
        "Twisted",
    ],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Twisted",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet",
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

ANALYSIS_PLUGINS = [
    "complexity = pordego_complexity.complexity_analysis:analyze_complexity"
]

CLASSIFIERS = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 2.7"
]

VERSION = "1.0.2"

setup(name="pordego-complexity",
      version=VERSION,
      author="Tim Treptow",
      author_email="tim.treptow@gmail.com",
      description="Pordego plugin for code complexity analysis using the Radon library",
      packages=find_packages(),
      url="https://github.com/ttreptow/pordego-complexity",
      download_url="https://github.com/ttreptow/pordego-complexity/tarball/{}".format(VERSION),
      entry_points={"pordego.analysis": ANALYSIS_PLUGINS},
      classifiers=CLASSIFIERS,
      install_requires=["radon"]
      )
<commit_msg>Add license to metadata<commit_after>from setuptools import setup, find_packages

ANALYSIS_PLUGINS = [
    "complexity = pordego_complexity.complexity_analysis:analyze_complexity"
]

with open('LICENSE') as f:
    LICENSE = f.read()

CLASSIFIERS = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 2.7"
]

VERSION = "1.0.2"

setup(name="pordego-complexity",
      version=VERSION,
      license=LICENSE,
      author="Tim Treptow",
      author_email="tim.treptow@gmail.com",
      description="Pordego plugin for code complexity analysis using the Radon library",
      packages=find_packages(exclude=('tests', 'docs', "tests.*")),
      url="https://github.com/ttreptow/pordego-complexity",
      download_url="https://github.com/ttreptow/pordego-complexity/tarball/{}".format(VERSION),
      entry_points={"pordego.analysis": ANALYSIS_PLUGINS},
      classifiers=CLASSIFIERS,
      install_requires=["radon"]
      )
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

with open("README.rst",  "rt") as f: readme = f.read()

setup(
    name='gimei',
    version="0.1",
    description="generates the name and the address at random.",
    long_description=__doc__,
    author='Mao Nabeta',
    author_email='mao.nabeta@gmail.com',
    url='https://github.com/nabetama/gimei',
    packages=find_packages(),
    include_package_data=True,
    install_requires=['pyyaml'],
    provides=['gimei', 'name', 'random'],
    keywords=['gimei', 'name', 'random'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Communications :: Chat',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
        ]
    )
<commit_msg>Fixed: Missing data_files.<commit_after>from setuptools import setup, find_packages

with open("README.rst",  "rt") as f: readme = f.read()

setup(
    name='gimei',
    version="0.1.1",
    description="generates the name and the address at random.",
    long_description=__doc__,
    author='Mao Nabeta',
    author_email='mao.nabeta@gmail.com',
    url='https://github.com/nabetama/gimei',
    packages=find_packages(),
    include_package_data=True,
    install_requires=['pyyaml'],
    provides=['gimei', 'name', 'random'],
    keywords=['gimei', 'name', 'random'],
    data_files=[
        ('gimei/data/', ['gimei/data/addresses.yml', 'gimei/data/names.yml']),
    ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Communications :: Chat',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
        ]
    )
<|endoftext|>