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

"""Setup file."""

from setuptools import find_packages, setup

from setup_helpers import (get_version, include_file, PyTest,
                           require_python)

require_python(50725360)
__version__ = get_version('blackhole/__init__.py')

entry_points = {
    'console_scripts': (
        'blackhole = blackhole.application:run',
        'blackhole_config = blackhole.application:blackhole_config',
    )
}

tests_require = ('codecov',
                 'guzzle_sphinx_theme',
                 'isort',
                 'pycodestyle',
                 'pydocstyle==1.1.1',
                 'pyflakes',
                 'pylama',
                 'pytest',
                 'pytest-asyncio',
                 'pytest-cov',
                 'radon',
                 'sphinx', )

description = ('Blackhole is an MTA (message transfer agent) that '
               '(figuratively) pipes all mail to /dev/null.')

keywords = ('blackhole', 'mta', 'email')

classifiers = ['Development Status :: 5 - Production/Stable',
               'Environment :: Console',
               'Intended Audience :: Developers',
               'Intended Audience :: Information Technology',
               'Intended Audience :: System Administrators',
               'License :: OSI Approved :: MIT License',
               'Operating System :: POSIX :: Linux',
               'Operating System :: Unix',
               'Programming Language :: Python',
               'Programming Language :: Python :: 3.6',
               'Programming Language :: Python :: 3 :: Only',
               'Topic :: Communications :: Email',
               'Topic :: Communications :: Email :: Mail Transport Agents',
               'Topic :: Education :: Testing',
               'Topic :: Internet',
               'Topic :: Software Development',
               'Topic :: Software Development :: Testing',
               ('Topic :: Software Development :: Testing :: '
                'Traffic Generation'),
               'Topic :: System :: Networking',
               'Topic :: System :: Systems Administration',
               'Topic :: Utilities', ]

setup(name='blackhole',
      version=__version__,
      url='https://blackhole.io/',
      author='Kura',
      author_email='kura@kura.io',
      maintainer='Kura',
      maintainer_email='kura@kura.io',
      description=description,
      long_description=include_file('README.rst'),
      keywords=', '.join(keywords),
      license=include_file('LICENSE'),
      platforms=['linux'],
      packages=find_packages(exclude=["*.tests"]),
      install_requires=[],
      tests_require=tests_require,
      cmdclass={'test': PyTest},
      entry_points=entry_points,
      classifiers=classifiers,
      )
<commit_msg>Added exta<commit_after># (The MIT License)
#
# Copyright (c) 2013-2017 Kura
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Setup file."""

from setuptools import find_packages, setup

from setup_helpers import (get_version, include_file, PyTest,
                           require_python)

require_python(50725360)
__version__ = get_version('blackhole/__init__.py')

entry_points = {
    'console_scripts': (
        'blackhole = blackhole.application:run',
        'blackhole_config = blackhole.application:blackhole_config',
    )
}

tests_require = ('codecov',
                 'guzzle_sphinx_theme',
                 'isort',
                 'pycodestyle',
                 'pydocstyle==1.1.1',
                 'pyflakes',
                 'pylama',
                 'pytest',
                 'pytest-asyncio',
                 'pytest-cov',
                 'radon',
                 'sphinx', )

description = ('Blackhole is an MTA (message transfer agent) that '
               '(figuratively) pipes all mail to /dev/null.')

keywords = ('blackhole', 'mta', 'email')

classifiers = ['Development Status :: 5 - Production/Stable',
               'Environment :: Console',
               'Intended Audience :: Developers',
               'Intended Audience :: Information Technology',
               'Intended Audience :: System Administrators',
               'License :: OSI Approved :: MIT License',
               'Operating System :: POSIX :: Linux',
               'Operating System :: Unix',
               'Programming Language :: Python',
               'Programming Language :: Python :: 3.6',
               'Programming Language :: Python :: 3 :: Only',
               'Topic :: Communications :: Email',
               'Topic :: Communications :: Email :: Mail Transport Agents',
               'Topic :: Education :: Testing',
               'Topic :: Internet',
               'Topic :: Software Development',
               'Topic :: Software Development :: Testing',
               ('Topic :: Software Development :: Testing :: '
                'Traffic Generation'),
               'Topic :: System :: Networking',
               'Topic :: System :: Systems Administration',
               'Topic :: Utilities', ]

setup(name='blackhole',
      version=__version__,
      url='https://blackhole.io/',
      author='Kura',
      author_email='kura@kura.io',
      maintainer='Kura',
      maintainer_email='kura@kura.io',
      description=description,
      long_description=include_file('README.rst'),
      keywords=', '.join(keywords),
      license=include_file('LICENSE'),
      platforms=['linux'],
      packages=find_packages(exclude=["*.tests"]),
      install_requires=[],
      tests_require=tests_require,
      extras_require={
          'uv': ['uvloop', ],
      },
      cmdclass={'test': PyTest},
      entry_points=entry_points,
      classifiers=classifiers,
      )
<|endoftext|>


<commit_before>from distutils.core import setup, Extension
import os, os.path
import re

srcDir= 'src'
srcFiles= [os.path.join(srcDir,file) for file in os.listdir('src') if re.split(r'\.',file)[-1] == 'c']

setup(name='extreme-deconvolution',
      version='1.1',
      description='Density estimation using Gaussian mixtures in the presence of noisy, heterogeneous and incomplete data',
      author='Jo Bovy',
      author_email='jb2777@nyu.edu',
      url='http://code.google.com/p/extreme-deconvolution/',
      package_dir = {'': 'py'},
      py_modules=['extreme_deconvolution'],
      ext_modules=[Extension('extreme-deconvolution', srcFiles)],
      include_dirs=['src/'],
      data_files=[('doc',['extreme-deconvolution.pdf'])])
<commit_msg>add description to setup file<commit_after>from distutils.core import setup, Extension
import os, os.path
import re

srcDir= 'src'
srcFiles= [os.path.join(srcDir,file) for file in os.listdir('src') if re.split(r'\.',file)[-1] == 'c']

longDescription= "We present a general algorithm to infer a d-dimensional distribution function given a set of heterogeneous, noisy observations or samples. This algorithm reconstructs the error-deconvolved or 'underlying' distribution function common to all samples, even when the individual samples have unique error and missing-data properties. The underlying distribution is modeled as a mixture of Gaussians, which is completely general. Model parameters are chosen to optimize a justified, scalar objective function: the logarithm of the probability of the data under the error-convolved model, where the error convolution is different for each data point. Optimization is performed by an Expectation Maximization (EM) algorithm, extended by a regularization technique and 'split-and-merge' procedure. These extensions mitigate problems with singularities and local maxima, which are often encountered when using the EM algorithm to estimate Gaussian density mixtures."

setup(name='extreme-deconvolution',
      version='1.1',
      description='Density estimation using Gaussian mixtures in the presence of noisy, heterogeneous and incomplete data',
      author='Jo Bovy',
      author_email='jb2777@nyu.edu',
      license='GPLv2',
      long_description=longDescription,
      url='http://code.google.com/p/extreme-deconvolution/',
      package_dir = {'': 'py'},
      py_modules=['extreme_deconvolution'],
      ext_modules=[Extension('extreme-deconvolution', srcFiles)],
      include_dirs=['src/'],
      data_files=[('doc',['extreme-deconvolution.pdf'])])
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='xwing',
    version='0.0.1.dev0',
    url='https://github.com/victorpoluceno/xwing',
    license='ISC',
    description='Xwing is a Python library writen using that help '
        'to distribute connect to a single port to other process',
    author='Victor Poluceno',
    author_email='victorpoluceno@gmail.com',
    packages=['xwing'],
    setup_requires=['pytest-runner'],
    tests_require=['pytest'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Distributed Computing',
        'Topic :: System :: Networking',
    ],
    scripts=['bin/xwing']
)
<commit_msg>chore: Add attrs as project requirement<commit_after>from setuptools import setup

setup(
    name='xwing',
    version='0.0.1.dev0',
    url='https://github.com/victorpoluceno/xwing',
    license='ISC',
    description='Xwing is a Python library writen using that help '
        'to distribute connect to a single port to other process',
    author='Victor Poluceno',
    author_email='victorpoluceno@gmail.com',
    packages=['xwing'],
    setup_requires=['pytest-runner'],
    tests_require=['pytest'],
    install_requires=['attrs==16.2.0'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Distributed Computing',
        'Topic :: System :: Networking',
    ],
    scripts=['bin/xwing']
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
__license__ = """
Copyright 2015 Parse.ly, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import re
import sys

from setuptools import setup, find_packages

# Get version without importing, which avoids dependency issues
def get_version():
    with open('pykafka/__init__.py') as version_file:
        return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""",
                         version_file.read()).group('version')

install_requires = [
    'kazoo'
]

lint_requires = [
    'pep8',
    'pyflakes'
]

tests_require = ['mock', 'nose', 'unittest2', 'python-snappy']
dependency_links = []
setup_requires = []
if 'nosetests' in sys.argv[1:]:
    setup_requires.append('nose')

setup(
    name='pykafka',
    version=get_version(),
    author='Keith Bourgoin and Emmett Butler',
    author_email='pykafka-user@googlegroups.com',
    url='https://github.com/Parsely/pykafka',
    description='Featureful Kafka client.',
    license='Apache License 2.0',
    packages=find_packages(),
    install_requires=install_requires,
    tests_require=tests_require,
    setup_requires=setup_requires,
    extras_require={
        'test': tests_require,
        'all': install_requires + tests_require,
        'docs': ['sphinx'] + tests_require,
        'lint': lint_requires
    },
    dependency_links=dependency_links,
    zip_safe=False,
    test_suite='nose.collector',
    include_package_data=True,
)
<commit_msg>Update description for PyPI.<commit_after>#!/usr/bin/env python
__license__ = """
Copyright 2015 Parse.ly, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import re
import sys

