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

# Copyright 2008-2010 Nokia Siemens Networks Oyj
#
# 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 sys
import os
from distutils.core import setup

sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src','robot'))
from version import get_version
import robot_postinstall

# Maximum width in Windows installer seems to be 70 characters
DESCRIPTION = """
Robot Framework is a Python-based keyword-driven test automation
framework for acceptance level testing and acceptance test-driven
development (ATDD). It has an easy-to-use tabular syntax for creating
test cases and its testing capabilities can be extended by test
libraries implemented either with Python or Java. Users can also
create new keywords from existing ones using the same simple syntax
that is used for creating test cases.
"""[1:-1]
CLASSIFIERS = """
Development Status :: 5 - Production/Stable
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Topic :: Software Development :: Testing
"""[1:-1]
PACKAGES = ['robot', 'robot.common', 'robot.conf', 'robot.libraries',
            'robot.output', 'robot.parsing', 'robot.serializing',
            'robot.running', 'robot.utils', 'robot.variables']
SCRIPT_NAMES = ['pybot', 'jybot', 'rebot']
if os.name == 'java':
    SCRIPT_NAMES.remove('pybot')

def main():
    inst_scripts = [ os.path.join('src','bin',name) for name in SCRIPT_NAMES ]
    if 'bdist_wininst' in sys.argv:
        inst_scripts = [ script+'.bat' for script in inst_scripts ]
        inst_scripts.append('robot_postinstall.py')
    elif os.sep == '\\':
        inst_scripts = [ script+'.bat' for script in inst_scripts ]

    if 'bdist_egg' in sys.argv:
        package_path = os.path.dirname(sys.argv[0])
        robot_postinstall.egg_preinstall(package_path, inst_scripts)

    # Let distutils take care of most of the setup
    dist = setup(
          name         = 'robotframework',
          version      = get_version(sep='-'),
          author       = 'Robot Framework Developers',
          author_email = 'robotframework-devel@googlegroups.com',
          url          = 'http://robotframework.org',
          license      = 'Apache License 2.0',
          description  = 'A keyword-driven acceptance test automation framework',
          long_description = DESCRIPTION,
          keywords     = 'acceptance test automation atdd',
          platforms    = 'any',
          classifiers  = CLASSIFIERS.splitlines(),
          package_dir  = {'': 'src'},
          packages     = PACKAGES,
          scripts      = inst_scripts,
    )

    if 'install' in sys.argv:
        absnorm = lambda path: os.path.abspath(os.path.normpath(path))
        script_dir = absnorm(dist.command_obj['install_scripts'].install_dir)
        module_dir = absnorm(dist.command_obj['install_lib'].install_dir)
        robot_dir = os.path.join(module_dir, 'robot')
        script_names = [ os.path.basename(name) for name in inst_scripts ]
        robot_postinstall.generic_install(script_names, script_dir, robot_dir)

if __name__ == "__main__":
    main()
<commit_msg>cleanup and metadata update<commit_after>#!/usr/bin/env python

import sys
import os
from distutils.core import setup

import robot_postinstall
execfile(os.path.join(os.path.dirname(__file__),'src','robot','version.py'))

# Maximum width in Windows installer seems to be 70 characters -------|
DESCRIPTION = """
Robot Framework is a generic Python based test automation framework
for acceptance testing and acceptance test-driven development (ATDD).
It has easy-to-use tabular test data syntax and utilizes the
keyword-driven testing approach. Its testing capabilities can be
extended by test libraries implemented either with Python or Java, and
users can create new keywords from existing ones using the same syntax
that is used for creating test cases.
"""[1:-1]
CLASSIFIERS = """
Development Status :: 5 - Production/Stable
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Topic :: Software Development :: Testing
"""[1:-1]
PACKAGES = ['robot', 'robot.common', 'robot.conf', 'robot.libraries',
            'robot.output', 'robot.parsing', 'robot.serializing',
            'robot.running', 'robot.utils', 'robot.variables']
SCRIPT_NAMES = ['pybot', 'jybot', 'rebot']
if os.name == 'java':
    SCRIPT_NAMES.remove('pybot')

def main():
    inst_scripts = [ os.path.join('src','bin',name) for name in SCRIPT_NAMES ]
    if 'bdist_wininst' in sys.argv:
        inst_scripts = [ script+'.bat' for script in inst_scripts ]
        inst_scripts.append('robot_postinstall.py')
    elif os.sep == '\\':
        inst_scripts = [ script+'.bat' for script in inst_scripts ]

    if 'bdist_egg' in sys.argv:
        package_path = os.path.dirname(sys.argv[0])
        robot_postinstall.egg_preinstall(package_path, inst_scripts)

    # Let distutils take care of most of the setup
    dist = setup(
          name         = 'robotframework',
          version      = get_version(sep='-'),
          author       = 'Robot Framework Developers',
          author_email = 'robotframework-devel@googlegroups.com',
          url          = 'http://robotframework.org',
          license      = 'Apache License 2.0',
          description  = 'A generic test automation framework',
          long_description = DESCRIPTION,
          keywords     = 'robotframework testing testautomation atdd',
          platforms    = 'any',
          classifiers  = CLASSIFIERS.splitlines(),
          package_dir  = {'': 'src'},
          packages     = PACKAGES,
          scripts      = inst_scripts,
    )

    if 'install' in sys.argv:
        absnorm = lambda path: os.path.abspath(os.path.normpath(path))
        script_dir = absnorm(dist.command_obj['install_scripts'].install_dir)
        module_dir = absnorm(dist.command_obj['install_lib'].install_dir)
        robot_dir = os.path.join(module_dir, 'robot')
        script_names = [ os.path.basename(name) for name in inst_scripts ]
        robot_postinstall.generic_install(script_names, script_dir, robot_dir)

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


<commit_before>__author__ = 'ndieks'
import os
from setuptools import setup
import setuptools

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
        name='django-rog',
        version='0.1',
        packages=setuptools.find_packages(),
        include_package_data=True,
        zip_safe=False,
        license='BSD License',
        description='A simple Django app to track activities of people from same location.',
        long_description=README,
        url='https://www.example.com/',
        author='danleyb2',
        author_email='ndieksman@gmail.com',
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Environment :: Web Environment',
            'Framework :: Django',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: BSD License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3.2',
            'Programming Language :: Python :: 3.4',
            'Topic :: Internet :: WWW/HTTP',
            'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        ],
)
<commit_msg>add package description<commit_after>__author__ = 'ndieks'
import os
from setuptools import setup
import setuptools

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
        name='django-rog',
        version='0.1',
        packages=setuptools.find_packages(),
        include_package_data=True,
        zip_safe=False,
        license='BSD License',
        description='A simple Django app to track activities of people from some location.',
        long_description=README,
        url='https://www.example.com/',
        author='danleyb2',
        author_email='ndieksman@gmail.com',
        classifiers=[
            'Development Status :: 3 - Alpha',
            'Environment :: Web Environment',
            'Framework :: Django',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: BSD License',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3.2',
            'Programming Language :: Python :: 3.4',
            'Topic :: Internet :: WWW/HTTP',
            'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        ],
)
<|endoftext|>


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

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

setup(
    name='autoprop',
    version='0.0.0',
    author='Kale Kundert',
    author_email='kale@thekunderts.net',
    long_description=open('README.rst').read(),
    url='https://github.com/kalekundert/autoprop',
    license='MIT',
    pymodules=[
        'autoprop',
    ],
    keywords=[
        'property', 'properties',
        'accessor', 'accessors',
        'getter', 'setter'
    ],
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries',
    ],
)
<commit_msg>Spell "py_modules" correctly.<commit_after>#!/usr/bin/env python3
# encoding: utf-8

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

setup(
    name='autoprop',
    version='0.0.0',
    author='Kale Kundert',
    author_email='kale@thekunderts.net',
    long_description=open('README.rst').read(),
    url='https://github.com/kalekundert/autoprop',
    license='MIT',
    py_modules=[
        'autoprop',
    ],
    keywords=[
        'property', 'properties',
        'accessor', 'accessors',
        'getter', 'setter'
    ],
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries',
    ],
)
<|endoftext|>


<commit_before>"""
Bulbs
-----

Bulbs is a Python persistence framework for graph databases that
connects to Neo4j Server, Rexster, OrientDB, Lightsocket, and more.

"""
import sys
from setuptools import Command, setup, find_packages

class run_audit(Command):
    """Audits source code using PyFlakes for following issues:
       - Names which are used but not defined or used before they are defined.
       - Names which are redefined without having been used.
    """
    description = "Audit source code with PyFlakes"
    user_options = []

    def initialize_options(self):
        all = None

    def finalize_options(self):
        pass

    def run(self):
        import os, sys
        try:
            import pyflakes.scripts.pyflakes as flakes
        except ImportError:
            print("Audit requires PyFlakes installed in your system.")
            sys.exit(-1)

        dirs = ['bulbs', 'tests']
        # Add example directories
        #for dir in ['blog',]:
        #    dirs.append(os.path.join('examples', dir))
        # TODO: Add test subdirectories
        warns = 0
        for dir in dirs:
            for filename in os.listdir(dir):
                if filename.endswith('.py') and filename != '__init__.py':
                    warns += flakes.checkPath(os.path.join(dir, filename))
        if warns > 0:
            print(("Audit finished with total %d warnings." % warns))
        else:
            print("No problems found in sourcecode.")

def run_tests():
    import os, sys
    sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
    from bulbs_tests import suite
    return suite()

# Python 3
install_requires = ['distribute', 'httplib2>=0.7.2', 'pyyaml>=3.10', 'six', 'omnijson']
if sys.version < '3':
    install_requires.append('python-dateutil==1.5')
else:
    # argparse is in 3.2 but not 3.1
    install_requires.append('argparse')
    install_requires.append('python-dateutil>=2')

setup (
    name = 'bulbs',
    version = '0.3.26',
    url = 'https://github.com/espeed/bulbs',
    license = 'BSD',
    author = 'James Thornton',
    author_email = 'james@jamesthornton.com',
    description = 'A Python persistence framework for graph databases that '
                  'connects to Neo4j Server, Rexster, OrientDB, Lightsocket.',
    long_description = __doc__,
    keywords = "graph database DB persistence framework rexster gremlin cypher neo4j orientdb",
    packages = find_packages(),
    include_package_data=True,
    zip_safe=False,
    platforms='any',
    install_requires=install_requires,
    classifiers = [
        "Programming Language :: Python",
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.0',
        'Programming Language :: Python :: 3.1',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 2.6',
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Topic :: Database",
        "Topic :: Database :: Front-Ends",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Distributed Computing",
        ],
    cmdclass={'audit': run_audit},
    test_suite='__main__.run_tests'
)
<commit_msg>bumps version<commit_after>"""
Bulbs
-----

Bulbs is a Python persistence framework for graph databases that
connects to Neo4j Server, Rexster, OrientDB, Lightsocket, and more.

"""
import sys
from setuptools import Command, setup, find_packages

class run_audit(Command):
    """Audits source code using PyFlakes for following issues:
       - Names which are used but not defined or used before they are defined.
       - Names which are redefined without having been used.
    """
    description = "Audit source code with PyFlakes"
    user_options = []

    def initialize_options(self):
        all = None

    def finalize_options(self):
        pass

    def run(self):
        import os, sys
        try:
            import pyflakes.scripts.pyflakes as flakes
        except ImportError:
            print("Audit requires PyFlakes installed in your system.")
            sys.exit(-1)

        dirs = ['bulbs', 'tests']
        # Add example directories
        #for dir in ['blog',]:
        #    dirs.append(os.path.join('examples', dir))
        # TODO: Add test subdirectories
        warns = 0
        for dir in dirs:
            for filename in os.listdir(dir):
                if filename.endswith('.py') and filename != '__init__.py':
                    warns += flakes.checkPath(os.path.join(dir, filename))
        if warns > 0:
            print(("Audit finished with total %d warnings." % warns))
        else:
            print("No problems found in sourcecode.")

def run_tests():
    import os, sys
    sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
    from bulbs_tests import suite
    return suite()

# Python 3
install_requires = ['distribute', 'httplib2>=0.7.2', 'pyyaml>=3.10', 'six', 'omnijson']
if sys.version < '3':
    install_requires.append('python-dateutil==1.5')
else:
    # argparse is in 3.2 but not 3.1
    install_requires.append('argparse')
    install_requires.append('python-dateutil>=2')

setup (
    name = 'bulbs',
    version = '0.3.27',
    url = 'https://github.com/espeed/bulbs',
    license = 'BSD',
    author = 'James Thornton',
    author_email = 'james@jamesthornton.com',
    description = 'A Python persistence framework for graph databases that '
                  'connects to Neo4j Server, Rexster, OrientDB, Lightsocket.',
    long_description = __doc__,
    keywords = "graph database DB persistence framework rexster gremlin cypher neo4j orientdb",
    packages = find_packages(),
    include_package_data=True,
    zip_safe=False,
    platforms='any',
    install_requires=install_requires,
    classifiers = [
        "Programming Language :: Python",
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.0',
        'Programming Language :: Python :: 3.1',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 2.6',
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Topic :: Database",
        "Topic :: Database :: Front-Ends",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: System :: Distributed Computing",
        ],
    cmdclass={'audit': run_audit},
    test_suite='__main__.run_tests'
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='scuevals-api',
    packages=['scuevals_api'],
    include_package_data=True,
    test_suite='tests',
    entry_points={
        'console_scripts': [
            'app=scuevals_api.cmd:cli'
        ]
    },
    install_requires=[
        'alembic==0.9.7',
        'beautifulsoup4==4.6.0',
        'blinker==1.4',
        'coveralls==1.2.0',
        'Flask-Caching==1.3.3',
        'Flask-Cors==3.0.3',
        'Flask-JWT-Extended==3.6.0',
        'Flask-Migrate==2.1.1',
        'Flask-RESTful==0.3.6',
        'Flask-Rollbar==1.0.1',
        'Flask-SQLAlchemy==2.3.2',
        'Flask==0.12.2',
        'gunicorn==19.7.1',
        'newrelic==2.100.0.84',
        'psycopg2==2.7.3.2',
        'python-jose==2.0.0',
        'PyYAML==3.12',
        'requests==2.18.4',
        'rollbar==0.13.17',
        'vcrpy==1.11.1',
        'webargs==1.8.1',
    ],
)
<commit_msg>Update python-jose<commit_after>from setuptools import setup

setup(
    name='scuevals-api',
    packages=['scuevals_api'],
    include_package_data=True,
    test_suite='tests',
    entry_points={
        'console_scripts': [
            'app=scuevals_api.cmd:cli'
        ]
    },
    install_requires=[
        'alembic==0.9.7',
        'beautifulsoup4==4.6.0',
        'blinker==1.4',
        'coveralls==1.2.0',
        'Flask-Caching==1.3.3',
        'Flask-Cors==3.0.3',
        'Flask-JWT-Extended==3.6.0',
        'Flask-Migrate==2.1.1',
        'Flask-RESTful==0.3.6',
        'Flask-Rollbar==1.0.1',
        'Flask-SQLAlchemy==2.3.2',
        'Flask==0.12.2',
        'gunicorn==19.7.1',
        'newrelic==2.100.0.84',
        'psycopg2==2.7.3.2',
        'python-jose==2.0.1',
        'PyYAML==3.12',
        'requests==2.18.4',
        'rollbar==0.13.17',
        'vcrpy==1.11.1',
        'webargs==1.8.1',
    ],
)
<|endoftext|>


<commit_before>
import sys
from setuptools import setup, find_packages
from cement.utils import version

VERSION = version.get_version()

f = open('README.md', 'r')
LONG = f.read()
f.close()

setup(name='cement',
    version=VERSION,
    python_requires='>=3.5',
    description='Application Framework for Python',
    long_description=LONG,
    long_description_content_type='text/markdown',
    classifiers=[],
    install_requires=[],
    keywords='cli framework',
    author='Data Folk Labs, LLC',
    author_email='derks@datafolklabs.com',
    url='https://builtoncement.com',
    project_urls={
        'Documentation': 'https://docs.builtoncement.com',
        'Source': 'https://github.com/datafolklabs/cement',
    },
    license='BSD',
    packages=find_packages(exclude=['ez_setup', 'tests*']),
    package_data={'cement': ['cement/cli/templates/generate/*']},
    include_package_data=True,
    zip_safe=False,
    test_suite='nose.collector',
    entry_points = {
        'console_scripts' : [
            'cement = cement.cli.main:main',
        ],
    },
    extras_require = {
        'ext.alarm': [],
        'ext.argparse': [],
        'ext.colorlog': ['colorlog'],
        'ext.configparser': [],
        'ext.daemon': [],
        'ext.dummy': [],
        'ext.generate': [],
        'ext.jinja2': ['jinja2'],
        'ext.json': [],
        'ext.logging': [],
        'ext.memcached': ['pylibmc'],
        'ext.mustache': ['pystache'],
        'ext.plugin': [],
        'ext.print': [],
        'ext.redis': ['redis'],
        'ext.scrub': [],
        'ext.smtp': [],
        'ext.tabulate': ['tabulate'],
        'ext.watchdog': ['watchdog'],
        'ext.yaml': ['pyYaml'],
    }
)
<commit_msg>Remove ext. from extras_require<commit_after>
import sys
from setuptools import setup, find_packages
from cement.utils import version

VERSION = version.get_version()

f = open('README.md', 'r')
LONG = f.read()
f.close()

setup(name='cement',
    version=VERSION,
    python_requires='>=3.5',
    description='Application Framework for Python',
    long_description=LONG,
    long_description_content_type='text/markdown',
    classifiers=[],
    install_requires=[],
    keywords='cli framework',
    author='Data Folk Labs, LLC',
    author_email='derks@datafolklabs.com',
    url='https://builtoncement.com',
    project_urls={
        'Documentation': 'https://docs.builtoncement.com',
        'Source': 'https://github.com/datafolklabs/cement',
    },
    license='BSD',
    packages=find_packages(exclude=['ez_setup', 'tests*']),
    package_data={'cement': ['cement/cli/templates/generate/*']},
    include_package_data=True,
    zip_safe=False,
    test_suite='nose.collector',
    entry_points = {
        'console_scripts' : [
            'cement = cement.cli.main:main',
        ],
    },
    extras_require = {
        'alarm': [],
        'argparse': [],
        'colorlog': ['colorlog'],
        'configparser': [],
        'daemon': [],
        'dummy': [],
        'generate': [],
        'jinja2': ['jinja2'],
        'json': [],
        'logging': [],
        'memcached': ['pylibmc'],
        'mustache': ['pystache'],
        'plugin': [],
        'print': [],
        'redis': ['redis'],
        'scrub': [],
        'smtp': [],
        'tabulate': ['tabulate'],
        'watchdog': ['watchdog'],
        'yaml': ['pyYaml'],
    }
)
<|endoftext|>


<commit_before>from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
from distutils.command.build_ext import build_ext
import numpy

import mpi4py
import os

class build_ext_subclass(build_ext):
    user_options = build_ext.user_options + \
            [
            ('mpicc', None, 'MPICC')
            ]
    def initialize_options(self):
        try:
            compiler = str(mpi4py.get_config()['mpicc'])
        except:
            compiler = "mpicc"

        self.mpicc = os.environ.get('MPICC', compiler)

        build_ext.initialize_options(self)

    def finalize_options(self):
        build_ext.finalize_options(self)

    def build_extensions(self):
        # turns out set_executables only works for linker_so, but for compiler_so
        self.compiler.compiler_so[0] = self.mpicc
        self.compiler.linker_so[0] = self.mpicc
        build_ext.build_extensions(self)