from setuptools import setup, find_packages

# Get version without importing, which avoids dependency issues
def get_version():
    with open('pykafka/__init__.py') as version_file:
        return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""",
                         version_file.read()).group('version')

install_requires = [
    'kazoo'
]

lint_requires = [
    'pep8',
    'pyflakes'
]

tests_require = ['mock', 'nose', 'unittest2', 'python-snappy']
dependency_links = []
setup_requires = []
if 'nosetests' in sys.argv[1:]:
    setup_requires.append('nose')

setup(
    name='pykafka',
    version=get_version(),
    author='Keith Bourgoin and Emmett Butler',
    author_email='pykafka-user@googlegroups.com',
    url='https://github.com/Parsely/pykafka',
    description='Full-Featured Pure-Python Kafka Client',
    license='Apache License 2.0',
    packages=find_packages(),
    install_requires=install_requires,
    tests_require=tests_require,
    setup_requires=setup_requires,
    extras_require={
        'test': tests_require,
        'all': install_requires + tests_require,
        'docs': ['sphinx'] + tests_require,
        'lint': lint_requires
    },
    dependency_links=dependency_links,
    zip_safe=False,
    test_suite='nose.collector',
    include_package_data=True,
)
<|endoftext|>


<commit_before>import atexit
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import call

class InstallHook(install):
    """For hooking the optimizer when setup exits"""
    def __init__(self, *a, **kw):
        install.__init__(self, *a, **kw)
        atexit.register(
            call, [sys.executable, '-m', 'calmjs.parse.parsers.optimize'])

version = '1.3.0'

classifiers = """
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: JavaScript
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
""".strip().splitlines()

long_description = (
    open('README.rst').read()
    + '\n' +
    open('CHANGES.rst').read()
    + '\n')

setup(
    name='calmjs.parse',
    version=version,
    description="Various parsers for ECMA standards.",
    long_description=long_description,
    # Get more strings from
    # http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=classifiers,
    keywords='',
    author='Tommy Yu',
    author_email='tommy.yu@auckland.ac.nz',
    url='https://github.com/calmjs/calmjs.parse',
    license='mit',
    packages=find_packages('src'),
    package_dir={'': 'src'},
    namespace_packages=['calmjs'],
    include_package_data=True,
    zip_safe=False,
    cmdclass={
        'install': InstallHook,
    },
    install_requires=[
        'setuptools',
        'ply>=3.6',
    ],
    entry_points={
    },
    test_suite="calmjs.parse.tests.make_suite",
)
<commit_msg>Include the actual support Python versions.<commit_after>import atexit
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import call

class InstallHook(install):
    """For hooking the optimizer when setup exits"""
    def __init__(self, *a, **kw):
        install.__init__(self, *a, **kw)
        atexit.register(
            call, [sys.executable, '-m', 'calmjs.parse.parsers.optimize'])

version = '1.3.0'

classifiers = """
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: JavaScript
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
""".strip().splitlines()

long_description = (
    open('README.rst').read()
    + '\n' +
    open('CHANGES.rst').read()
    + '\n')

setup(
    name='calmjs.parse',
    version=version,
    description="Various parsers for ECMA standards.",
    long_description=long_description,
    # Get more strings from
    # http://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=classifiers,
    keywords='',
    author='Tommy Yu',
    author_email='tommy.yu@auckland.ac.nz',
    url='https://github.com/calmjs/calmjs.parse',
    license='mit',
    packages=find_packages('src'),
    package_dir={'': 'src'},
    namespace_packages=['calmjs'],
    include_package_data=True,
    zip_safe=False,
    cmdclass={
        'install': InstallHook,
    },
    install_requires=[
        'setuptools',
        'ply>=3.6',
    ],
    entry_points={
    },
    test_suite="calmjs.parse.tests.make_suite",
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name = "django-redis-cache",
    url = "http://github.com/sebleier/django-redis-cache/",
    author = "Sean Bleier",
    author_email = "sebleier@gmail.com",
    version = "0.5.1",
    packages = ["redis_cache"],
    description = "Redis Cache Backend for Django",
    install_requires=['redis>=2.4.0',],
    classifiers = [
        "Programming Language :: Python",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries",
        "Topic :: Utilities",
        "Environment :: Web Environment",
        "Framework :: Django",
    ],
)
<commit_msg>use setuptools to be able to use install_requires<commit_after>from setuptools import setup

setup(
    name = "django-redis-cache",
    url = "http://github.com/sebleier/django-redis-cache/",
    author = "Sean Bleier",
    author_email = "sebleier@gmail.com",
    version = "0.5.1",
    packages = ["redis_cache"],
    description = "Redis Cache Backend for Django",
    install_requires=['redis>=2.4.0',],
    classifiers = [
        "Programming Language :: Python",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries",
        "Topic :: Utilities",
        "Environment :: Web Environment",
        "Framework :: Django",
    ],
)
<|endoftext|>


<commit_before>"""
geopy
"""

from setuptools import setup, find_packages

install_requires = []
tests_require = [
    'nose-cov',
    'oauth2',
    'beautifulsoup4',
    'tox',
]

# Test if we have built-in JSON - Python 2.6+, 3.0+.
# Older Python versions require simplejson.
# Alternatively, if Django is installed, plug into the django
# copy of simplejson.
try:
    import json # pylint: disable=W0611
except ImportError:
    try:
        import simplejson # pylint: disable=W0611,F0401
    except ImportError:
        try:
            from django.utils import simplejson # pylint: disable=F0401
        except ImportError:
            install_requires.append('simplejson')

# note: not automated since py3k cannot import geopy.get_version at
# install-time (since 2to3 has not yet run)
version = "0.96.1" # pylint: disable=C0103

setup(name='geopy',
    version=version,
    description='Python Geocoding Toolbox',
    author='GeoPy Contributors',
    author_email='mike@tig.as', # subject to change
    url='https://github.com/geopy/geopy',
    download_url = 'https://github.com/geopy/geopy/archive/%s.tar.gz' % version,
    packages=find_packages(),
    install_requires=install_requires,
    tests_require=tests_require,
    license='MIT',
    keywords='geocode geocoding gis geographical maps earth distance',
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Scientific/Engineering :: GIS",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
    ],
    use_2to3=True,
)
<commit_msg>fix auto "download_url" in setup.py to match tag names<commit_after>"""
geopy
"""

from setuptools import setup, find_packages

install_requires = []
tests_require = [
    'nose-cov',
    'oauth2',
    'beautifulsoup4',
    'tox',
]

# Test if we have built-in JSON - Python 2.6+, 3.0+.
# Older Python versions require simplejson.
# Alternatively, if Django is installed, plug into the django
# copy of simplejson.
try:
    import json # pylint: disable=W0611
except ImportError:
    try:
        import simplejson # pylint: disable=W0611,F0401
    except ImportError:
        try:
            from django.utils import simplejson # pylint: disable=F0401
        except ImportError:
            install_requires.append('simplejson')

# note: not automated since py3k cannot import geopy.get_version at
# install-time (since 2to3 has not yet run)
version = "0.96.1" # pylint: disable=C0103

setup(name='geopy',
    version=version,
    description='Python Geocoding Toolbox',
    author='GeoPy Contributors',
    author_email='mike@tig.as', # subject to change
    url='https://github.com/geopy/geopy',
    download_url = 'https://github.com/geopy/geopy/archive/release-%s.tar.gz' % version,
    packages=find_packages(),
    install_requires=install_requires,
    tests_require=tests_require,
    license='MIT',
    keywords='geocode geocoding gis geographical maps earth distance',
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Scientific/Engineering :: GIS",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
    ],
    use_2to3=True,
)
<|endoftext|>


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

class PushDocCommand(Command):
    description = "uploads the documentation to m-labs.hk"
    user_options = []
    def initialize_options(self):
        pass
    def finalize_options(self):
        pass
    def run(self):
        os.system("rsync -avz doc/_build/html/ shell.serverraum.org:~/web/m-labs.hk/pythonparser")

setup(
    name="pythonparser",
    version="1.0",
    author="whitequark",
    author_email="whitequark@whitequark.org",
    url="https://m-labs.hk/pythonparser",
    download_url="https://github.com/m-labs/pythonparser",
    description="A Python parser intended for use in tooling",
    long_description=open("README.md").read(),
    license="MIT",
    install_requires=["regex"],
    extras_require={},
    dependency_links=[],
    packages=find_packages(exclude=["tests*"]),
    namespace_packages=[],
    test_suite="pythonparser.test",
    package_data={},
    ext_modules=[],
    entry_points={},
    cmdclass={"push_doc":PushDocCommand}
)
<commit_msg>Bump version.<commit_after>from setuptools import setup, find_packages, Command
import os

class PushDocCommand(Command):
    description = "uploads the documentation to m-labs.hk"
    user_options = []
    def initialize_options(self):
        pass
    def finalize_options(self):
        pass
    def run(self):
        os.system("rsync -avz doc/_build/html/ shell.serverraum.org:~/web/m-labs.hk/pythonparser")

setup(
    name="pythonparser",
    version="1.1",
    author="whitequark",
    author_email="whitequark@whitequark.org",
    url="https://m-labs.hk/pythonparser",
    download_url="https://github.com/m-labs/pythonparser",
    description="A Python parser intended for use in tooling",
    long_description=open("README.md").read(),
    license="MIT",
    install_requires=["regex"],
    extras_require={},
    dependency_links=[],
    packages=find_packages(exclude=["tests*"]),
    namespace_packages=[],
    test_suite="pythonparser.test",
    package_data={},
    ext_modules=[],
    entry_points={},
    cmdclass={"push_doc":PushDocCommand}
)
<|endoftext|>


<commit_before># -*- coding: latin-1 -*-
from distutils.core import setup
setup(name='irsim',
      version='0.1.13',
      py_modules=['irsim', 'callbackLoader', 'stats', 'figures'],
      packages=['qsdl', 'qsdl.parser', 'qsdl.simulator', 'qsdl.simulator.errors'],
      data_files=[ ( 'example-config',
                     [
                      'example-config/config.xml',
                      'example-config/config-0.1.xsd',
                      'example-config/simulation.xml',
                      'example-config/qsdl-0.1.xsd',
                      'example-config/customConditionCallbacks.py',
                      'example-config/customCostCallbacks.py',
                      'example-config/customDecayCallbacks.py',
                      'example-config/customDerivedGainsCallbacks.py',
                      'example-config/customGainCallbacks.py',
                      'example-config/customTriggerCallbacks.py'
                      ] ),
                  ( '', ['irsim'] ) ],
      url='http://www.github.com/fire-uta/ir-simulation/',
      author='Teemu Pkknen, University of Tampere',
      author_email='teemu.paakkonen@uta.fi'
      )
<commit_msg>Version bump<commit_after># -*- coding: latin-1 -*-
from distutils.core import setup
setup(name='irsim',
      version='0.1.14',
      py_modules=['irsim', 'callbackLoader', 'stats', 'figures'],
      packages=['qsdl', 'qsdl.parser', 'qsdl.simulator', 'qsdl.simulator.errors'],
      data_files=[ ( 'example-config',
                     [
                      'example-config/config.xml',
                      'example-config/config-0.1.xsd',
                      'example-config/simulation.xml',
                      'example-config/qsdl-0.1.xsd',
                      'example-config/customConditionCallbacks.py',
                      'example-config/customCostCallbacks.py',
                      'example-config/customDecayCallbacks.py',
                      'example-config/customDerivedGainsCallbacks.py',
                      'example-config/customGainCallbacks.py',
                      'example-config/customTriggerCallbacks.py'
                      ] ),
                  ( '', ['irsim'] ) ],
      url='http://www.github.com/fire-uta/ir-simulation/',
      author='Teemu Pkknen, University of Tampere',
      author_email='teemu.paakkonen@uta.fi'
      )
<|endoftext|>


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

import ez_setup
ez_setup.use_setuptools()

import os
import glob
from setuptools import setup, find_packages

NAME = 'bacula_configuration'
VERSION = '0.10'
WEBSITE = 'http://gallew.org/bacula_configuration'
LICENSE = 'GPLv3 or later'
DESCRIPTION = 'Bacula configuration management tool'
AUTHOR = 'Brian Gallew'
EMAIL = 'bacula_configuration@gallew.org'

setup(name=NAME,
      version=VERSION,
      description=DESCRIPTION,
      long_description=open('README.md').read(),
      author=AUTHOR,
      author_email=EMAIL,
      url=WEBSITE,
      install_requires=['mysql-python'],
      extras_require={'parsing': ['pyparsing']},
      scripts=glob.glob('bin/*'),
      include_package_data=True,
      zip_safe=False,
      package_data={
          'bacula_tools': ['data/*'],
      },
      packages=['bacula_tools', ],
      classifiers=['Development Status :: 4 - Beta',
                   'Environment :: Console',
                   'Intended Audience :: System Administrators',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'License :: OSI Approved :: GNU General Public License (GPL)',
                   'Topic :: Utilities'],
      entry_points={
          'console_scripts': [
              'manage_clients = bacula_tools.client:main',
              'manage_catalogs = bacula_tools.catalog:main',
              'manage_devices = bacula_tools.device:main',
              'manage_filesets = bacula_tools.fileset:main',
              'manage_pools = bacula_tools.pool:main',
              'manage_storage = bacula_tools.storage:main',
              'manage_messages = bacula_tools.messages:main',
              'manage_schedules = bacula_tools.schedule:main',
              'manage_jobs = bacula_tools.job:main',
              'manage_directors = bacula_tools.director:main',
              'manage_scripts = bacula_tools.scripts:main',
          ]
      },
      )
<commit_msg>version bump<commit_after>#! /usr/bin/env python

import ez_setup
ez_setup.use_setuptools()

import os
import glob
from setuptools import setup, find_packages

NAME = 'bacula_configuration'
VERSION = '0.90'
WEBSITE = 'http://gallew.org/bacula_configuration'
LICENSE = 'GPLv3 or later'
DESCRIPTION = 'Bacula configuration management tool'
AUTHOR = 'Brian Gallew'
EMAIL = 'bacula_configuration@gallew.org'

setup(name=NAME,
      version=VERSION,
      description=DESCRIPTION,
      long_description=open('README.md').read(),
      author=AUTHOR,
      author_email=EMAIL,
      url=WEBSITE,
      install_requires=['mysql-python'],
      extras_require={'parsing': ['pyparsing']},
      scripts=glob.glob('bin/*'),
      include_package_data=True,
      zip_safe=False,
      package_data={
          'bacula_tools': ['data/*'],
      },
      packages=['bacula_tools', ],
      classifiers=['Development Status :: 4 - Beta',
                   'Environment :: Console',
                   'Intended Audience :: System Administrators',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'License :: OSI Approved :: GNU General Public License (GPL)',
                   'Topic :: Utilities'],
      entry_points={
          'console_scripts': [
              'manage_clients = bacula_tools.client:main',
              'manage_catalogs = bacula_tools.catalog:main',
              'manage_devices = bacula_tools.device:main',
              'manage_filesets = bacula_tools.fileset:main',
              'manage_pools = bacula_tools.pool:main',
              'manage_storage = bacula_tools.storage:main',
              'manage_messages = bacula_tools.messages:main',
              'manage_schedules = bacula_tools.schedule:main',
              'manage_jobs = bacula_tools.job:main',
              'manage_directors = bacula_tools.director:main',
              'manage_scripts = bacula_tools.scripts:main',
          ]
      },
      )
<|endoftext|>


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

from setuptools import setup, find_packages
from mamba import __version__

setup(name='mamba',
      version=__version__,
      description="The definitive testing tool for Python. Born under the banner of Behavior Driven Development.",
      long_description=open('README.md').read(),
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Operating System :: OS Independent',
          'Topic :: Software Development :: Quality Assurance',
          'Topic :: Software Development :: Testing',
          'Programming Language :: Python',
          'Programming Language :: Python::2.7',
          'Programming Language :: Python::3.6',
          'Programming Language :: Python :: Implementation',
          'Programming Language :: Python :: Implementation :: CPython',
          'Programming Language :: Python :: Implementation :: PyPy'
      ],
      keywords='',
      author=u'Néstor Salceda',
      author_email='nestor.salceda@gmail.com',
      url='http://nestorsalceda.github.io/mamba',
      license='MIT/X11',
      packages=find_packages(exclude=['ez_setup', 'examples', 'spec', 'spec.*']),
      include_package_data=True,
      zip_safe=False,
      install_requires=['clint', 'coverage'],
      test_require=['expect', 'doublex', 'doublex-expects', 'mock'],
      entry_points={
          'console_scripts': [
              'mamba = mamba.cli:main'
          ]
      })
<commit_msg>Fix Python version numbers<commit_after># -*- coding: utf-8 -*-

from setuptools import setup, find_packages
from mamba import __version__

setup(name='mamba',
      version=__version__,
      description="The definitive testing tool for Python. Born under the banner of Behavior Driven Development.",
      long_description=open('README.md').read(),
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Operating System :: OS Independent',
          'Topic :: Software Development :: Quality Assurance',
          'Topic :: Software Development :: Testing',
          'Programming Language :: Python',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: Implementation',
          'Programming Language :: Python :: Implementation :: CPython',
          'Programming Language :: Python :: Implementation :: PyPy'
      ],
      keywords='',
      author=u'Néstor Salceda',
      author_email='nestor.salceda@gmail.com',
      url='http://nestorsalceda.github.io/mamba',
      license='MIT/X11',
      packages=find_packages(exclude=['ez_setup', 'examples', 'spec', 'spec.*']),
      include_package_data=True,
      zip_safe=False,
      install_requires=['clint', 'coverage'],
      test_require=['expect', 'doublex', 'doublex-expects', 'mock'],
      entry_points={
          'console_scripts': [
              'mamba = mamba.cli:main'
          ]
      })
<|endoftext|>


<commit_before>#!/usr/bin/env python
# vim: set fileencoding=utf8 shiftwidth=4 tabstop=4 textwidth=80 foldmethod=marker :
# Copyright (c) 2010, Kou Man Tong. All rights reserved.
# Copyright (c) 2015, Ayun Park. All rights reserved.
# For licensing, see LICENSE file included in the package.

from setuptools import setup

setup(
    name="bson",
    version="0.3.4",
    packages=["bson"],
    install_requires=["pytz>=2010b"],
    author="Ayun Park",
    author_email="iamparkayun@gmail.com",
    description="BSON codec for Python",
    long_description="""Independent BSON codec for Python that doesn't depend on MongoDB.""",
    platforms="Any",
    license="BSD",
    keywords="BSON codec",
    url="http://github.com/martinkou/bson"
)
<commit_msg>Fixed url in setup.py<commit_after>#!/usr/bin/env python
# vim: set fileencoding=utf8 shiftwidth=4 tabstop=4 textwidth=80 foldmethod=marker :
# Copyright (c) 2010, Kou Man Tong. All rights reserved.
# Copyright (c) 2015, Ayun Park. All rights reserved.
# For licensing, see LICENSE file included in the package.