extensions = [
        Extension("mpsort.binding", ["mpsort/binding.pyx"],
            include_dirs = ["./", numpy.get_include()])]

def find_version(path):
    import re
    # path shall be a plain ascii text file.
    s = open(path, 'rt').read()
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              s, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Version not found")

setup(
    name="mpsort",
    version=find_version("mpsort/version.py"),
    author="Yu Feng",
    author_email="rainwoodman@gmail.com",
    url="http://github.com/rainwoodman/mpsort",
    description="python binding of MP-sort, a peta scale sorting routine",
    zip_safe = False,
    package_dir = {'mpsort': 'mpsort'},
    install_requires=['cython', 'numpy', 'mpi4py', 'mpi4py_test'],
    packages= ['mpsort', 'mpsort.tests'],
    license='BSD-2-Clause',
    cmdclass = {
        "build_ext": build_ext_subclass
    },
    ext_modules = cythonize(extensions)
)
<commit_msg>do not depend on mpi4py_tests.<commit_after>from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
from distutils.command.build_ext import build_ext
import numpy

import mpi4py
import os

class build_ext_subclass(build_ext):
    user_options = build_ext.user_options + \
            [
            ('mpicc', None, 'MPICC')
            ]
    def initialize_options(self):
        try:
            compiler = str(mpi4py.get_config()['mpicc'])
        except:
            compiler = "mpicc"

        self.mpicc = os.environ.get('MPICC', compiler)

        build_ext.initialize_options(self)

    def finalize_options(self):
        build_ext.finalize_options(self)

    def build_extensions(self):
        # turns out set_executables only works for linker_so, but for compiler_so
        self.compiler.compiler_so[0] = self.mpicc
        self.compiler.linker_so[0] = self.mpicc
        build_ext.build_extensions(self)

extensions = [
        Extension("mpsort.binding", ["mpsort/binding.pyx"],
            include_dirs = ["./", numpy.get_include()])]

def find_version(path):
    import re
    # path shall be a plain ascii text file.
    s = open(path, 'rt').read()
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              s, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Version not found")

setup(
    name="mpsort",
    version=find_version("mpsort/version.py"),
    author="Yu Feng",
    author_email="rainwoodman@gmail.com",
    url="http://github.com/rainwoodman/mpsort",
    description="python binding of MP-sort, a peta scale sorting routine",
    zip_safe = False,
    package_dir = {'mpsort': 'mpsort'},
    install_requires=['cython', 'numpy', 'mpi4py'],
    packages= ['mpsort', 'mpsort.tests'],
    license='BSD-2-Clause',
    cmdclass = {
        "build_ext": build_ext_subclass
    },
    ext_modules = cythonize(extensions)
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(name='htmlement',
      version='0.1',
      description='Python HTMLParser extension with ElementTree support.',
      url='https://github.com/willforde/python-htmlement',
      author='William Forde',
      author_email='willforde@gmail.com',
      license='MIT',
      py_modules=['htmlement'],
      zip_safe=False)
<commit_msg>update setup.py<commit_after>from setuptools import setup

setup(name='htmlement',
      version='0.1',
      description='Python HTMLParser extension with ElementTree support.',
      keywords='html html5 parsehtml htmlparser elementtree dom',
      classifiers=['Development Status :: 4 - Beta',
                   'Intended Audience :: Developers',
                   'License :: OSI Approved :: MIT License',
                   'Natural Language :: English',
                   'Operating System :: OS Independent',
                   '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',
                   'Topic :: Text Processing :: Markup :: HTML'
                   'Topic :: Software Development :: Libraries :: Python Modules'],
      url='https://github.com/willforde/python-htmlement',
      author='William Forde',
      author_email='willforde@gmail.com',
      license='MIT',
      py_modules=['htmlement'],
      zip_safe=False)
<|endoftext|>


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

from setuptools import setup, find_packages

requires = [
    'flask ~> 0.12.3',
    'Flask-RESTful==0.3.2',
    'Flask-Script==2.0.5',
    'Flask-SQLAlchemy==2.0',
    'paramiko',
    'passlib',
    'celery',
    'redis',
]

VERSION = '0.6.5'

setup(
    name='vpnchooser',
    version=VERSION,
    description='Web UI to switch clients between different ip rule tables',
    classifiers=[
        "Programming Language :: Python",
        "Development Status :: 3 - Alpha",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.4",
        "Framework :: Flask",
        "Topic :: System :: Networking",
    ],
    author='Christoph Brand',
    author_email='christoph@brand.rest',
    keywords=['vpn', 'network', 'ip'],
    packages=find_packages('src'),  # include all packages under src
    package_dir={'': 'src'},  # tell distutils packages are under src
    namespace_packages=[],
    include_package_data=True,
    zip_safe=False,
    install_requires=requires,
    url='https://github.com/cbrand/vpnchooser',
    download_url='https://github.com/cbrand/vpnchooser/tarball/%s' % VERSION,
    entry_points={
        'console_scripts': [
            'vpnchooser=vpnchooser.manage:main'
        ]
    },
)
<commit_msg>chore(setup): upgrade flask package version<commit_after># -*- encoding: utf-8 -*-

from setuptools import setup, find_packages

requires = [
    'flask ~> 1.0.0',
    'Flask-RESTful==0.3.2',
    'Flask-Script==2.0.5',
    'Flask-SQLAlchemy==2.0',
    'paramiko',
    'passlib',
    'celery',
    'redis',
]

VERSION = '0.6.5'

setup(
    name='vpnchooser',
    version=VERSION,
    description='Web UI to switch clients between different ip rule tables',
    classifiers=[
        "Programming Language :: Python",
        "Development Status :: 3 - Alpha",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.4",
        "Framework :: Flask",
        "Topic :: System :: Networking",
    ],
    author='Christoph Brand',
    author_email='christoph@brand.rest',
    keywords=['vpn', 'network', 'ip'],
    packages=find_packages('src'),  # include all packages under src
    package_dir={'': 'src'},  # tell distutils packages are under src
    namespace_packages=[],
    include_package_data=True,
    zip_safe=False,
    install_requires=requires,
    url='https://github.com/cbrand/vpnchooser',
    download_url='https://github.com/cbrand/vpnchooser/tarball/%s' % VERSION,
    entry_points={
        'console_scripts': [
            'vpnchooser=vpnchooser.manage:main'
        ]
    },
)
<|endoftext|>


<commit_before># coding: utf-8

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

import sys
import shutil
import os
if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

from pysal.version import version as dversion

with open('README.txt') as file:
    long_description = file.read()

MAJOR = 1
MINOR = 9
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'):
    os.remove('MANIFEST')

def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # get all file endings and copy whole file names without a file suffix
    # assumes nested directories are only down one level
    example_data_files = set()
    for i in os.listdir("pysal/examples"):
        if i.endswith(('py', 'pyc')):
            continue
        if not os.path.isdir("pysal/examples/" + i):
            if "." in i:
                glob_name = "examples/*." + i.split(".")[-1]
            else:
                glob_name = "examples/" + i
        else:
            glob_name = "examples/" + i + "/*"

        example_data_files.add(glob_name)

    setup(
        name='PySAL',
        version=dversion,
        description="A library of spatial analysis functions.",
        long_description=long_description,
        maintainer="PySAL Developers",
        maintainer_email='pysal-dev@googlegroups.com',
        url='http://pysal.org',
        download_url='https://pypi.python.org/pypi/PySAL',
        license='BSD',
        py_modules=['pysal'],
        test_suite='nose.collector',
        tests_require=['nose'],
        keywords='spatial statistics',
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Science/Research',
            'Intended Audience :: Developers',
            'Intended Audience :: Education',
            'Topic :: Scientific/Engineering',
            'Topic :: Scientific/Engineering :: GIS',
            'License :: OSI Approved :: BSD License',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2.5',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7'
        ],
        packages=find_packages(exclude=["*.network", "*.network.*",
            "network.*", "network", ".meta", "*.meta.*", "meta.*",
            "meta"]),
        package_data={'pysal': list(example_data_files)},
        requires=['scipy']
    )

if __name__ == '__main__':
    setup_package()
<commit_msg>REL handling deleted README.txt<commit_after># coding: utf-8

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

import sys
import shutil
import os
if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

from pysal.version import version as dversion

with open('README.md') as file:
    long_description = file.read()

MAJOR = 1
MINOR = 9
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'):
    os.remove('MANIFEST')