from setuptools import setup

setup(
    name="bson",
    version="0.3.4",
    packages=["bson"],
    install_requires=["pytz>=2010b"],
    author="Ayun Park",
    author_email="iamparkayun@gmail.com",
    description="BSON codec for Python",
    long_description="""Independent BSON codec for Python that doesn't depend on MongoDB.""",
    platforms="Any",
    license="BSD",
    keywords="BSON codec",
    url="http://github.com/py-bson/bson"
)
<|endoftext|>


<commit_before>import codecs
import os
import sys
import unittest

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

VERSION = "1.26.31"
AUTHOR = "Free Law Project"
EMAIL = "info@free.law"
HERE = os.path.abspath(os.path.dirname(__file__))

def read(*parts):
    """
    Build an absolute path from *parts* and and return the contents of the
    resulting file.  Assume UTF-8 encoding.
    """
    with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
        return f.read()

class TestNetwork(install):
    """Run network test only"""

    description = "run isolated tests that hit the network"

    def run(self):
        loader = unittest.defaultTestLoader
        runner = unittest.TextTestRunner(verbosity=2)
        tests = loader.discover("./tests/network")
        runner.run(tests)

class VerifyVersion(install):
    """Custom command to verify that the git tag matches our version"""

    description = "verify that the git tag matches our version"

    def run(self):
        tag = os.getenv("CIRCLE_TAG")

        if tag is None:
            sys.exit(
                "The 'verify' option is only available in tagged CircleCI container"
            )

        if tag != VERSION:
            message = (
                "Git tag: {0} does not match the version of this app: {1}"
            )
            sys.exit(message.format(tag, VERSION))

setup(
    name="juriscraper",
    description="An API to scrape American court websites for metadata.",
    license="BSD",
    url="https://github.com/freelawproject/juriscraper",
    version=VERSION,
    author=AUTHOR,
    author_email=EMAIL,
    maintainer=AUTHOR,
    maintainer_email=EMAIL,
    keywords=["scraping", "legal", "pacer"],
    long_description=read("README.rst"),
    long_description_content_type="text/markdown",
    packages=find_packages(exclude=["tests*"]),
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    install_requires=[
        "six",
        "argparse",
        "cchardet>=1.1.2",
        "certifi>=2017.4.17",
        "chardet<3.1.0,>=3.0.2",
        "cssselect",
        "feedparser",
        "geonamescache==0.20",
        "html5lib",
        "lxml==3.5.0",
        "python-dateutil==2.5.0",
        "requests==2.20.0",
        "selenium==2.53.6",
        "tldextract",
    ],
    tests_require=["jsondate", "mock", "vcrpy"],
    include_package_data=True,
    test_suite="tests.test_local",
    cmdclass={"verify": VerifyVersion, "testnetwork": TestNetwork,},
)
<commit_msg>Version bump<commit_after>import codecs
import os
import sys
import unittest

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

VERSION = "1.26.32"
AUTHOR = "Free Law Project"
EMAIL = "info@free.law"
HERE = os.path.abspath(os.path.dirname(__file__))

def read(*parts):
    """
    Build an absolute path from *parts* and and return the contents of the
    resulting file.  Assume UTF-8 encoding.
    """
    with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
        return f.read()

class TestNetwork(install):
    """Run network test only"""

    description = "run isolated tests that hit the network"

    def run(self):
        loader = unittest.defaultTestLoader
        runner = unittest.TextTestRunner(verbosity=2)
        tests = loader.discover("./tests/network")
        runner.run(tests)

class VerifyVersion(install):
    """Custom command to verify that the git tag matches our version"""

    description = "verify that the git tag matches our version"

    def run(self):
        tag = os.getenv("CIRCLE_TAG")

        if tag is None:
            sys.exit(
                "The 'verify' option is only available in tagged CircleCI container"
            )

        if tag != VERSION:
            message = (
                "Git tag: {0} does not match the version of this app: {1}"
            )
            sys.exit(message.format(tag, VERSION))