def setup_package():

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))  # get cwd
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('pysal', os.path.join(src_path, 'pysal'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

        # Ugly hack to make pip work with Python 3, see #1857.
        # Explanation: pip messes with __file__ which interacts badly with the
        # change in directory due to the 2to3 conversion.  Therefore we restore
        # __file__ to what it would have been otherwise.
        global __file__
        __file__ = os.path.join(os.curdir, os.path.basename(__file__))
        if '--egg-base' in sys.argv:
            # Change pip-egg-info entry to absolute path, so pip can find it
            # after changing directory.
            idx = sys.argv.index('--egg-base')
            if sys.argv[idx + 1] == 'pip-egg-info':
                sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')

    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    # get all file endings and copy whole file names without a file suffix
    # assumes nested directories are only down one level
    example_data_files = set()
    for i in os.listdir("pysal/examples"):
        if i.endswith(('py', 'pyc')):
            continue
        if not os.path.isdir("pysal/examples/" + i):
            if "." in i:
                glob_name = "examples/*." + i.split(".")[-1]
            else:
                glob_name = "examples/" + i
        else:
            glob_name = "examples/" + i + "/*"

        example_data_files.add(glob_name)

    setup(
        name='PySAL',
        version=dversion,
        description="A library of spatial analysis functions.",
        long_description=long_description,
        maintainer="PySAL Developers",
        maintainer_email='pysal-dev@googlegroups.com',
        url='http://pysal.org',
        download_url='https://pypi.python.org/pypi/PySAL',
        license='BSD',
        py_modules=['pysal'],
        test_suite='nose.collector',
        tests_require=['nose'],
        keywords='spatial statistics',
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Science/Research',
            'Intended Audience :: Developers',
            'Intended Audience :: Education',
            'Topic :: Scientific/Engineering',
            'Topic :: Scientific/Engineering :: GIS',
            'License :: OSI Approved :: BSD License',
            'Programming Language :: Python',
            'Programming Language :: Python :: 2.5',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7'
        ],
        packages=find_packages(exclude=["*.network", "*.network.*",
            "network.*", "network", ".meta", "*.meta.*", "meta.*",
            "meta"]),
        package_data={'pysal': list(example_data_files)},
        requires=['scipy']
    )

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


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

import sys

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

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

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

setup(name='polyaxon-schemas',
      version='0.2.3',
      description='Schema definitions and validation for Polyaxon.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mouradmourafiq@gmail.com',
      author='Mourad Mourafiq',
      author_email='mouradmourafiq@gmail.com',
      url='https://github.com/polyaxon/polyaxon-schemas',
      license='MIT',
      platforms='any',
      packages=find_packages(),
      keywords=[
          'polyaxon',
          'tensorFlow',
          'deep-learning',
          'machine-learning',
          'data-science',
          'neural-networks',
          'artificial-intelligence',
          'ai',
          'reinforcement-learning',
          'kubernetes',
      ],
      install_requires=[
          'Jinja2==2.10',
          'marshmallow==2.15.3',
          'numpy==1.15.0',
          'python-dateutil==2.7.3',
          'pytz==2018.5',
          'rhea==0.3.8'
      ],
      classifiers=[
          'Programming Language :: Python',
          'Operating System :: OS Independent',
          'Intended Audience :: Developers',
          'Intended Audience :: Science/Research',
          'Topic :: Scientific/Engineering :: Artificial Intelligence'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<commit_msg>Bump version to 0.2.4<commit_after>#!/usr/bin/env python

import sys

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

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

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

setup(name='polyaxon-schemas',
      version='0.2.4',
      description='Schema definitions and validation for Polyaxon.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mouradmourafiq@gmail.com',
      author='Mourad Mourafiq',
      author_email='mouradmourafiq@gmail.com',
      url='https://github.com/polyaxon/polyaxon-schemas',
      license='MIT',
      platforms='any',
      packages=find_packages(),
      keywords=[
          'polyaxon',
          'tensorFlow',
          'deep-learning',
          'machine-learning',
          'data-science',
          'neural-networks',
          'artificial-intelligence',
          'ai',
          'reinforcement-learning',
          'kubernetes',
      ],
      install_requires=[
          'Jinja2==2.10',
          'marshmallow==2.15.3',
          'numpy==1.15.0',
          'python-dateutil==2.7.3',
          'pytz==2018.5',
          'rhea==0.3.8'
      ],
      classifiers=[
          'Programming Language :: Python',
          'Operating System :: OS Independent',
          'Intended Audience :: Developers',
          'Intended Audience :: Science/Research',
          'Topic :: Scientific/Engineering :: Artificial Intelligence'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<|endoftext|>


<commit_before>"""
setup.py -- setup script for use of packages.
"""
from setuptools import setup, find_packages

__version__ = '2.0.17.1'

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

# create entry points
# see http://astropy.readthedocs.org/en/latest/development/scripts.html
entry_points = {
    'console_scripts' : [
        'watutil = blimpy.waterfall:cmd_tool',
        'rawutil = blimpy.guppi:cmd_tool',
        'fil2h5 = blimpy.fil2h5:cmd_tool',
        'h52fil = blimpy.h52fil:cmd_tool',
        'bl_scrunch = blimpy.bl_scrunch:cmd_tool',
        'matchfils = blimpy.match_fils:cmd_tool',
        'bldice = blimpy.dice:cmd_tool',
        'calcload = blimpy.calcload:cmd_tool',
        'rawhdr = blimpy.rawhdr:cmd_tool',
        'stax = blimpy.stax:cmd_line'
     ]
}

with open("requirements.txt", "r") as fh:
    install_requires = fh.readlines()

extras_require = {
      'full': [
          'pyslalib',
      ]
}

setup(name='blimpy',
      version=__version__,
      description='Python utilities for Breakthrough Listen SETI observations',
      long_description=long_description,
      long_description_content_type='text/markdown',
      license='BSD',
      install_requires=install_requires,
      url='https://github.com/ucberkeleyseti/blimpy',
      author='Danny Price, Emilio Enriquez, Yuhong Chen, Mark Siebert, and BL contributors',
      author_email='dancpr@berkeley.edu',
      entry_points=entry_points,
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Console',
          'Natural Language :: English',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python :: 3.7',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: BSD License',
          'Topic :: Scientific/Engineering :: Astronomy',
      ],
      setup_requires=['pytest-runner'],
      tests_require=['pytest', 'pyslalib'],
      test_suite="blimpytests",
)
<commit_msg>Somethin was rotten in 2.0.17.1<commit_after>"""
setup.py -- setup script for use of packages.
"""
from setuptools import setup, find_packages

__version__ = '2.0.17.2'

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

# create entry points
# see http://astropy.readthedocs.org/en/latest/development/scripts.html
entry_points = {
    'console_scripts' : [
        'watutil = blimpy.waterfall:cmd_tool',
        'rawutil = blimpy.guppi:cmd_tool',
        'fil2h5 = blimpy.fil2h5:cmd_tool',
        'h52fil = blimpy.h52fil:cmd_tool',
        'bl_scrunch = blimpy.bl_scrunch:cmd_tool',
        'matchfils = blimpy.match_fils:cmd_tool',
        'bldice = blimpy.dice:cmd_tool',
        'calcload = blimpy.calcload:cmd_tool',
        'rawhdr = blimpy.rawhdr:cmd_tool',
        'stax = blimpy.stax:cmd_line'
     ]
}

with open("requirements.txt", "r") as fh:
    install_requires = fh.readlines()

extras_require = {
      'full': [
          'pyslalib',
      ]
}

setup(name='blimpy',
      version=__version__,
      description='Python utilities for Breakthrough Listen SETI observations',
      long_description=long_description,
      long_description_content_type='text/markdown',
      license='BSD',
      install_requires=install_requires,
      url='https://github.com/ucberkeleyseti/blimpy',
      author='Danny Price, Emilio Enriquez, Yuhong Chen, Mark Siebert, and BL contributors',
      author_email='dancpr@berkeley.edu',
      entry_points=entry_points,
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Console',
          'Natural Language :: English',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python :: 3.7',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: BSD License',
          'Topic :: Scientific/Engineering :: Astronomy',
      ],
      setup_requires=['pytest-runner'],
      tests_require=['pytest', 'pyslalib'],
      test_suite="blimpytests",
)
<|endoftext|>


<commit_before>from __future__ import with_statement

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

def get_version():
    with open('prettyexc/version.txt') as f:
        return f.read().strip()

def get_readme():
    try:
        with open('README.md') as f:
            return f.read().strip()
    except IOError:
        return ''

setup(
    name='prettyexc',
    version=get_version(),
    description='Easy pretty-look exception interface.',
    long_description=get_readme(),
    author='Jeong YunWon',
    author_email='jeong+prettyexc@youknowone.org',
    url='https://github.com/youknowone/prettyexc',
    packages=(
        'prettyexc',
    ),
    package_data={
        'prettyexc': ['version.txt']
    },
    install_requires=[
        'distribute',
    ],
)
<commit_msg>fix desc<commit_after>from __future__ import with_statement

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

def get_version():
    with open('prettyexc/version.txt') as f:
        return f.read().strip()

def get_readme():
    try:
        with open('README.md') as f:
            return f.read().strip()
    except IOError:
        return ''

setup(
    name='prettyexc',
    version=get_version(),
    description='Make any exception human readable in easy way.',
    long_description=get_readme(),
    author='Jeong YunWon',
    author_email='jeong+prettyexc@youknowone.org',
    url='https://github.com/youknowone/prettyexc',
    packages=(
        'prettyexc',
    ),
    package_data={
        'prettyexc': ['version.txt']
    },
    install_requires=[
        'distribute',
    ],
)
<|endoftext|>


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

from os.path import abspath, dirname, join
from platform import system
from shutil import copyfile

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

ccmscript = 'ccm'
if system() == "Windows":
    copyfile('ccm', 'ccm.py')
    ccmscript = 'ccm.py'

setup(
    name='ccm',
    version='3.0.1',
    description='Cassandra Cluster Manager',
    long_description=open(abspath(join(dirname(__file__), 'README.md'))).read(),
    author='Sylvain Lebresne',
    author_email='sylvain@datastax.com',
    url='https://github.com/pcmanus/ccm',
    packages=['ccmlib', 'ccmlib.cmds'],
    scripts=[ccmscript],
    install_requires=['pyYaml', 'six >=1.4.1'],
    classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4'
    ],

)
<commit_msg>Release 3.0.1<commit_after>#!/usr/bin/env python

from os.path import abspath, dirname, join
from platform import system
from shutil import copyfile

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

ccmscript = 'ccm'
if system() == "Windows":
    copyfile('ccm', 'ccm.py')
    ccmscript = 'ccm.py'

setup(
    name='ccm',
    version='3.0.2',
    description='Cassandra Cluster Manager',
    long_description=open(abspath(join(dirname(__file__), 'README.md'))).read(),
    author='Sylvain Lebresne',
    author_email='sylvain@datastax.com',
    url='https://github.com/pcmanus/ccm',
    packages=['ccmlib', 'ccmlib.cmds'],
    scripts=[ccmscript],
    install_requires=['pyYaml', 'six >=1.4.1'],
    classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4'
    ],

)
<|endoftext|>


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

from distutils.core import setup

setup(name='pygi-composite-templates',
      version='0.2.0',
      description='An implementation of GTK3 composite templates for PyGI',
      author='Dustin Spicuzza',
      author_email='dustin@virtualroadside.com',
      url='https://github.com/virtuald/pygi-composite-templates',
      py_modules=['gi_composites'],
      license="LGPL 2.1+"
     )<commit_msg>Bump version for updated release<commit_after>#!/usr/bin/env python

from distutils.core import setup

setup(name='pygi-composite-templates',
      version='0.2.1',
      description='An implementation of GTK3 composite templates for PyGI',
      author='Dustin Spicuzza',
      author_email='dustin@virtualroadside.com',
      url='https://github.com/virtuald/pygi-composite-templates',
      py_modules=['gi_composites'],
      license="LGPL 2.1+"
     )
<|endoftext|>


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

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

import cupy_setup_build

for submodule in ('cupy/core/include/cupy/cub/',
                  'cupy/core/include/cupy/jitify'):
    if len(os.listdir(submodule)) == 0:
        msg = '''
        The folder %s is a git submodule but is
        currently empty. Please use the command

            git submodule update --init

        to populate the folder before building from source.
        ''' % submodule
        print(msg, file=sys.stderr)
        sys.exit(1)

requirements = {
    'setup': [
        'fastrlock>=0.3',
    ],
    'install': [
        'numpy>=1.15',
        'fastrlock>=0.3',
    ],
    'stylecheck': [
        'autopep8==1.4.4',
        'flake8==3.7.9',
        'pbr==4.0.4',
        'pycodestyle==2.5.0',
    ],
    'test': [
        # 4.2 <= pytest < 6.2 is slow collecting tests and times out on CI.
        'pytest>=6.2',
        # numpy < 1.20 demonstrates non-monotonic output in percentile results
        # that disrupts the cupy monotonicity test. See gh-4607.
        'numpy>=1.20',
    ],
    'doctest': [
        'matplotlib',
        'optuna',
    ],
    'docs': [
        'sphinx==3.0.4',
        'sphinx_rtd_theme',
    ],
    'appveyor': [
        '-r test',
    ],
    'jenkins': [
        '-r test',
        'pytest-timeout',
        'pytest-cov',
        'coveralls',
        'codecov',
        'coverage<5',  # Otherwise, Python must be built with sqlite
    ],
}

def reduce_requirements(key):
    # Resolve recursive requirements notation (-r)
    reqs = requirements[key]
    resolved_reqs = []
    for req in reqs:
        if req.startswith('-r'):
            depend_key = req[2:].lstrip()
            reduce_requirements(depend_key)
            resolved_reqs += requirements[depend_key]
        else:
            resolved_reqs.append(req)
    requirements[key] = resolved_reqs

for k in requirements.keys():
    reduce_requirements(k)

extras_require = {k: v for k, v in requirements.items() if k != 'install'}

setup_requires = requirements['setup']
install_requires = requirements['install']
tests_require = requirements['test']

# List of files that needs to be in the distribution (sdist/wheel).
# Notes:
# - Files only needed in sdist should be added to `MANIFEST.in`.
# - The following glob (`**`) ignores items starting with `.`.
cupy_package_data = [
    'cupy/cuda/cupy_thrust.cu',
    'cupy/cuda/cupy_cub.cu',
    'cupy/cuda/cupy_cufftXt.cu',  # for cuFFT callback
    'cupy/cuda/cupy_cufftXt.h',  # for cuFFT callback
    'cupy/cuda/cupy_cufft.h',  # for cuFFT callback
    'cupy/cuda/cufft.pxd',  # for cuFFT callback
    'cupy/cuda/cufft.pyx',  # for cuFFT callback
    'cupy/random/cupy_distributions.cu',
    'cupy/random/cupy_distributions.cuh',
] + [
    x for x in glob.glob('cupy/core/include/cupy/**', recursive=True)
    if os.path.isfile(x)
]

package_data = {
    'cupy': [
        os.path.relpath(x, 'cupy') for x in cupy_package_data
    ],
}

package_data['cupy'] += cupy_setup_build.prepare_wheel_libs()

package_name = cupy_setup_build.get_package_name()
long_description = cupy_setup_build.get_long_description()
ext_modules = cupy_setup_build.get_ext_modules()
build_ext = cupy_setup_build.custom_build_ext
sdist = cupy_setup_build.sdist_with_cython

here = os.path.abspath(os.path.dirname(__file__))
# Get __version__ variable
exec(open(os.path.join(here, 'cupy', '_version.py')).read())

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3 :: Only
Programming Language :: Cython
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: POSIX
Operating System :: Microsoft :: Windows
"""

setup(
    name=package_name,
    version=__version__,  # NOQA
    description='CuPy: A NumPy-compatible array library accelerated by CUDA',
    long_description=long_description,
    author='Seiya Tokui',
    author_email='tokui@preferred.jp',
    url='https://cupy.dev/',
    license='MIT License',
    project_urls={
        "Bug Tracker": "https://github.com/cupy/cupy/issues",
        "Documentation": "https://docs.cupy.dev/",
        "Source Code": "https://github.com/cupy/cupy",
    },
    classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
    packages=find_packages(exclude=['install', 'tests']),
    package_data=package_data,
    zip_safe=False,
    python_requires='>=3.6.0',
    setup_requires=setup_requires,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require=extras_require,
    ext_modules=ext_modules,
    cmdclass={'build_ext': build_ext,
              'sdist': sdist},
)
<commit_msg>Revert "Require numpy version with more accurate percentile"<commit_after>#!/usr/bin/env python

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

import cupy_setup_build

for submodule in ('cupy/core/include/cupy/cub/',
                  'cupy/core/include/cupy/jitify'):
    if len(os.listdir(submodule)) == 0:
        msg = '''
        The folder %s is a git submodule but is
        currently empty. Please use the command

            git submodule update --init

        to populate the folder before building from source.
        ''' % submodule
        print(msg, file=sys.stderr)
        sys.exit(1)

requirements = {
    'setup': [
        'fastrlock>=0.3',
    ],
    'install': [
        'numpy>=1.15',
        'fastrlock>=0.3',
    ],
    'stylecheck': [
        'autopep8==1.4.4',
        'flake8==3.7.9',
        'pbr==4.0.4',
        'pycodestyle==2.5.0',
    ],
    'test': [
        # 4.2 <= pytest < 6.2 is slow collecting tests and times out on CI.
        'pytest>=6.2',
    ],
    'doctest': [
        'matplotlib',
        'optuna',
    ],
    'docs': [
        'sphinx==3.0.4',
        'sphinx_rtd_theme',
    ],
    'appveyor': [
        '-r test',
    ],
    'jenkins': [
        '-r test',
        'pytest-timeout',
        'pytest-cov',
        'coveralls',
        'codecov',
        'coverage<5',  # Otherwise, Python must be built with sqlite
    ],
}

def reduce_requirements(key):
    # Resolve recursive requirements notation (-r)
    reqs = requirements[key]
    resolved_reqs = []
    for req in reqs:
        if req.startswith('-r'):
            depend_key = req[2:].lstrip()
            reduce_requirements(depend_key)
            resolved_reqs += requirements[depend_key]
        else:
            resolved_reqs.append(req)
    requirements[key] = resolved_reqs

for k in requirements.keys():
    reduce_requirements(k)

extras_require = {k: v for k, v in requirements.items() if k != 'install'}

setup_requires = requirements['setup']
install_requires = requirements['install']
tests_require = requirements['test']

# List of files that needs to be in the distribution (sdist/wheel).
# Notes:
# - Files only needed in sdist should be added to `MANIFEST.in`.
# - The following glob (`**`) ignores items starting with `.`.
cupy_package_data = [
    'cupy/cuda/cupy_thrust.cu',
    'cupy/cuda/cupy_cub.cu',
    'cupy/cuda/cupy_cufftXt.cu',  # for cuFFT callback
    'cupy/cuda/cupy_cufftXt.h',  # for cuFFT callback
    'cupy/cuda/cupy_cufft.h',  # for cuFFT callback
    'cupy/cuda/cufft.pxd',  # for cuFFT callback
    'cupy/cuda/cufft.pyx',  # for cuFFT callback
    'cupy/random/cupy_distributions.cu',
    'cupy/random/cupy_distributions.cuh',
] + [
    x for x in glob.glob('cupy/core/include/cupy/**', recursive=True)
    if os.path.isfile(x)
]

package_data = {
    'cupy': [
        os.path.relpath(x, 'cupy') for x in cupy_package_data
    ],
}

package_data['cupy'] += cupy_setup_build.prepare_wheel_libs()

package_name = cupy_setup_build.get_package_name()
long_description = cupy_setup_build.get_long_description()
ext_modules = cupy_setup_build.get_ext_modules()
build_ext = cupy_setup_build.custom_build_ext
sdist = cupy_setup_build.sdist_with_cython

here = os.path.abspath(os.path.dirname(__file__))
# Get __version__ variable
exec(open(os.path.join(here, 'cupy', '_version.py')).read())

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3 :: Only
Programming Language :: Cython
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: POSIX
Operating System :: Microsoft :: Windows
"""

setup(
    name=package_name,
    version=__version__,  # NOQA
    description='CuPy: A NumPy-compatible array library accelerated by CUDA',
    long_description=long_description,
    author='Seiya Tokui',
    author_email='tokui@preferred.jp',
    url='https://cupy.dev/',
    license='MIT License',
    project_urls={
        "Bug Tracker": "https://github.com/cupy/cupy/issues",
        "Documentation": "https://docs.cupy.dev/",
        "Source Code": "https://github.com/cupy/cupy",
    },
    classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
    packages=find_packages(exclude=['install', 'tests']),
    package_data=package_data,
    zip_safe=False,
    python_requires='>=3.6.0',
    setup_requires=setup_requires,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require=extras_require,
    ext_modules=ext_modules,
    cmdclass={'build_ext': build_ext,
              'sdist': sdist},
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# Licensed under an MIT license - see LICENSE

# NOTE: The configuration for the package, including the name, version, and
# other information are set in the setup.cfg file.

import os
import sys

from setuptools import setup

from extension_helpers import get_extensions

# First provide helpful messages if contributors try and run legacy commands
# for tests or docs.

TEST_HELP = """
Note: running tests is no longer done using 'python setup.py test'. Instead
you will need to run:

    tox -e test

If you don't already have tox installed, you can install it with:

    pip install tox

If you only want to run part of the test suite, you can also use pytest
directly with::

    pip install -e .[test]
    pytest

For more information, see:

  http://docs.astropy.org/en/latest/development/testguide.html#running-tests
"""

if 'test' in sys.argv:
    print(TEST_HELP)
    sys.exit(1)

DOCS_HELP = """
Note: building the documentation is no longer done using
'python setup.py build_docs'. Instead you will need to run:

    tox -e build_docs

If you don't already have tox installed, you can install it with:

    pip install tox

You can also build the documentation with Sphinx directly using::

    pip install -e .[docs]
    cd docs
    make html

For more information, see:

  http://docs.astropy.org/en/latest/install.html#builddocs
"""

if 'build_docs' in sys.argv or 'build_sphinx' in sys.argv:
    print(DOCS_HELP)
    sys.exit(1)

VERSION_TEMPLATE = """
# Note that we need to fall back to the hard-coded version if either
# setuptools_scm can't be imported or setuptools_scm can't determine the
# version, so we catch the generic 'Exception'.
try:
    from setuptools_scm import get_version
    version = get_version(root='..', relative_to=__file__)
except Exception:
    version = '{version}'
""".lstrip()

# ----------------------------------------------------------------------------
# GSL support
#
from subprocess import check_output, CalledProcessError

extra_compile_macros_file = 'gala/extra_compile_macros.h'

# Note: on RTD, they now support conda environments, but don't activate the
# conda environment that gets created, and so the C stuff installed with GSL
# aren't picked up. This is my attempt to hack around that!
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
    PATH = '/home/docs/checkouts/readthedocs.org/user_builds/gala-astro/conda/latest/bin/'
    env = os.environ.copy()
    env['PATH'] = env.get('PATH', "") + ":" + PATH
else:
    env = None

# First, see if the user wants to install without GSL:
nogsl = bool(int(os.environ.get('GALA_NOGSL', 0)))

# Auto-detect whether GSL is installed
if not nogsl or nogsl is None: # GSL support enabled
    cmd = ['gsl-config', '--version']
    try:
        gsl_version = check_output(cmd, env=env)
    except (OSError, CalledProcessError):
        gsl_version = None
    else:
        gsl_version = gsl_version.decode('utf-8').strip().split('.')

else:
    gsl_version = None

# If the hacky macros file already exists, read from that what to do.
# This means people experimenting might need to run "git clean" to remove all
# temp. build products if they want to switch between installing with GSL and
# no GSL support.
if os.path.exists(extra_compile_macros_file):
    with open(extra_compile_macros_file, "r") as f:
        line = f.read().strip()

    if line.endswith('0'):
        gsl_version = None
        nogsl = True

print("-" * 79)
_see_msg = ("See the gala documentation 'installation' page for more "
            "information about GSL support and installing GSL: "
            "http://gala.adrian.pw/en/latest/install.html")
if gsl_version is None:
    if nogsl:
        print('Installing without GSL support.')
    else:
        print('GSL not found: installing without GSL support. ' + _see_msg)

elif gsl_version < ['1', '14']:
    print('Warning: GSL version ({0}) is below the minimum required version '
          '(1.16). Installing without GSL support. '
          .format('.'.join(gsl_version)) + _see_msg)
    gsl_version = None

else:
    print("GSL version {0} found: installing with GSL support"
          .format('.'.join(gsl_version)))

    # Now get the gsl install location
    cmd = ['gsl-config', '--prefix']
    try:
        gsl_prefix = check_output(cmd, encoding='utf-8').strip()
    except:
        gsl_prefix = str(check_output(cmd)).strip()

print("-" * 79)

extensions = get_extensions()
for ext in extensions:
    if 'potential.potential' in ext.name or 'scf' in ext.name:
        if gsl_version is not None:
            if 'gsl' not in ext.libraries:
                ext.libraries.append('gsl')
                ext.library_dirs.append(os.path.join(gsl_prefix, 'lib'))
                ext.include_dirs.append(os.path.join(gsl_prefix, 'include'))

            if 'gslcblas' not in ext.libraries:
                ext.libraries.append('gslcblas')

with open(extra_compile_macros_file, 'w') as f:
    if gsl_version is not None:
        f.writelines(['#define USE_GSL 1'])
    else:
        f.writelines(['#define USE_GSL 0'])

setup(use_scm_version={'write_to': os.path.join('gala', 'version.py'),
                       'write_to_template': VERSION_TEMPLATE},
      ext_modules=extensions)
<commit_msg>testing<commit_after>#!/usr/bin/env python
# Licensed under an MIT license - see LICENSE

# NOTE: The configuration for the package, including the name, version, and
# other information are set in the setup.cfg file.

import os
import sys

from setuptools import setup

from extension_helpers import get_extensions

# First provide helpful messages if contributors try and run legacy commands
# for tests or docs.

TEST_HELP = """
Note: running tests is no longer done using 'python setup.py test'. Instead
you will need to run:

    tox -e test

If you don't already have tox installed, you can install it with:

    pip install tox

If you only want to run part of the test suite, you can also use pytest
directly with::

    pip install -e .[test]
    pytest

For more information, see:

  http://docs.astropy.org/en/latest/development/testguide.html#running-tests
"""

if 'test' in sys.argv:
    print(TEST_HELP)
    sys.exit(1)

DOCS_HELP = """
Note: building the documentation is no longer done using
'python setup.py build_docs'. Instead you will need to run:

    tox -e build_docs

If you don't already have tox installed, you can install it with:

    pip install tox

You can also build the documentation with Sphinx directly using::

    pip install -e .[docs]
    cd docs
    make html

For more information, see:

  http://docs.astropy.org/en/latest/install.html#builddocs
"""

if 'build_docs' in sys.argv or 'build_sphinx' in sys.argv:
    print(DOCS_HELP)
    sys.exit(1)

VERSION_TEMPLATE = """
# Note that we need to fall back to the hard-coded version if either
# setuptools_scm can't be imported or setuptools_scm can't determine the
# version, so we catch the generic 'Exception'.
try:
    from setuptools_scm import get_version
    version = get_version(root='..', relative_to=__file__)
except Exception:
    version = '{version}'
""".lstrip()

# ----------------------------------------------------------------------------
# GSL support
#
from subprocess import check_output, CalledProcessError

extra_compile_macros_file = 'gala/extra_compile_macros.h'

# Note: on RTD, they now support conda environments, but don't activate the
# conda environment that gets created, and so the C stuff installed with GSL
# aren't picked up. This is my attempt to hack around that!
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
    PATH = '/home/docs/checkouts/readthedocs.org/user_builds/gala-astro/conda/latest/bin/'
    env = os.environ.copy()
    env['PATH'] = env.get('PATH', "") + ":" + PATH
else:
    env = None

# First, see if the user wants to install without GSL:
nogsl = bool(int(os.environ.get('GALA_NOGSL', 0)))

# Auto-detect whether GSL is installed
if not nogsl or nogsl is None: # GSL support enabled
    cmd = ['gsl-config', '--version']
    try:
        gsl_version = check_output(cmd, env=env)
    except (OSError, CalledProcessError):
        gsl_version = None
    else:
        gsl_version = gsl_version.decode('utf-8').strip().split('.')

else:
    gsl_version = None

# If the hacky macros file already exists, read from that what to do.
# This means people experimenting might need to run "git clean" to remove all
# temp. build products if they want to switch between installing with GSL and
# no GSL support.
# if os.path.exists(extra_compile_macros_file):
#     with open(extra_compile_macros_file, "r") as f:
#         line = f.read().strip()

#     if line.endswith('0'):
#         gsl_version = None
#         nogsl = True

print("-" * 79)
_see_msg = ("See the gala documentation 'installation' page for more "
            "information about GSL support and installing GSL: "
            "http://gala.adrian.pw/en/latest/install.html")
if gsl_version is None:
    if nogsl:
        print('Installing without GSL support.')
    else:
        print('GSL not found: installing without GSL support. ' + _see_msg)

elif gsl_version < ['1', '14']:
    print('Warning: GSL version ({0}) is below the minimum required version '
          '(1.16). Installing without GSL support. '
          .format('.'.join(gsl_version)) + _see_msg)
    gsl_version = None

else:
    print("GSL version {0} found: installing with GSL support"
          .format('.'.join(gsl_version)))

    # Now get the gsl install location
    cmd = ['gsl-config', '--prefix']
    try:
        gsl_prefix = check_output(cmd, encoding='utf-8').strip()
    except:
        gsl_prefix = str(check_output(cmd)).strip()

print("-" * 79)

extensions = get_extensions()
for ext in extensions:
    if 'potential.potential' in ext.name or 'scf' in ext.name:
        if gsl_version is not None:
            if 'gsl' not in ext.libraries:
                ext.libraries.append('gsl')
                ext.library_dirs.append(os.path.join(gsl_prefix, 'lib'))
                ext.include_dirs.append(os.path.join(gsl_prefix, 'include'))

            if 'gslcblas' not in ext.libraries:
                ext.libraries.append('gslcblas')

with open(extra_compile_macros_file, 'w') as f:
    if gsl_version is not None:
        f.writelines(['#define USE_GSL 1'])
    else:
        f.writelines(['#define USE_GSL 0'])

setup(use_scm_version={'write_to': os.path.join('gala', 'version.py'),
                       'write_to_template': VERSION_TEMPLATE},
      ext_modules=extensions)
<|endoftext|>


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

###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2009, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#   * Redistributions of source code must retain the above copyright notice,
#     this list of conditions, and the following disclaimer.
#   * Redistributions in binary form must reproduce the above copyright notice,
#     this list of conditions, and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#   * Neither the name of the author of this software nor the name of
#     contributors to this software may be used to endorse or promote products
#     derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###

import os
import sys
import tempfile
import subprocess

debug = '--debug' in sys.argv

path = os.path.dirname(__file__)
if debug:
    print('DEBUG: Changing dir from %r to %r' % (os.getcwd(), path))
if path:
    os.chdir(path)

version = None
try:
    proc = subprocess.Popen('git show HEAD --format=%ci', shell=True,
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    version = proc.stdout.readline()
    if sys.version_info[0] >= 3:
        version = version.decode()
    version = version \
            .strip() \
            .split(' +')[0] \
            .replace(' ', 'T') \
            .replace(':', '-')
except:
    pass
if not version:
    from time import gmtime, strftime
    version = 'installed on ' + strftime("%Y-%m-%dT%H-%M-%S", gmtime())
try:
    os.unlink(os.path.join('src', 'version.py'))
except OSError: # Does not exist
    pass
fd = open(os.path.join('src', 'version.py'), 'a')
fd.write("version = '0.83.4.1+limnoria %s'\n" % version)
fd.close()

if sys.version_info < (2, 6, 0):
    sys.stderr.write("Supybot requires Python 2.6 or newer.")
    sys.stderr.write(os.linesep)
    sys.exit(-1)

import textwrap

clean = False
while '--clean' in sys.argv:
    clean = True
    sys.argv.remove('--clean')

import glob
import shutil
import os

plugins = [s for s in os.listdir('plugins') if
           os.path.exists(os.path.join('plugins', s, 'plugin.py'))]

def normalizeWhitespace(s):
    return ' '.join(s.split())

try:
    from distutils.core import setup
    from distutils.sysconfig import get_python_lib
except ImportError as e:
    s = normalizeWhitespace("""Supybot requires the distutils package to
    install. This package is normally included with Python, but for some
    unfathomable reason, many distributions to take it out of standard Python
    and put it in another package, usually caled 'python-dev' or python-devel'
    or something similar. This is one of the dumbest things a distribution can
    do, because it means that developers cannot rely on *STANDARD* Python
    modules to be present on systems of that distribution. Complain to your
    distribution, and loudly. If you how much of our time we've wasted telling
    people to install what should be included by default with Python you'd
    understand why we're unhappy about this.  Anyway, to reiterate, install the
    development package for Python that your distribution supplies.""")
    sys.stderr.write(os.linesep*2)
    sys.stderr.write(textwrap.fill(s))
    sys.stderr.write(os.linesep*2)
    sys.exit(-1)
try:
    from distutils.command.build_py import build_py_2to3
    class build_py(build_py_2to3):
        def run_2to3(self, files, options=None):
            from distutils import log
            from lib2to3.refactor import RefactoringTool, get_fixers_from_package
            if not files:
                return

            # Make this class local, to delay import of 2to3
            from lib2to3.refactor import RefactoringTool, get_fixers_from_package
            class DistutilsRefactoringTool(RefactoringTool):
                def refactor(self, files, *args, **kwargs):
                    self._total_files = len(files)
                    self._refactored_files = 0
                    super(DistutilsRefactoringTool, self).refactor(files,
                            *args, **kwargs)
                    del self._total_files
                    del self._refactored_files
                def refactor_file(self, filename, *args, **kwargs):
                    if self._total_files//10 != 0 and \
                            self._refactored_files % (self._total_files//10) == 0:
                        print('Refactoring files: %i%% (%i on %i).' %
                                (self._refactored_files/(self._total_files//10)*10,
                                 self._refactored_files, self._total_files))
                    self._refactored_files += 1
                    return super(DistutilsRefactoringTool, self).refactor_file(
                            filename, *args, **kwargs)
                def log_error(self, msg, *args, **kw):
                    log.error(msg, *args)

                def log_message(self, msg, *args):
                    log.info(msg, *args)

                def log_debug(self, msg, *args):
                    log.debug(msg, *args)

            fixer_names = get_fixers_from_package('lib2to3.fixes')
            fixer_names.remove('lib2to3.fixes.fix_import')
            fixer_names += get_fixers_from_package('2to3')
            r = DistutilsRefactoringTool(fixer_names, options=options)
            r.refactor(files, write=True)
except ImportError:
    # 2.x
    from distutils.command.build_py import build_py

if clean:
    previousInstall = os.path.join(get_python_lib(), 'supybot')
    if os.path.exists(previousInstall):
        try:
            print('Removing current installation.')
            shutil.rmtree(previousInstall)
        except Exception as e:
            print('Couldn\'t remove former installation: %s' % e)
            sys.exit(-1)

packages = ['supybot',
            'supybot.locales',
            'supybot.utils',
            'supybot.drivers',
            'supybot.plugins',] + \
            ['supybot.plugins.'+s for s in plugins] + \
            [
             'supybot.plugins.Dict.local',
             'supybot.plugins.Math.local',
            ]

package_dir = {'supybot': 'src',
               'supybot.utils': 'src/utils',
               'supybot.locales': 'locales',
               'supybot.plugins': 'plugins',
               'supybot.drivers': 'src/drivers',
               'supybot.plugins.Dict.local': 'plugins/Dict/local',
               'supybot.plugins.Math.local': 'plugins/Math/local',
              }

package_data = {'supybot.locales': [s for s in os.listdir('locales/')]}

for plugin in plugins:
    package_dir['supybot.plugins.' + plugin] = 'plugins/' + plugin
    locales_path = 'plugins/' + plugin + '/locales/'
    locales_name = 'supybot.plugins.'+plugin
    if os.path.exists(locales_path):
        package_data.update({locales_name: ['locales/'+s for s in os.listdir(locales_path)]})

setup(
    # Metadata
    name='limnoria',
    provides=['supybot'],
    version=version,
    author='Valentin Lorentz',
    url='https://github.com/ProgVal/Limnoria',
    author_email='progval+limnoria@progval.net',
    download_url='http://builds.progval.net/limnoria/',
    description='A modified version of Supybot (an IRC bot)',
    long_description=normalizeWhitespace("""A robust, full-featured Python IRC
    bot with a clean and flexible plugin API.  Equipped with a complete ACL
    system for specifying user permissions with as much as per-command
    granularity.  Batteries are included in the form of numerous plugins
    already written."""),
    classifiers = [
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Environment :: No Input/Output (Daemon)',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Topic :: Communications :: Chat :: Internet Relay Chat',
        'Natural Language :: English',
        'Natural Language :: Finnish',
        'Natural Language :: French',
        'Natural Language :: Hungarian',
        'Natural Language :: Italian',
        'Operating System :: OS Independent',
        'Operating System :: POSIX',
        'Operating System :: Microsoft :: Windows',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        ],
    cmdclass = {'build_py': build_py},

    # Installation data
    packages=packages,

    package_dir=package_dir,

    package_data=package_data,

    scripts=['scripts/supybot',
             'scripts/supybot-test',
             'scripts/supybot-botchk',
             'scripts/supybot-wizard',
             'scripts/supybot-adduser',
             'scripts/supybot-plugin-doc',
             'scripts/supybot-plugin-create',
             ],
    data_files=[('share/man/man1', ['docs/man/supybot.1']),
                ('share/man/man1', ['docs/man/supybot-test.1']),
                ('share/man/man1', ['docs/man/supybot-botchk.1']),
                ('share/man/man1', ['docs/man/supybot-wizard.1']),
                ('share/man/man1', ['docs/man/supybot-adduser.1']),
                ('share/man/man1', ['docs/man/supybot-plugin-doc.1']),
                ('share/man/man1', ['docs/man/supybot-plugin-create.1']),
        ]
    )

# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
<commit_msg>Set list of fixers explicitely.<commit_after>#!/usr/bin/env python

###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2009, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#   * Redistributions of source code must retain the above copyright notice,
#     this list of conditions, and the following disclaimer.
#   * Redistributions in binary form must reproduce the above copyright notice,
#     this list of conditions, and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#   * Neither the name of the author of this software nor the name of
#     contributors to this software may be used to endorse or promote products
#     derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###

import os
import sys
import tempfile
import subprocess

debug = '--debug' in sys.argv

path = os.path.dirname(__file__)
if debug:
    print('DEBUG: Changing dir from %r to %r' % (os.getcwd(), path))
if path:
    os.chdir(path)

version = None
try:
    proc = subprocess.Popen('git show HEAD --format=%ci', shell=True,
            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    version = proc.stdout.readline()
    if sys.version_info[0] >= 3:
        version = version.decode()
    version = version \
            .strip() \
            .split(' +')[0] \
            .replace(' ', 'T') \
            .replace(':', '-')
except:
    pass
if not version:
    from time import gmtime, strftime
    version = 'installed on ' + strftime("%Y-%m-%dT%H-%M-%S", gmtime())
try:
    os.unlink(os.path.join('src', 'version.py'))
except OSError: # Does not exist
    pass
fd = open(os.path.join('src', 'version.py'), 'a')
fd.write("version = '0.83.4.1+limnoria %s'\n" % version)
fd.close()

if sys.version_info < (2, 6, 0):
    sys.stderr.write("Supybot requires Python 2.6 or newer.")
    sys.stderr.write(os.linesep)
    sys.exit(-1)

import textwrap

clean = False
while '--clean' in sys.argv:
    clean = True
    sys.argv.remove('--clean')

import glob
import shutil
import os

plugins = [s for s in os.listdir('plugins') if
           os.path.exists(os.path.join('plugins', s, 'plugin.py'))]

def normalizeWhitespace(s):
    return ' '.join(s.split())

try:
    from distutils.core import setup
    from distutils.sysconfig import get_python_lib
except ImportError as e:
    s = normalizeWhitespace("""Supybot requires the distutils package to
    install. This package is normally included with Python, but for some
    unfathomable reason, many distributions to take it out of standard Python
    and put it in another package, usually caled 'python-dev' or python-devel'
    or something similar. This is one of the dumbest things a distribution can
    do, because it means that developers cannot rely on *STANDARD* Python
    modules to be present on systems of that distribution. Complain to your
    distribution, and loudly. If you how much of our time we've wasted telling
    people to install what should be included by default with Python you'd
    understand why we're unhappy about this.  Anyway, to reiterate, install the
    development package for Python that your distribution supplies.""")
    sys.stderr.write(os.linesep*2)
    sys.stderr.write(textwrap.fill(s))
    sys.stderr.write(os.linesep*2)
    sys.exit(-1)
try:
    from distutils.command.build_py import build_py_2to3
    class build_py(build_py_2to3):
        def run_2to3(self, files, options=None):
            from distutils import log
            from lib2to3.refactor import RefactoringTool, get_fixers_from_package
            if not files:
                return

            # Make this class local, to delay import of 2to3
            from lib2to3.refactor import RefactoringTool, get_fixers_from_package
            class DistutilsRefactoringTool(RefactoringTool):
                def refactor(self, files, *args, **kwargs):
                    self._total_files = len(files)
                    self._refactored_files = 0
                    super(DistutilsRefactoringTool, self).refactor(files,
                            *args, **kwargs)
                    del self._total_files
                    del self._refactored_files
                def refactor_file(self, filename, *args, **kwargs):
                    if self._total_files//10 != 0 and \
                            self._refactored_files % (self._total_files//10) == 0:
                        print('Refactoring files: %i%% (%i on %i).' %
                                (self._refactored_files/(self._total_files//10)*10,
                                 self._refactored_files, self._total_files))
                    self._refactored_files += 1
                    return super(DistutilsRefactoringTool, self).refactor_file(
                            filename, *args, **kwargs)
                def log_error(self, msg, *args, **kw):
                    log.error(msg, *args)

                def log_message(self, msg, *args):
                    log.info(msg, *args)

                def log_debug(self, msg, *args):
                    log.debug(msg, *args)

            fixer_names = ['fix_apply', 'fix_basestring', 'fix_buffer',
                    'fix_callable', 'fix_dict', 'fix_except', 'fix_exec',
                    'fix_execfile', 'fix_exitfunc', 'fix_filter',
                    'fix_funcattrs', 'fix_future', 'fix_getcwdu',
                    'fix_has_key', 'fix_idioms', 'fix_imports', 'fix_imports2',
                    'fix_input', 'fix_intern', 'fix_isinstance',
                    'fix_itertools', 'fix_itertools_imports', 'fix_long',
                    'fix_map', 'fix_metaclass', 'fix_methodattrs', 'fix_ne',
                    'fix_next', 'fix_nonzero', 'fix_numliterals',
                    'fix_operator', 'fix_paren', 'fix_print', 'fix_raise',
                    'fix_raw_input', 'fix_reduce', 'fix_renames', 'fix_repr',
                    'fix_set_literal', 'fix_standarderror', 'fix_sys_exc',
                    'fix_throw', 'fix_tuple_params', 'fix_types',
                    'fix_unicode', 'fix_urllib', 'fix_ws_comma', 'fix_xrange',
                    'fix_xreadlines', 'fix_zip']
            fixers = list(map(lambda x:'lib2to3.fixes.'+x, fixer_names))
            fixers += get_fixers_from_package('2to3')
            r = DistutilsRefactoringTool(fixers, options=options)
            r.refactor(files, write=True)
except ImportError:
    # 2.x
    from distutils.command.build_py import build_py

if clean:
    previousInstall = os.path.join(get_python_lib(), 'supybot')
    if os.path.exists(previousInstall):
        try:
            print('Removing current installation.')
            shutil.rmtree(previousInstall)
        except Exception as e:
            print('Couldn\'t remove former installation: %s' % e)
            sys.exit(-1)

packages = ['supybot',
            'supybot.locales',
            'supybot.utils',
            'supybot.drivers',
            'supybot.plugins',] + \
            ['supybot.plugins.'+s for s in plugins] + \
            [
             'supybot.plugins.Dict.local',
             'supybot.plugins.Math.local',
            ]

package_dir = {'supybot': 'src',
               'supybot.utils': 'src/utils',
               'supybot.locales': 'locales',
               'supybot.plugins': 'plugins',
               'supybot.drivers': 'src/drivers',
               'supybot.plugins.Dict.local': 'plugins/Dict/local',
               'supybot.plugins.Math.local': 'plugins/Math/local',
              }

package_data = {'supybot.locales': [s for s in os.listdir('locales/')]}

for plugin in plugins:
    package_dir['supybot.plugins.' + plugin] = 'plugins/' + plugin
    locales_path = 'plugins/' + plugin + '/locales/'
    locales_name = 'supybot.plugins.'+plugin
    if os.path.exists(locales_path):
        package_data.update({locales_name: ['locales/'+s for s in os.listdir(locales_path)]})

setup(
    # Metadata
    name='limnoria',
    provides=['supybot'],
    version=version,
    author='Valentin Lorentz',
    url='https://github.com/ProgVal/Limnoria',
    author_email='progval+limnoria@progval.net',
    download_url='http://builds.progval.net/limnoria/',
    description='A modified version of Supybot (an IRC bot)',
    long_description=normalizeWhitespace("""A robust, full-featured Python IRC
    bot with a clean and flexible plugin API.  Equipped with a complete ACL
    system for specifying user permissions with as much as per-command
    granularity.  Batteries are included in the form of numerous plugins
    already written."""),
    classifiers = [
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Environment :: No Input/Output (Daemon)',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Topic :: Communications :: Chat :: Internet Relay Chat',
        'Natural Language :: English',
        'Natural Language :: Finnish',
        'Natural Language :: French',
        'Natural Language :: Hungarian',
        'Natural Language :: Italian',
        'Operating System :: OS Independent',
        'Operating System :: POSIX',
        'Operating System :: Microsoft :: Windows',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        ],
    cmdclass = {'build_py': build_py},

    # Installation data
    packages=packages,

    package_dir=package_dir,

    package_data=package_data,

    scripts=['scripts/supybot',
             'scripts/supybot-test',
             'scripts/supybot-botchk',
             'scripts/supybot-wizard',
             'scripts/supybot-adduser',
             'scripts/supybot-plugin-doc',
             'scripts/supybot-plugin-create',
             ],
    data_files=[('share/man/man1', ['docs/man/supybot.1']),
                ('share/man/man1', ['docs/man/supybot-test.1']),
                ('share/man/man1', ['docs/man/supybot-botchk.1']),
                ('share/man/man1', ['docs/man/supybot-wizard.1']),
                ('share/man/man1', ['docs/man/supybot-adduser.1']),
                ('share/man/man1', ['docs/man/supybot-plugin-doc.1']),
                ('share/man/man1', ['docs/man/supybot-plugin-create.1']),
        ]
    )

# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages

with open('README.rst', 'rb') as readme_file:
    readme = readme_file.read().decode('utf8')

REQUIRES = (
    'crochet>=1.4.0',
    'autobahn>=0.12.0'
)

setup(
    name='autobahn-sync',
    version='0.3.1',
    description='Bring autobahn to your synchronous apps !',
    long_description=readme,
    author='Emmanuel Leblond',
    author_email='emmanuel.leblond@gmail.com',
    url='https://github.com/Scille/autobahn_sync',
    packages=find_packages(exclude=("test*", )),
    package_dir={'autobahn_sync': 'autobahn_sync'},
    include_package_data=True,
    install_requires=REQUIRES,
    license='MIT',
    zip_safe=False,
    keywords='autobahn autobahn.ws wamp twisted crochet flask',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],
    test_suite='tests',
)
<commit_msg>Correct PEP8<commit_after># -*- coding: utf-8 -*-
from setuptools import setup, find_packages

with open('README.rst', 'rb') as readme_file:
    readme = readme_file.read().decode('utf8')

REQUIRES = (
    'crochet>=1.4.0',
    'autobahn>=0.12.0'
)

setup(
    name='autobahn-sync',
    version='0.3.1',
    description='Bring autobahn to your synchronous apps !',
    long_description=readme,
    author='Emmanuel Leblond',
    author_email='emmanuel.leblond@gmail.com',
    url='https://github.com/Scille/autobahn_sync',
    packages=find_packages(exclude=("test*", )),
    package_dir={'autobahn_sync': 'autobahn_sync'},
    include_package_data=True,
    install_requires=REQUIRES,
    license='MIT',
    zip_safe=False,
    keywords='autobahn autobahn.ws wamp twisted crochet flask',
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],
    test_suite='tests',
)
<|endoftext|>