setup(
    name="juriscraper",
    description="An API to scrape American court websites for metadata.",
    license="BSD",
    url="https://github.com/freelawproject/juriscraper",
    version=VERSION,
    author=AUTHOR,
    author_email=EMAIL,
    maintainer=AUTHOR,
    maintainer_email=EMAIL,
    keywords=["scraping", "legal", "pacer"],
    long_description=read("README.rst"),
    long_description_content_type="text/markdown",
    packages=find_packages(exclude=["tests*"]),
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    install_requires=[
        "six",
        "argparse",
        "cchardet>=1.1.2",
        "certifi>=2017.4.17",
        "chardet<3.1.0,>=3.0.2",
        "cssselect",
        "feedparser",
        "geonamescache==0.20",
        "html5lib",
        "lxml==3.5.0",
        "python-dateutil==2.5.0",
        "requests==2.20.0",
        "selenium==2.53.6",
        "tldextract",
    ],
    tests_require=["jsondate", "mock", "vcrpy"],
    include_package_data=True,
    test_suite="tests.test_local",
    cmdclass={"verify": VerifyVersion, "testnetwork": TestNetwork,},
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""
Installing scipy:
  python setup.py install
  python setup.py fc_config --fcompiler=Gnu install

Building extensions in-place:
  python setup.py build_src build_ext --inplace

Creating scipy distribution:
  python setup.py sdist -f            #-> Scipy_complete
  python setup.py sdist_packagers -f  #-> Scipy and Scipy_core
"""

import os
import sys
from glob import glob

# Use 'setup.py sdist_packagers -f' to create separate tar-balls
# for Scipy and Scipy_core.
if 'sdist_packagers' in sys.argv:
    sys.argv[sys.argv.index('sdist_packagers')] = 'sdist'
    command_sdist = 1
elif 'bdist_rpm' in sys.argv:
    command_sdist = 1
else:
    command_sdist = 0

# Note that when running bdist_rpm, scipy_core directory does
# not exist. So, scipy_distutils must be installed before
# running bdist_rpm.
sys.path.insert(0,'scipy_core')
try:
    import scipy_distutils
    # Declare all scipy_distutils related imports here.
    from scipy_distutils.misc_util import default_config_dict
    from scipy_distutils.misc_util import get_path, merge_config_dicts
    from scipy_distutils.misc_util import get_subpackages, generate_config_py
    from scipy_distutils.core import setup, Extension
finally:
    del sys.path[0]

#-------------------------------

def setup_package(ignore_packages=[]):

    if command_sdist and os.path.isdir('scipy_core'):
        # Applying the same commands to scipy_core.
        # Results can be found in scipy_core directory.
        c = '%s %s %s' % (sys.executable,
                          os.path.abspath(os.path.join('scipy_core','setup.py')),
                          ' '.join(sys.argv[1:]))
        print c
        s = os.system(c)
        assert not s,'failed on scipy_core'

    old_path = os.getcwd()
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))

    os.chdir(local_path)
    sys.path.insert(0,os.path.join(local_path,'Lib'))
    # setup files of subpackages require scipy_core:
    sys.path.insert(0,os.path.join(local_path,'scipy_core'))
    try:
        from scipy_version import scipy_version

        # Uncomment when making releases:
        #if not command_sdist: scipy_version = '0.3.3'

        packages_path = ['Lib']
        if command_sdist:
            name = 'SciPy'
        else:
            name = 'SciPy_complete'
            packages_path.append('scipy_core')
        config_list = [{'name': name,
                        'packages':['scipy','scipy.tests'],
                        'package_dir':
                        {'scipy':'Lib',
                         'scipy.tests':os.path.join('Lib','tests')}}]

        for d in packages_path:
            config_list += get_subpackages(os.path.join(local_path,d),
                                           parent = 'scipy',
                                           parent_path=local_path,
                                           ignore_packages = ignore_packages)
        config_dict = merge_config_dicts(config_list)

        ext = Extension(name='scipy.config',
                        sources=[generate_config_py])
        config_dict['ext_modules'].append(ext)

        print 'SciPy Version %s' % scipy_version
        setup( version = scipy_version,
               maintainer = "SciPy Developers",
               maintainer_email = "scipy-dev@scipy.org",
               description = "Scientific Algorithms Library for Python",
               license = "SciPy License (BSD Style)",
               url = "http://www.scipy.org",
               **config_dict
              )

    finally:
        del sys.path[0]
        del sys.path[0]
        os.chdir(old_path)

if __name__ == "__main__":
    ignore_packages = [
        # list of package names that will not be built.
        ]
    setup_package(ignore_packages)
<commit_msg>Renamed SciPy to Scipy.<commit_after>#!/usr/bin/env python
"""
Installing scipy:
  python setup.py install
  python setup.py fc_config --fcompiler=Gnu install

Building extensions in-place:
  python setup.py build_src build_ext --inplace

Creating scipy distribution:
  python setup.py sdist -f            #-> Scipy_complete
  python setup.py sdist_packagers -f  #-> Scipy and Scipy_core
"""

import os
import sys
from glob import glob

# Use 'setup.py sdist_packagers -f' to create separate tar-balls
# for Scipy and Scipy_core.
if 'sdist_packagers' in sys.argv:
    sys.argv[sys.argv.index('sdist_packagers')] = 'sdist'
    command_sdist = 1
elif 'bdist_rpm' in sys.argv:
    command_sdist = 1
else:
    command_sdist = 0

# Note that when running bdist_rpm, scipy_core directory does
# not exist. So, scipy_distutils must be installed before
# running bdist_rpm.
sys.path.insert(0,'scipy_core')
try:
    import scipy_distutils
    # Declare all scipy_distutils related imports here.
    from scipy_distutils.misc_util import default_config_dict
    from scipy_distutils.misc_util import get_path, merge_config_dicts
    from scipy_distutils.misc_util import get_subpackages, generate_config_py
    from scipy_distutils.core import setup, Extension
finally:
    del sys.path[0]

#-------------------------------

def setup_package(ignore_packages=[]):

    if command_sdist and os.path.isdir('scipy_core'):
        # Applying the same commands to scipy_core.
        # Results can be found in scipy_core directory.
        c = '%s %s %s' % (sys.executable,
                          os.path.abspath(os.path.join('scipy_core','setup.py')),
                          ' '.join(sys.argv[1:]))
        print c
        s = os.system(c)
        assert not s,'failed on scipy_core'

    old_path = os.getcwd()
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))

    os.chdir(local_path)
    sys.path.insert(0,os.path.join(local_path,'Lib'))
    # setup files of subpackages require scipy_core:
    sys.path.insert(0,os.path.join(local_path,'scipy_core'))
    try:
        from scipy_version import scipy_version

        # Uncomment when making releases:
        #if not command_sdist: scipy_version = '0.3.3'

        packages_path = ['Lib']
        if command_sdist:
            name = 'Scipy'
        else:
            name = 'Scipy_complete'
            packages_path.append('scipy_core')
        config_list = [{'name': name,
                        'packages':['scipy','scipy.tests'],
                        'package_dir':
                        {'scipy':'Lib',
                         'scipy.tests':os.path.join('Lib','tests')}}]

        for d in packages_path:
            config_list += get_subpackages(os.path.join(local_path,d),
                                           parent = 'scipy',
                                           parent_path=local_path,
                                           ignore_packages = ignore_packages)
        config_dict = merge_config_dicts(config_list)

        ext = Extension(name='scipy.config',
                        sources=[generate_config_py])
        config_dict['ext_modules'].append(ext)

        print 'SciPy Version %s' % scipy_version
        setup( version = scipy_version,
               maintainer = "SciPy Developers",
               maintainer_email = "scipy-dev@scipy.org",
               description = "Scientific Algorithms Library for Python",
               license = "SciPy License (BSD Style)",
               url = "http://www.scipy.org",
               **config_dict
              )

    finally:
        del sys.path[0]
        del sys.path[0]
        os.chdir(old_path)

if __name__ == "__main__":
    ignore_packages = [
        # list of package names that will not be built.
        ]
    setup_package(ignore_packages)
<|endoftext|>


<commit_before>#/usr/bin/env python3

# A setuptools based setup module.
#
# See:
# https://packaging.python.org/en/latest/distributing.html
# https://github.com/pypa/sampleproject

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

import renamer

setup(
    name = "renamer",
    version = renamer.__version__,
    description = "A utility to rename TV files.",
    long_description = renamer.__doc__,
    url = "https://github.com/caedus75/Renamer",
    author = renamer.__author__,
    author_email = renamer.__email__,
    license = "BSD",

    packages = [
        "renamer",
        "renamer.ui"
    ],

    entry_points = {
        "console_scripts": [
            "renamer = renamer.ui.cli:main",
        ],
    },

    keywords = "utility rename tv show",

    classifiers = [
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        "Development Status :: 4 - Beta",

        # Indicate who your project is intended for
        "Intended Audience :: End Users/Desktop"
        "Topic :: Utilities",

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

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
    ],
)
<commit_msg>update setup.py<commit_after>#/usr/bin/env python3

#
# A setuptools based setup module.
#

from setuptools import setup

import renamer

setup(
    name = "renamer",
    version = renamer.__version__,

    description = "A utility to rename TV files.",
    long_description = renamer.__doc__,
    url = "https://github.com/caedus75/Renamer",

    author = renamer.__author__,
    author_email = renamer.__email__,

    license = "BSD",

    packages = [
        "renamer",
        "renamer.ui"
    ],

    entry_points = {
        "console_scripts": [
            "renamer = renamer.ui.cli:main",
        ],
    },

    keywords = "utility rename tv show",

    classifiers = [
        "Development Status :: 4 - Beta",

        "Intended Audience :: End Users/Desktop",
        "Topic :: Utilities",

        "License :: OSI Approved :: BSD License",

        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
    ],

    python_requires = ">=3.4"
)
<|endoftext|>


<commit_before>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")]

    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='graphene',
    version='0.6.0',

    description='GraphQL Framework for Python',
    long_description=open('README.rst').read(),

    url='https://github.com/graphql-python/graphene',

    author='Syrus Akbary',
    author_email='me@syrusakbary.com',

    license='MIT',

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: PyPy',
    ],

    keywords='api graphql protocol rest relay graphene',

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

    install_requires=[
        'six>=1.10.0',
        'graphql-core>=0.4.9',
        'graphql-relay==0.3.3',
    ],
    tests_require=[
        'django-filter>=0.10.0',
        'pytest>=2.7.2',
        'pytest-django',
        'mock',
    ],
    extras_require={
        'django': [
            'Django>=1.6.0',
            'singledispatch>=3.4.0.3',
            'graphql-django-view>=1.1.0',
        ],
    },

    cmdclass={'test': PyTest},
)
<commit_msg>Updated version of graphene to 0.6.1<commit_after>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")]

    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='graphene',
    version='0.6.1',

    description='GraphQL Framework for Python',
    long_description=open('README.rst').read(),

    url='https://github.com/graphql-python/graphene',

    author='Syrus Akbary',
    author_email='me@syrusakbary.com',

    license='MIT',

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: PyPy',
    ],

    keywords='api graphql protocol rest relay graphene',

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

    install_requires=[
        'six>=1.10.0',
        'graphql-core>=0.4.9',
        'graphql-relay==0.3.3',
    ],
    tests_require=[
        'django-filter>=0.10.0',
        'pytest>=2.7.2',
        'pytest-django',
        'mock',
    ],
    extras_require={
        'django': [
            'Django>=1.6.0',
            'singledispatch>=3.4.0.3',
            'graphql-django-view>=1.1.0',
        ],
    },

    cmdclass={'test': PyTest},
)
<|endoftext|>


<commit_before>#
# This file is part of Evergreen. See the NOTICE for more information.
#

__all__ = ['Event']

from evergreen.locks import Condition, Lock

class Event(object):

    def __init__(self):
        self._cond = Condition(Lock())
        self._flag = False

    def is_set(self):
        return self._flag

    def set(self):
        self._cond.acquire()
        try:
            self._flag = True
            self._cond.notify_all()
        finally:
            self._cond.release()

    def clear(self):
        self._cond.acquire()
        try:
            self._flag = False
        finally:
            self._cond.release()

    def wait(self, timeout=None):
        self._cond.acquire()
        try:
            signaled = self._flag
            if not signaled:
                signaled = self._cond.wait(timeout)
            return signaled
        finally:
            self._cond.release()

<commit_msg>Moved __all__ after imports<commit_after>#
# This file is part of Evergreen. See the NOTICE for more information.
#

from evergreen.locks import Condition, Lock

__all__ = ['Event']

class Event(object):

    def __init__(self):
        self._cond = Condition(Lock())
        self._flag = False

    def is_set(self):
        return self._flag

    def set(self):
        self._cond.acquire()
        try:
            self._flag = True
            self._cond.notify_all()
        finally:
            self._cond.release()

    def clear(self):
        self._cond.acquire()
        try:
            self._flag = False
        finally:
            self._cond.release()

    def wait(self, timeout=None):
        self._cond.acquire()
        try:
            signaled = self._flag
            if not signaled:
                signaled = self._cond.wait(timeout)
            return signaled
        finally:
            self._cond.release()

<|endoftext|>


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

from setuptools import setup
from distutils.command.sdist import sdist
import os

class sdist_hg(sdist):
    """Add revision number to version for development releases."""

    def run(self):
        if "dev" in self.distribution.metadata.version:
            self.distribution.metadata.version += self.get_tip_revision()
        sdist.run(self)

    def get_tip_revision(self, path=os.getcwd()):
        from mercurial.hg import repository
        from mercurial.ui import ui
        repo = repository(ui(), path)
        tip = repo.changelog.tip()
        return str(repo.changelog.rev(tip))

setup(
    name = "Sumatra",
    version = "0.7dev",
    package_dir = {'sumatra': 'sumatra'},
    packages = ['sumatra', 'sumatra.dependency_finder', 'sumatra.datastore',
                'sumatra.recordstore', 'sumatra.recordstore.django_store',
                'sumatra.versioncontrol', 'sumatra.formatting',
                'sumatra.web', 'sumatra.web.templatetags',
                'sumatra.publishing',
                'sumatra.publishing.latex', 'sumatra.publishing.sphinxext'],
    package_data = {'sumatra': ['web/media/css/*.css', 'web/media/js/*.js',
                                'web/media/img/*', 'web/media/css/*.css', 'web/media/extras/fontawesome/font/*',
                                'web/media/extras/fontawesome/sass/*', 'web/media/extras/fontawesome/css/*.css',
                                'web/templates/*.html',
                                'publishing/latex/sumatra.sty',
                                'formatting/latex_template.tex']},
    scripts = ['bin/smt', 'bin/smtweb'],
    author = "Sumatra authors and contributors",
    author_email = "andrew.davison@unic.cnrs-gif.fr",
    description = "A tool for automated tracking of computation-based scientific projects",
    long_description = open('README').read(),
    license = "CeCILL http://www.cecill.info",
    keywords = "computational science simulation analysis project-management",
    url = "http://neuralensemble.org/sumatra/",
    classifiers = ['Development Status :: 4 - Beta',
                   'Environment :: Console',
                   'Environment :: Web Environment',
                   'Intended Audience :: Science/Research',
                   'License :: Other/Proprietary License',
                   'Natural Language :: English',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Programming Language :: Python :: 2.6',
                   'Programming Language :: Python :: 2.7',
                   'Topic :: Scientific/Engineering'],
    cmdclass = {'sdist': sdist_hg},
    install_requires = ['Django>=1.4', 'django-tagging', 'httplib2',
                        'docutils', 'jinja2', 'parameters'],
    extras_require = {'svn': 'pysvn',
                      'hg': 'mercurial',
                      'git': 'GitPython',
                      'bzr': 'bzr',
                      'mpi': 'mpi4py'}
)
<commit_msg>Renaming the README broke setup.py<commit_after>#!/usr/bin/env python

from setuptools import setup
from distutils.command.sdist import sdist
import os

class sdist_hg(sdist):
    """Add revision number to version for development releases."""

    def run(self):
        if "dev" in self.distribution.metadata.version:
            self.distribution.metadata.version += self.get_tip_revision()
        sdist.run(self)

    def get_tip_revision(self, path=os.getcwd()):
        from mercurial.hg import repository
        from mercurial.ui import ui
        repo = repository(ui(), path)
        tip = repo.changelog.tip()
        return str(repo.changelog.rev(tip))

setup(
    name = "Sumatra",
    version = "0.7dev",
    package_dir = {'sumatra': 'sumatra'},
    packages = ['sumatra', 'sumatra.dependency_finder', 'sumatra.datastore',
                'sumatra.recordstore', 'sumatra.recordstore.django_store',
                'sumatra.versioncontrol', 'sumatra.formatting',
                'sumatra.web', 'sumatra.web.templatetags',
                'sumatra.publishing',
                'sumatra.publishing.latex', 'sumatra.publishing.sphinxext'],
    package_data = {'sumatra': ['web/media/css/*.css', 'web/media/js/*.js',
                                'web/media/img/*', 'web/media/css/*.css', 'web/media/extras/fontawesome/font/*',
                                'web/media/extras/fontawesome/sass/*', 'web/media/extras/fontawesome/css/*.css',
                                'web/templates/*.html',
                                'publishing/latex/sumatra.sty',
                                'formatting/latex_template.tex']},
    scripts = ['bin/smt', 'bin/smtweb'],
    author = "Sumatra authors and contributors",
    author_email = "andrew.davison@unic.cnrs-gif.fr",
    description = "A tool for automated tracking of computation-based scientific projects",
    long_description = open('README.rst').read(),
    license = "CeCILL http://www.cecill.info",
    keywords = "computational science simulation analysis project-management",
    url = "http://neuralensemble.org/sumatra/",
    classifiers = ['Development Status :: 4 - Beta',
                   'Environment :: Console',
                   'Environment :: Web Environment',
                   'Intended Audience :: Science/Research',
                   'License :: Other/Proprietary License',
                   'Natural Language :: English',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Programming Language :: Python :: 2.6',
                   'Programming Language :: Python :: 2.7',
                   'Topic :: Scientific/Engineering'],
    cmdclass = {'sdist': sdist_hg},
    install_requires = ['Django>=1.4', 'django-tagging', 'httplib2',
                        'docutils', 'jinja2', 'parameters'],
    extras_require = {'svn': 'pysvn',
                      'hg': 'mercurial',
                      'git': 'GitPython',
                      'bzr': 'bzr',
                      'mpi': 'mpi4py'}
)
<|endoftext|>


<commit_before>import json

import django

try:
    from unittest.mock import patch, Mock
except ImportError:
    from mock import patch, Mock

from django.core.management import call_command
from django.test import TestCase
from evostream import EvoStreamException
from evostream.commands import list_streams_ids, list_streams
from evostream.protocols import BaseProtocol

class TestProtocol(BaseProtocol):
    def __init__(self, result):
        self.result = result

    def get_result(self, command, **params):
        return self.result

    def parse_result(self, result):
        result = json.loads(result)
        if result['status'] == 'FAIL':
            raise EvoStreamException(result['description'])
        else:
            return result['data']

LIST_STREAMS_TEST_DATA = {
    "data": [
        {
            "appName": "evostreamms",
            "audio": {
                "bytesCount": 727893,
                "codec": "AAAC",
                "codecNumeric": 4702111241970122752,
                "droppedBytesCount": 0,
                "droppedPacketsCount": 0,
                "packetsCount": 2243
            },
            "bandwidth": 0,
            "connectionType": 1,
            "creationTimestamp": 1448005740350.4519,
            "edgePid": 0,
            "farIp": "54.239.131.224",
            "farPort": 1935,
            "ip": "192.168. 2.35",
            "name": "testpullstream",
            "nearIp": "192.168.2.35",
            "nearPort": 1607,
            "outStream sUniqueIds": None,
            "pageUrl": "",
            "port": 1607,
            "processId": 12848,
            "processType": "origin",
            "pullSettings": {
                "_callback": None,
                "audioCodecBytes": "",
                "configId": 1,
                "emulateUs erAgent": "EvoStream Media Server (www.evostream.com) player",
                "forceTcp": False,
                "httpProxy": "",
                "isAudio": True,
                "keepAlive": True,
                "localStreamName": "testpullstream",
                "operationType": 1,
                "pageUrl": "",
                "ppsBytes": "",
                "rangeEnd": -1,
                "rangeStart": -2,
                "rtcp DetectionInterval": 10,
                "sendRenewStream": False,
                "spsBytes": "",
                "ssmIp": "",
                "swfUrl": "",
                "tcUrl": "",
                "tos": 256,
                "ttl": 256,
                "uri": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\ /cfx\/st\/mp4:sintel.mp4"
            },
            "queryTimestamp": 1448005784755.9919,
            "serverAgent": "FMS\/3,5,7,7009",
            "swfUrl": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\/cfx\/st\/mp4:sintel.mp4",
            "tcUrl": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\/cfx\/st\/mp4:sintel.mp4",
            "type": "INR",
            "typeNumeric": 5282249572905648128,
            "uniqueId": 36,
            "upTime": 44405.5400,
            "video": {
                "bytesCount": 4881934,
                "codec": "VH264",
                "codecNumeric": 6217274493967007744,
                "droppedBytesCount": 0,
                "droppedPacketsCount": 0,
                "height": 306,
                "level": 30,
                "packetsCount": 1255,
                "profile": 66,
                "width": 720
            }
        }
    ],
    "description": "Available streams",
    "status": "SUCCESS"
}

@patch('evostream.commands.logger', Mock())
class ListStreamsTestCase(TestCase):
    @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
    def test_success(self):
        ids = list_streams()
        self.assertListEqual(ids, LIST_STREAMS_TEST_DATA['data'])

if django.VERSION >= (1, 5):
    @patch('evostream.commands.logger', Mock())
    class ListStreamsCommandTestCase(TestCase):
        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_verbose(self, mock_write):
            call_command('liststreams', verbosity=2)
            self.assertEqual(mock_write.call_count, 1)
            self.assertEqual(mock_write.call_args,
                             [(json.dumps(LIST_STREAMS_TEST_DATA['data'], indent=1, sort_keys=True),)])

        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_silent(self, mock_write):
            call_command('liststreams')
            self.assertEqual(mock_write.call_count, 2)
            self.assertListEqual(mock_write.call_args_list,
                                 [[('uniqueId: 36\n',)],
                                  [('name: "testpullstream"\n',)]])

LIST_STREAMS_IDS_TEST_DATA = {
    "data": [205, 206, 207],
    "description": "Available stream IDs",
    "status": "SUCCESS"
}

@patch('evostream.commands.logger', Mock())
class ListStreamsIdsTestCase(TestCase):
    @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_IDS_TEST_DATA)))
    def test_success(self):
        ids = list_streams_ids()
        self.assertListEqual(ids, LIST_STREAMS_IDS_TEST_DATA['data'])

if django.VERSION >= (1, 5):
    @patch('evostream.commands.logger', Mock())
    class ListStreamsIdsCommandTestCase(TestCase):
        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_IDS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_verbose(self, mock_write):
            call_command('liststreamsids')
            self.assertEqual(mock_write.call_count, 1)
            self.assertEqual(mock_write.call_args,
                             [(json.dumps(LIST_STREAMS_IDS_TEST_DATA['data'], indent=1, sort_keys=True),)])
<commit_msg>fix test order<commit_after>import json

import django

try:
    from unittest.mock import patch, Mock
except ImportError:
    from mock import patch, Mock

from django.core.management import call_command
from django.test import TestCase
from evostream import EvoStreamException
from evostream.commands import list_streams_ids, list_streams
from evostream.protocols import BaseProtocol

class TestProtocol(BaseProtocol):
    def __init__(self, result):
        self.result = result

    def get_result(self, command, **params):
        return self.result

    def parse_result(self, result):
        result = json.loads(result)
        if result['status'] == 'FAIL':
            raise EvoStreamException(result['description'])
        else:
            return result['data']

LIST_STREAMS_IDS_TEST_DATA = {
    "data": [205, 206, 207],
    "description": "Available stream IDs",
    "status": "SUCCESS"
}

@patch('evostream.commands.logger', Mock())
class ListStreamsIdsTestCase(TestCase):
    @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_IDS_TEST_DATA)))
    def test_success(self):
        ids = list_streams_ids()
        self.assertListEqual(ids, LIST_STREAMS_IDS_TEST_DATA['data'])

if django.VERSION >= (1, 5):
    @patch('evostream.commands.logger', Mock())
    class ListStreamsIdsCommandTestCase(TestCase):
        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_IDS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_verbose(self, mock_write):
            call_command('liststreamsids')
            self.assertEqual(mock_write.call_count, 1)
            self.assertEqual(mock_write.call_args,
                             [(json.dumps(LIST_STREAMS_IDS_TEST_DATA['data'], indent=1, sort_keys=True),)])

LIST_STREAMS_TEST_DATA = {
    "data": [
        {
            "appName": "evostreamms",
            "audio": {
                "bytesCount": 727893,
                "codec": "AAAC",
                "codecNumeric": 4702111241970122752,
                "droppedBytesCount": 0,
                "droppedPacketsCount": 0,
                "packetsCount": 2243
            },
            "bandwidth": 0,
            "connectionType": 1,
            "creationTimestamp": 1448005740350.4519,
            "edgePid": 0,
            "farIp": "54.239.131.224",
            "farPort": 1935,
            "ip": "192.168. 2.35",
            "name": "testpullstream",
            "nearIp": "192.168.2.35",
            "nearPort": 1607,
            "outStream sUniqueIds": None,
            "pageUrl": "",
            "port": 1607,
            "processId": 12848,
            "processType": "origin",
            "pullSettings": {
                "_callback": None,
                "audioCodecBytes": "",
                "configId": 1,
                "emulateUs erAgent": "EvoStream Media Server (www.evostream.com) player",
                "forceTcp": False,
                "httpProxy": "",
                "isAudio": True,
                "keepAlive": True,
                "localStreamName": "testpullstream",
                "operationType": 1,
                "pageUrl": "",
                "ppsBytes": "",
                "rangeEnd": -1,
                "rangeStart": -2,
                "rtcp DetectionInterval": 10,
                "sendRenewStream": False,
                "spsBytes": "",
                "ssmIp": "",
                "swfUrl": "",
                "tcUrl": "",
                "tos": 256,
                "ttl": 256,
                "uri": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\ /cfx\/st\/mp4:sintel.mp4"
            },
            "queryTimestamp": 1448005784755.9919,
            "serverAgent": "FMS\/3,5,7,7009",
            "swfUrl": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\/cfx\/st\/mp4:sintel.mp4",
            "tcUrl": "rtmp:\/\/s2pchzxmtymn2k.cloudfront.net\/cfx\/st\/mp4:sintel.mp4",
            "type": "INR",
            "typeNumeric": 5282249572905648128,
            "uniqueId": 36,
            "upTime": 44405.5400,
            "video": {
                "bytesCount": 4881934,
                "codec": "VH264",
                "codecNumeric": 6217274493967007744,
                "droppedBytesCount": 0,
                "droppedPacketsCount": 0,
                "height": 306,
                "level": 30,
                "packetsCount": 1255,
                "profile": 66,
                "width": 720
            }
        }
    ],
    "description": "Available streams",
    "status": "SUCCESS"
}

@patch('evostream.commands.logger', Mock())
class ListStreamsTestCase(TestCase):
    @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
    def test_success(self):
        ids = list_streams()
        self.assertListEqual(ids, LIST_STREAMS_TEST_DATA['data'])

if django.VERSION >= (1, 5):
    @patch('evostream.commands.logger', Mock())
    class ListStreamsCommandTestCase(TestCase):
        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_verbose(self, mock_write):
            call_command('liststreams', verbosity=2)
            self.assertEqual(mock_write.call_count, 1)
            self.assertEqual(mock_write.call_args,
                             [(json.dumps(LIST_STREAMS_TEST_DATA['data'], indent=1, sort_keys=True),)])

        @patch('evostream.commands.protocol', TestProtocol(json.dumps(LIST_STREAMS_TEST_DATA)))
        @patch('django.core.management.base.OutputWrapper.write')
        def test_silent(self, mock_write):
            call_command('liststreams')
            self.assertEqual(mock_write.call_count, 2)
            self.assertListEqual(mock_write.call_args_list,
                                 [[('uniqueId: 36\n',)],
                                  [('name: "testpullstream"\n',)]])
<|endoftext|>


<commit_before>#!/usr/bin/python
import os
from distutils.core import setup
from batterym.config import get_entry
from batterym.misc import append_to_file
from batterym.misc import change_mod_files
from batterym.misc import create_missing_dirs

from batterym.paths import SHARE_APP_DIR
from batterym.paths import RESOURCES_DIR
from batterym.paths import CONFIG_DIR
from batterym.paths import LOGS_DIR
from batterym.paths import IMAGE_DIR
from batterym.paths import LOG_BATTERY_FILE
from batterym.paths import LOG_BATTERY_ALL_FILE

def find_resources(resource_dir):
    target_path = os.path.join(RESOURCES_DIR, resource_dir)
    resource_names = os.listdir(resource_dir)
    resource_list = [os.path.join(resource_dir, file_name)
                     for file_name in resource_names]
    return (target_path, resource_list)

def chmod(folder, mod):
    files = os.listdir(folder)
    for fname in files:
        fname = os.path.join(folder, fname)
        if not os.path.isfile(fname):
            continue
        os.chmod(fname, mod)
        print 'changing mode of {0} to {1}'.format(fname, mod)

print 'installation path:', RESOURCES_DIR

setup(name='batterym',
      version=get_entry('version', 'config/config.json'),
      description='Battery Monitor for Ubuntu',
      url='https://github.com/maks-a/batterym',
      author='https://github.com/maks-a',
      license='Apache License 2.0',
      packages=['batterym'],
      data_files=[
          (SHARE_APP_DIR, ['batterym.desktop']),
          (find_resources('config')),
          (LOGS_DIR, []),
          (find_resources('img')),
      ],
      scripts=['bin/batterym']
      )

create_missing_dirs(LOGS_DIR)
append_to_file('', LOG_BATTERY_FILE)
append_to_file('', LOG_BATTERY_ALL_FILE)

mod = 0755
change_mod_files(CONFIG_DIR, mod)
change_mod_files(LOGS_DIR, mod)
change_mod_files(IMAGE_DIR, mod)
<commit_msg>add 'batterym vX.X.X' message during installation<commit_after>#!/usr/bin/python
import os
from distutils.core import setup
from batterym.config import get_entry
from batterym.misc import append_to_file
from batterym.misc import change_mod_files
from batterym.misc import create_missing_dirs

from batterym.paths import SHARE_APP_DIR
from batterym.paths import RESOURCES_DIR
from batterym.paths import CONFIG_DIR
from batterym.paths import LOGS_DIR
from batterym.paths import IMAGE_DIR
from batterym.paths import LOG_BATTERY_FILE
from batterym.paths import LOG_BATTERY_ALL_FILE

def find_resources(resource_dir):
    target_path = os.path.join(RESOURCES_DIR, resource_dir)
    resource_names = os.listdir(resource_dir)
    resource_list = [os.path.join(resource_dir, file_name)
                     for file_name in resource_names]
    return (target_path, resource_list)

def chmod(folder, mod):
    files = os.listdir(folder)
    for fname in files:
        fname = os.path.join(folder, fname)
        if not os.path.isfile(fname):
            continue
        os.chmod(fname, mod)
        print 'changing mode of {0} to {1}'.format(fname, mod)

version = get_entry('version', 'config/config.json')
print 'batterym v{0}'.format(version)
print 'installation path:', RESOURCES_DIR

setup(name='batterym',
      version=version,
      description='Battery Monitor for Ubuntu',
      url='https://github.com/maks-a/batterym',
      author='https://github.com/maks-a',
      license='Apache License 2.0',
      packages=['batterym'],
      data_files=[
          (SHARE_APP_DIR, ['batterym.desktop']),
          (find_resources('config')),
          (LOGS_DIR, []),
          (find_resources('img')),
      ],
      scripts=['bin/batterym']
      )

create_missing_dirs(LOGS_DIR)
append_to_file('', LOG_BATTERY_FILE)
append_to_file('', LOG_BATTERY_ALL_FILE)

mod = 0755
change_mod_files(CONFIG_DIR, mod)
change_mod_files(LOGS_DIR, mod)
change_mod_files(IMAGE_DIR, mod)
<|endoftext|>


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

import sys
import os
import platform
from distutils.core import setup
from distutils.extension import Extension

# e.g. JDK_HOME = '/home/marta/jdk1.7.0_15'
JDK_HOME = os.environ.get('JDK_HOME', None)
if JDK_HOME is None:
    print('Error: Environment variable "JDK_HOME" must be set to a JDK (>= v1.6) installation directory')
    exit(1)

IS64 = sys.maxsize > 2 ** 32
WIN32 = platform.system() == 'Windows'
LINUX = platform.system() == 'Linux'
DARWIN = platform.system() == 'Darwin'
print('Building a %s-bit library for a %s system' % ('64' if IS64 else '32', platform.system()))

if WIN32 and os.environ.get('VS90COMNTOOLS', None) is None:
    print('Note: If you get an error saying "Unable to find vcvarsall.bat",')
    print('      you may need to set environment variable VS90COMNTOOLS.')
    print('      If you use Visual Studio 2011, then: SET VS90COMNTOOLS=%VS100COMNTOOLS%,')
    print('      if you use Visual Studio 2012, then: SET VS90COMNTOOLS=%VS110COMNTOOLS%.')

sources = [
    'src/main/c/jpy_module.c',
    'src/main/c/jpy_carray.c',
    'src/main/c/jpy_buffer.c',
    'src/main/c/jpy_jtype.c',
    'src/main/c/jpy_jmethod.c',
    'src/main/c/jpy_jfield.c',
    'src/main/c/jpy_jobj.c',
]

include_dirs = ['src/main/c']
library_dirs = []
libraries = []
define_macros = []
extra_link_args = []
extra_compile_args = []

if WIN32:
    define_macros += [('WIN32', '1')]
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/win32']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/i386/server',
                    JDK_HOME + '/lib']

if LINUX:
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/linux']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/i386/server',
                    JDK_HOME + '/lib']

if DARWIN:
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/darwin']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/server/',
                    JDK_HOME + '/lib']

setup(name='jpy',
      description='Java Python Bridge',
      long_description='A bridge from Python to Java',
      version='0.1',
      platforms='Python 3, Java 1.7',
      author='Brockmann Consult GmbH',
      author_email='beam@brockmann-consult.de',
      maintainer='Brockmann Consult GmbH',
      maintainer_email='beam@brockmann-consult.de',
      license='GPL 3',
      url='http://www.brockmann-consult.de/beam/',
      download_url='http://www.brockmann-consult.de/beam/',
      ext_modules=[Extension('jpy',
                             sources,
                             include_dirs=include_dirs,
                             library_dirs=library_dirs,
                             libraries=libraries,
                             extra_link_args=extra_link_args,
                             extra_compile_args=extra_compile_args,
                             define_macros=define_macros
      )]
)
<commit_msg>Copying shared lib for Java binding<commit_after>#!/usr/bin/env python3

import sys
import os
import platform
from distutils.core import setup
from distutils.extension import Extension

# e.g. JDK_HOME = '/home/marta/jdk1.7.0_15'
JDK_HOME = os.environ.get('JDK_HOME', None)
if JDK_HOME is None:
    print('Error: Environment variable "JDK_HOME" must be set to a JDK (>= v1.6) installation directory')
    exit(1)

IS64 = sys.maxsize > 2 ** 32
WIN32 = platform.system() == 'Windows'
LINUX = platform.system() == 'Linux'
DARWIN = platform.system() == 'Darwin'
print('Building a %s-bit library for a %s system' % ('64' if IS64 else '32', platform.system()))

if WIN32 and os.environ.get('VS90COMNTOOLS', None) is None:
    print('Note: If you get an error saying "Unable to find vcvarsall.bat",')
    print('      you may need to set environment variable VS90COMNTOOLS.')
    print('      If you use Visual Studio 2011, then: SET VS90COMNTOOLS=%VS100COMNTOOLS%,')
    print('      if you use Visual Studio 2012, then: SET VS90COMNTOOLS=%VS110COMNTOOLS%.')

sources = [
    'src/main/c/jpy_module.c',
    'src/main/c/jpy_carray.c',
    'src/main/c/jpy_buffer.c',
    'src/main/c/jpy_jtype.c',
    'src/main/c/jpy_jmethod.c',
    'src/main/c/jpy_jfield.c',
    'src/main/c/jpy_jobj.c',
    'src/main/c/jni/org_jpy_python_PyLib.c',
]

include_dirs = ['src/main/c']
library_dirs = []
libraries = []
define_macros = []
extra_link_args = []
extra_compile_args = []

if WIN32:
    define_macros += [('WIN32', '1')]
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/win32']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/i386/server',
                    JDK_HOME + '/lib']

if LINUX:
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/linux']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/i386/server',
                    JDK_HOME + '/lib']

if DARWIN:
    include_dirs += [JDK_HOME + '/include', JDK_HOME + '/include/darwin']
    libraries = ['jvm']
    library_dirs = [JDK_HOME + '/jre/lib/server/',
                    JDK_HOME + '/lib']

setup(name='jpy',
      description='Java Python Bridge',
      long_description='A bridge from Python to Java',
      version='0.1',
      platforms='Python 3, Java 1.7',
      author='Brockmann Consult GmbH',
      author_email='beam@brockmann-consult.de',
      maintainer='Brockmann Consult GmbH',
      maintainer_email='beam@brockmann-consult.de',
      license='GPL 3',
      url='http://www.brockmann-consult.de/beam/',
      download_url='http://www.brockmann-consult.de/beam/',
      ext_modules=[Extension('jpy',
                             sources,
                             include_dirs=include_dirs,
                             library_dirs=library_dirs,
                             libraries=libraries,
                             extra_link_args=extra_link_args,
                             extra_compile_args=extra_compile_args,
                             define_macros=define_macros
      )]
)

import shutil

src = os.path.join(sys.exec_prefix, 'Lib', 'site-packages', 'jpy.pyd')
if WIN32:
    dst = 'jpy.dll'
else:
    dst = 'libjpy.so'

print('Copying', src, 'to', dst)
shutil.copyfile(src, dst)<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import pip
import sys
import os

if int(pip.__version__.split('.')[0]) < 6:
    print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
          '    pip install -U pip')
    sys.exit(-1)

if os.environ.get('CONVERT_README'):
    import pypandoc

    long_description = pypandoc.convert('README.md', 'rst')
else:
    long_description = ''

version = sys.version_info[:2]
if version < (2, 7):
    print('thefuck requires Python version 2.7 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)
elif (3, 0) < version < (3, 3):
    print('thefuck requires Python version 3.3 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)

VERSION = '3.10'

install_requires = ['psutil', 'colorama', 'six', 'decorator']
extras_require = {':python_version<"3.4"': ['pathlib2'],
                  ":sys_platform=='win32'": ['win_unicode_console']}

setup(name='thefuck',
      version=VERSION,
      description="Magnificent app which corrects your previous console command",
      long_description=long_description,
      author='Vladimir Iakovlev',
      author_email='nvbn.rm@gmail.com',
      url='https://github.com/nvbn/thefuck',
      license='MIT',
      packages=find_packages(exclude=['ez_setup', 'examples',
                                      'tests', 'tests.*', 'release']),
      include_package_data=True,
      zip_safe=False,
      install_requires=install_requires,
      extras_require=extras_require,
      entry_points={'console_scripts': [
          'thefuck = thefuck.main:main',
          'thefuck-alias = thefuck.main:print_alias',
          'fuck = thefuck.main:how_to_configure_alias']})
<commit_msg>Avoid importing pip<commit_after>#!/usr/bin/env python
from setuptools import setup, find_packages
import pkg_resources
import sys
import os

if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6:
    print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
          '    pip install -U pip')
    sys.exit(-1)

if os.environ.get('CONVERT_README'):
    import pypandoc

    long_description = pypandoc.convert('README.md', 'rst')
else:
    long_description = ''

version = sys.version_info[:2]
if version < (2, 7):
    print('thefuck requires Python version 2.7 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)
elif (3, 0) < version < (3, 3):
    print('thefuck requires Python version 3.3 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)

VERSION = '3.10'

install_requires = ['psutil', 'colorama', 'six', 'decorator']
extras_require = {':python_version<"3.4"': ['pathlib2'],
                  ":sys_platform=='win32'": ['win_unicode_console']}

setup(name='thefuck',
      version=VERSION,
      description="Magnificent app which corrects your previous console command",
      long_description=long_description,
      author='Vladimir Iakovlev',
      author_email='nvbn.rm@gmail.com',
      url='https://github.com/nvbn/thefuck',
      license='MIT',
      packages=find_packages(exclude=['ez_setup', 'examples',
                                      'tests', 'tests.*', 'release']),
      include_package_data=True,
      zip_safe=False,
      install_requires=install_requires,
      extras_require=extras_require,
      entry_points={'console_scripts': [
          'thefuck = thefuck.main:main',
          'thefuck-alias = thefuck.main:print_alias',
          'fuck = thefuck.main:how_to_configure_alias']})
<|endoftext|>


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

version = '0.5.1'

setup(name='twitter',
      version=version,
      description="An API and command-line toolset for Twitter (twitter.com)",
      long_description=open("./README", "r").read(),
      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
      classifiers=[
          "Development Status :: 5 - Production/Stable",
          "Environment :: Console",
          "Intended Audience :: End Users/Desktop",
          "Natural Language :: English",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Topic :: Communications :: Chat :: Internet Relay Chat",
          "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
          "Topic :: Utilities",
          "License :: OSI Approved :: MIT License",
          ],
      keywords='twitter, IRC, command-line tools, web 2.0',
      author='Mike Verdone',
      author_email='mike.verdone+twitterapi@gmail.com',
      url='http://mike.verdone.ca/twitter/',
      license='MIT License',
      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,
      zip_safe=True,
      install_requires=[
          # -*- Extra requirements: -*-
          "simplejson>=1.7.1",
          "python-dateutil>=1.1",
      ],
      entry_points="""
      # -*- Entry points: -*-
      [console_scripts]
      twitter=twitter.cmdline:main
      twitterbot=twitter.ircbot:main
      """,
      )
<commit_msg>Prepare for 0.5.2<commit_after>from setuptools import setup, find_packages
import sys, os

version = '0.5.2'

setup(name='twitter',
      version=version,
      description="An API and command-line toolset for Twitter (twitter.com)",
      long_description=open("./README", "r").read(),
      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
      classifiers=[
          "Development Status :: 5 - Production/Stable",
          "Environment :: Console",
          "Intended Audience :: End Users/Desktop",
          "Natural Language :: English",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Topic :: Communications :: Chat :: Internet Relay Chat",
          "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
          "Topic :: Utilities",
          "License :: OSI Approved :: MIT License",
          ],
      keywords='twitter, IRC, command-line tools, web 2.0',
      author='Mike Verdone',
      author_email='mike.verdone+twitterapi@gmail.com',
      url='http://mike.verdone.ca/twitter/',
      license='MIT License',
      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,
      zip_safe=True,
      install_requires=[
          # -*- Extra requirements: -*-
          "simplejson>=1.7.1",
          "python-dateutil>=1.1",
      ],
      entry_points="""
      # -*- Entry points: -*-
      [console_scripts]
      twitter=twitter.cmdline:main
      twitterbot=twitter.ircbot:main
      """,
      )
<|endoftext|>