<commit_before>#!/usr/bin/env python
"""Installation script."""
import logging
from setuptools import setup
# inline:
# import git

NAME = 'tulip'
VERSION_FILE = '{name}/_version.py'.format(name=NAME)
MAJOR = 1
MINOR = 4
MICRO = 0
VERSION = '{major}.{minor}.{micro}'.format(
    major=MAJOR, minor=MINOR, micro=MICRO)
VERSION_TEXT = (
    '# This file was generated from setup.py\n'
    "version = '{version}'\n")
logging.basicConfig(level=logging.WARNING)
logger = logging.getLogger(__name__)
classifiers = [
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: BSD License',
    'Operating System :: OS Independent',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Topic :: Scientific/Engineering']
package_data = {
    'tulip.spec': ['parsetab.py']}

def git_version(version):
    """Return version with local version identifier."""
    import git
    repo = git.Repo('.git')
    repo.git.status()
    sha = repo.head.commit.hexsha
    if repo.is_dirty():
        return '{v}.dev0+{sha}.dirty'.format(
            v=version, sha=sha)
    # commit is clean
    # is it release of `version` ?
    try:
        tag = repo.git.describe(
            match='v[0-9]*', exact_match=True,
            tags=True, dirty=True)
    except git.GitCommandError:
        return '{v}.dev0+{sha}'.format(
            v=version, sha=sha)
    assert tag == 'v' + version, (tag, version)
    return version

def run_setup():
    """Build parser, get version from `git`, install."""
    # Build PLY table, to be installed as tulip package data
    try:
        import tulip.spec.lexyacc
        tabmodule = tulip.spec.lexyacc.TABMODULE.split('.')[-1]
        outputdir = 'tulip/spec'
        parser = tulip.spec.lexyacc.Parser()
        parser.build(tabmodule, outputdir=outputdir,
                     write_tables=True,
                     debug=True, debuglog=logger)
        plytable_build_failed = False
    except Exception as e:
        print('Failed to build PLY tables: {e}'.format(e=e))
        plytable_build_failed = True
    # version
    try:
        version = git_version(VERSION)
    except AssertionError:
        raise
    except Exception:
        print('No git info: Assume release.')
        version = VERSION
    s = VERSION_TEXT.format(version=version)
    with open(VERSION_FILE, 'w') as f:
        f.write(s)
    # setup
    setup(
        name=NAME,
        version=version,
        description='Temporal Logic Planning (TuLiP) Toolbox',
        author='Caltech Control and Dynamical Systems',
        author_email='tulip@tulip-control.org',
        url='http://tulip-control.org',
        bugtrack_url=('http://github.com/tulip-control/'
                      'tulip-control/issues'),
        license='BSD',
        classifiers=classifiers,
        install_requires=[
            'networkx >= 2.0, <= 2.4',
            'numpy >= 1.7',
            'omega >= 0.3.1, < 0.4.0',
            'ply >= 3.4, <= 3.10',
            'polytope >= 0.2.1',
            'pydot >= 1.2.0',
            'scipy'],
        tests_require=[
            'nose',
            'matplotlib >= 2.0.0',
            'gr1py >= 0.2.0',
            'mock',
            'setuptools >= 39.0.0'],
        packages=[
            'tulip', 'tulip.transys', 'tulip.transys.export',
            'tulip.abstract', 'tulip.spec',
            'tulip.interfaces'],
        package_dir={'tulip': 'tulip'},
        package_data=package_data)
    # ply failed ?
    if plytable_build_failed:
        print('!' * 65 +
              '    Failed to build PLY table.  ' +
              'Please run setup.py again.' +
              '!' * 65)

def install_cvxopt():
    """Install a version of cvxopt that is compatible with polytope
    requirements"""
    import polytope
    import subprocess
    import sys
    ver = polytope.__version__
    # Download all files for the current version of polytope
    subprocess.check_call([
        sys.executable, "-m",
        "pip", "download",
        "-d", "temp",
        "--no-deps",
        "polytope=={ver}".format(ver=ver)])
    # Extract the tar archive
    subprocess.check_call([
        "tar", "xzf",
        "temp/polytope-{ver}.tar.gz".format(ver=ver),
        "-C", "temp"])
    # Install cvxopt according to requirements file provided by polytope
    subprocess.check_call([
        sys.executable, "-m",
        "pip", "install",
        "-r", "temp/polytope-{ver}/requirements/extras.txt".format(ver=ver)])

if __name__ == '__main__':
    run_setup()
<commit_msg>REL: add Trove classifier for Python 3.9<commit_after>#!/usr/bin/env python
"""Installation script."""
import logging
from setuptools import setup
# inline:
# import git

NAME = 'tulip'
VERSION_FILE = '{name}/_version.py'.format(name=NAME)
MAJOR = 1
MINOR = 4
MICRO = 0
VERSION = '{major}.{minor}.{micro}'.format(
    major=MAJOR, minor=MINOR, micro=MICRO)
VERSION_TEXT = (
    '# This file was generated from setup.py\n'
    "version = '{version}'\n")
logging.basicConfig(level=logging.WARNING)
logger = logging.getLogger(__name__)
classifiers = [
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: BSD License',
    'Operating System :: OS Independent',
    'Programming Language :: Python',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Programming Language :: Python :: 3.9',
    'Topic :: Scientific/Engineering']
package_data = {
    'tulip.spec': ['parsetab.py']}

def git_version(version):
    """Return version with local version identifier."""
    import git
    repo = git.Repo('.git')
    repo.git.status()
    sha = repo.head.commit.hexsha
    if repo.is_dirty():
        return '{v}.dev0+{sha}.dirty'.format(
            v=version, sha=sha)
    # commit is clean
    # is it release of `version` ?
    try:
        tag = repo.git.describe(
            match='v[0-9]*', exact_match=True,
            tags=True, dirty=True)
    except git.GitCommandError:
        return '{v}.dev0+{sha}'.format(
            v=version, sha=sha)
    assert tag == 'v' + version, (tag, version)
    return version

def run_setup():
    """Build parser, get version from `git`, install."""
    # Build PLY table, to be installed as tulip package data
    try:
        import tulip.spec.lexyacc
        tabmodule = tulip.spec.lexyacc.TABMODULE.split('.')[-1]
        outputdir = 'tulip/spec'
        parser = tulip.spec.lexyacc.Parser()
        parser.build(tabmodule, outputdir=outputdir,
                     write_tables=True,
                     debug=True, debuglog=logger)
        plytable_build_failed = False
    except Exception as e:
        print('Failed to build PLY tables: {e}'.format(e=e))
        plytable_build_failed = True
    # version
    try:
        version = git_version(VERSION)
    except AssertionError:
        raise
    except Exception:
        print('No git info: Assume release.')
        version = VERSION
    s = VERSION_TEXT.format(version=version)
    with open(VERSION_FILE, 'w') as f:
        f.write(s)
    # setup
    setup(
        name=NAME,
        version=version,
        description='Temporal Logic Planning (TuLiP) Toolbox',
        author='Caltech Control and Dynamical Systems',
        author_email='tulip@tulip-control.org',
        url='http://tulip-control.org',
        bugtrack_url=('http://github.com/tulip-control/'
                      'tulip-control/issues'),
        license='BSD',
        classifiers=classifiers,
        install_requires=[
            'networkx >= 2.0, <= 2.4',
            'numpy >= 1.7',
            'omega >= 0.3.1, < 0.4.0',
            'ply >= 3.4, <= 3.10',
            'polytope >= 0.2.1',
            'pydot >= 1.2.0',
            'scipy'],
        tests_require=[
            'nose',
            'matplotlib >= 2.0.0',
            'gr1py >= 0.2.0',
            'mock',
            'setuptools >= 39.0.0'],
        packages=[
            'tulip', 'tulip.transys', 'tulip.transys.export',
            'tulip.abstract', 'tulip.spec',
            'tulip.interfaces'],
        package_dir={'tulip': 'tulip'},
        package_data=package_data)
    # ply failed ?
    if plytable_build_failed:
        print('!' * 65 +
              '    Failed to build PLY table.  ' +
              'Please run setup.py again.' +
              '!' * 65)

def install_cvxopt():
    """Install a version of cvxopt that is compatible with polytope
    requirements"""
    import polytope
    import subprocess
    import sys
    ver = polytope.__version__
    # Download all files for the current version of polytope
    subprocess.check_call([
        sys.executable, "-m",
        "pip", "download",
        "-d", "temp",
        "--no-deps",
        "polytope=={ver}".format(ver=ver)])
    # Extract the tar archive
    subprocess.check_call([
        "tar", "xzf",
        "temp/polytope-{ver}.tar.gz".format(ver=ver),
        "-C", "temp"])
    # Install cvxopt according to requirements file provided by polytope
    subprocess.check_call([
        sys.executable, "-m",
        "pip", "install",
        "-r", "temp/polytope-{ver}/requirements/extras.txt".format(ver=ver)])

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


<commit_before>#!/usr/bin/python

import distutils
from setuptools import setup, Extension

long_desc = """This is a C extension module for Python which
implements extended attributes manipulation. It is a wrapper on top
of the attr C library - see attr(5)."""
version = "0.5.0"
author = "Iustin Pop"
author_email = "iusty@k1024.org"
macros = [
    ("_XATTR_VERSION", '"%s"' % version),
    ("_XATTR_AUTHOR", '"%s"' % author),
    ("_XATTR_EMAIL", '"%s"' % author_email),
    ]
setup(name = "pyxattr",
      version = version,
      description = "Filesystem extended attributes for python",
      long_description = long_desc,
      author = author,
      author_email = author_email,
      url = "http://pyxattr.sourceforge.net/",
      license = "LGPL",
      ext_modules = [Extension("xattr", ["xattr.c"],
                               libraries=["attr"],
                               define_macros=macros)],
      test_suite = "test",
      )
<commit_msg>Bump version number for new release<commit_after>#!/usr/bin/python

import distutils
from setuptools import setup, Extension

long_desc = """This is a C extension module for Python which
implements extended attributes manipulation. It is a wrapper on top
of the attr C library - see attr(5)."""
version = "0.5.1"
author = "Iustin Pop"
author_email = "iusty@k1024.org"
macros = [
    ("_XATTR_VERSION", '"%s"' % version),
    ("_XATTR_AUTHOR", '"%s"' % author),
    ("_XATTR_EMAIL", '"%s"' % author_email),
    ]
setup(name = "pyxattr",
      version = version,
      description = "Filesystem extended attributes for python",
      long_description = long_desc,
      author = author,
      author_email = author_email,
      url = "http://pyxattr.k1024.org/",
      license = "LGPL",
      ext_modules = [Extension("xattr", ["xattr.c"],
                               libraries=["attr"],
                               define_macros=macros)],
      test_suite = "test",
      )
<|endoftext|>


<commit_before>from setuptools import setup, find_packages
from codecs import open
from os import path

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

with open(path.join(here, 'DESCRIPTION.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='mangopaysdk',
    version='3.7.1',
    description='A client library written in python to work with mangopay v2 api',
    long_description='This SDK is a client library for interacting with the Mangopay API.',
    url='https://github.com/Mangopay/mangopay2-python-sdk',
    author='Mangopay (www.mangopay.com)',
    author_email='support@mangopay.com',
    license='MIT',
    classifiers=[
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Build Tools',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
    ],
    keywords='mangopay api development emoney sdk',
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
    install_requires=['requests', 'simplejson', 'blinker', 'six', 'pytz' ],
    extras_require={
        'dev': ['responses', 'nose', 'coverage', 'httplib2',
                'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'],
        'test': ['responses', 'nose', 'coverage', 'httplib2',
                 'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'],
    },
    entry_points={
        'console_scripts': [
            'sample=sample:main',
        ],
    },
)
<commit_msg>Version bump 3.8.0<commit_after>from setuptools import setup, find_packages
from codecs import open
from os import path

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

with open(path.join(here, 'DESCRIPTION.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='mangopaysdk',
    version='3.8.0',
    description='A client library written in python to work with mangopay v2 api',
    long_description='This SDK is a client library for interacting with the Mangopay API.',
    url='https://github.com/Mangopay/mangopay2-python-sdk',
    author='Mangopay (www.mangopay.com)',
    author_email='support@mangopay.com',
    license='MIT',
    classifiers=[
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Build Tools',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
    ],
    keywords='mangopay api development emoney sdk',
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
    install_requires=['requests', 'simplejson', 'blinker', 'six', 'pytz' ],
    extras_require={
        'dev': ['responses', 'nose', 'coverage', 'httplib2',
                'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'],
        'test': ['responses', 'nose', 'coverage', 'httplib2',
                 'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'],
    },
    entry_points={
        'console_scripts': [
            'sample=sample:main',
        ],
    },
)
<|endoftext|>


<commit_before>import os
import re
from distutils.core import Command, setup
from setuptools import find_packages

from dynamic_validation import VERSION

REQUIREMENTS = [
    'django',
    'django-fields',
    'django-autoload',
    'django-dynamic-rules>=0.2.0',
]

TEST_REQUIREMENTS = [
    'mock',
    'django-jenkins',
    'pep8',
    'pyflakes',
    'pylint',
]

def do_setup():
    setup(
        name="django-dynamic-validation",
        version=VERSION,
        author="Matthew J. Morrison & Aaron Madison",
        author_email="mattjmorrison@mattjmorrison.com",
        description="Define user generated validation requirements for django models.",
        long_description=open('README.txt', 'r').read(),
        url="https://github.com/imtapps/django-dynamic-validation",
        packages=find_packages(exclude=['example']),
        install_requires=REQUIREMENTS,
        tests_require=TEST_REQUIREMENTS,
        test_suite='runtests.runtests',
        zip_safe=False,
        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",
            "Topic :: Software Development",
            "Topic :: Software Development :: Libraries :: Application Frameworks",
        ],
        dependency_links = (
            'https://bitbucket.org/twanschik/django-autoload/get/tip.tar.gz#egg=django-autoload',
        ),
        cmdclass={
            'install_dev':InstallDependencies,
        }
    )

class InstallDependencies(Command):
    """
    Command to install both develop dependencies and test dependencies.

    Not sure why we can't find a built in command to do that already
    in an accessible way.
    """

    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def get_test_dependencies(self):
        """
        replace all > or < in the dependencies so the system does not
        try to redirect stdin or stdout from/to a file.
        """
        command_line_deps = ' '.join(TEST_REQUIREMENTS)
        return re.sub(re.compile(r'([<>])'), r'\\\1', command_line_deps)

    def run(self):
        os.system("pip install ./")
        os.system("pip install %s" % self.get_test_dependencies())

if __name__ == '__main__':
    do_setup()<commit_msg>added coverage to test dependencies<commit_after>import os
import re
from distutils.core import Command, setup
from setuptools import find_packages

from dynamic_validation import VERSION

REQUIREMENTS = [
    'django',
    'django-fields',
    'django-autoload',
    'django-dynamic-rules>=0.2.0',
]

TEST_REQUIREMENTS = [
    'mock',
    'django-jenkins',
    'pep8',
    'pyflakes',
    'pylint',
    'coverage',
]

def do_setup():
    setup(
        name="django-dynamic-validation",
        version=VERSION,
        author="Matthew J. Morrison & Aaron Madison",
        author_email="mattjmorrison@mattjmorrison.com",
        description="Define user generated validation requirements for django models.",
        long_description=open('README.txt', 'r').read(),
        url="https://github.com/imtapps/django-dynamic-validation",
        packages=find_packages(exclude=['example']),
        install_requires=REQUIREMENTS,
        tests_require=TEST_REQUIREMENTS,
        test_suite='runtests.runtests',
        zip_safe=False,
        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",
            "Topic :: Software Development",
            "Topic :: Software Development :: Libraries :: Application Frameworks",
        ],
        dependency_links = (
            'https://bitbucket.org/twanschik/django-autoload/get/tip.tar.gz#egg=django-autoload',
        ),
        cmdclass={
            'install_dev':InstallDependencies,
        }
    )

class InstallDependencies(Command):
    """
    Command to install both develop dependencies and test dependencies.

    Not sure why we can't find a built in command to do that already
    in an accessible way.
    """

    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def get_test_dependencies(self):
        """
        replace all > or < in the dependencies so the system does not
        try to redirect stdin or stdout from/to a file.
        """
        command_line_deps = ' '.join(TEST_REQUIREMENTS)
        return re.sub(re.compile(r'([<>])'), r'\\\1', command_line_deps)

    def run(self):
        os.system("pip install ./")
        os.system("pip install %s" % self.get_test_dependencies())

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


<commit_before>from setuptools import setup

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

setup(
    name = 'invokust',
    version = '0.7',
    author = 'Max Williams',
    author_email = 'futuresharks@gmail.com',
    description = 'A small wrapper for locust to allow running load tests from within Python or on AWS Lambda',
    long_description=long_description,
    long_description_content_type="text/markdown",
    url = 'https://github.com/FutureSharks/invokust',
    download_url  =  'https://github.com/FutureSharks/invokust/archive/0.7.tar.gz',
    license = 'MIT',
    scripts = ['invokr.py'],
    packages = [
        'invokust',
        'invokust.aws_lambda',
    ],
    install_requires = [
        'locustio==0.13.5',
        'boto3',
        'pyzmq',
        'numpy'
    ],
    keywords = ['testing', 'loadtest', 'lamba', 'locust'],
    classifiers = [
        'Topic :: Software Development :: Quality Assurance',
        'Topic :: Software Development :: Testing',
        'Topic :: Software Development :: Testing :: Traffic Generation',
        'Programming Language :: Python :: 3.6'
    ],
)
<commit_msg>Fix version number to be higher<commit_after>from setuptools import setup

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

setup(
    name = 'invokust',
    version = '0.71',
    author = 'Max Williams',
    author_email = 'futuresharks@gmail.com',
    description = 'A small wrapper for locust to allow running load tests from within Python or on AWS Lambda',
    long_description=long_description,
    long_description_content_type="text/markdown",
    url = 'https://github.com/FutureSharks/invokust',
    download_url  =  'https://github.com/FutureSharks/invokust/archive/0.71.tar.gz',
    license = 'MIT',
    scripts = ['invokr.py'],
    packages = [
        'invokust',
        'invokust.aws_lambda',
    ],
    install_requires = [
        'locustio==0.13.5',
        'boto3',
        'pyzmq',
        'numpy'
    ],
    keywords = ['testing', 'loadtest', 'lamba', 'locust'],
    classifiers = [
        'Topic :: Software Development :: Quality Assurance',
        'Topic :: Software Development :: Testing',
        'Topic :: Software Development :: Testing :: Traffic Generation',
        'Programming Language :: Python :: 3.6'
    ],
)
<|endoftext|>


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

from distutils.core import setup
from distutils.extension import Extension
from distutils.version import LooseVersion
from Cython.Build import cythonize
import Cython.Compiler.Options
Cython.Compiler.Options.fail_fast = True
from cython import __version__ as cython_version
from pkg_resources import parse_version
from os.path import join as join_path

import numpy
import sys
import os
import json
import re

from subprocess import Popen, PIPE

CYTHON_MODULES = ['microscopes.lda._model',
                  'microscopes.lda.definition',
                  'microscopes.lda.kernels',
                  'microscopes.lda.biology_data']

def get_git_sha1():
    try:
        import git
        required_version = '0.3.7'
        if parse_version(git.__version__) < parse_version(required_version):
            raise ImportError('could not import gitpython>=%s' % required_version)
    except ImportError as e:
        print >>sys.stderr, e
        return None
    repo = git.Repo(os.path.dirname(__file__))
    sha1 = repo.iter_commits().next().hexsha
    return sha1

def find_dependency(soname, incname):
    def test(prefix):
        sofile = join_path(prefix, 'lib/{}'.format(soname))
        incdir = join_path(prefix, 'include/{}'.format(incname))
        if os.path.isfile(sofile) and os.path.isdir(incdir):
            return (join_path(prefix, 'lib'),
                    join_path(prefix, 'include'))
        return None
    if 'VIRTUAL_ENV' in os.environ:
        ret = test(os.environ['VIRTUAL_ENV'])
        if ret is not None:
            return ret[0], ret[1]
    if 'CONDA_BUILD' in os.environ:
        d = os.environ.get('PREFIX', None)
        if d:
            ret = test(d)
            if ret is not None:
                return ret[0], ret[1]
    if 'CONDA_DEFAULT_ENV' in os.environ:
        # shell out to conda to get info
        cmd = ['conda', 'info', '--json']
        s = Popen(cmd, shell=False, stdout=PIPE).stdout.read()
        s = json.loads(s)
        if 'default_prefix' in s:
            ret = test(str(s['default_prefix']))
            if ret is not None:
                return ret[0], ret[1]
    return None, None

def find_cython_dependency(dirname):
    def test(prefix):
        incdir = join_path(prefix, 'cython/{}'.format(dirname))
        if os.path.isdir(incdir):
            return join_path(prefix, 'cython')
        return None
    if 'VIRTUAL_ENV' in os.environ:
        ret = test(os.environ['VIRTUAL_ENV'])
        if ret is not None:
            return ret
    if 'CONDA_BUILD' in os.environ:
        d = os.environ.get('PREFIX', None)
        if d:
            ret = test(d)
            if ret is not None:
                return ret
    if 'CONDA_DEFAULT_ENV' in os.environ:
        # shell out to conda to get info
        cmd = ['conda', 'info', '--json']
        s = Popen(cmd, shell=False, stdout=PIPE).stdout.read()
        s = json.loads(s)
        if 'default_prefix' in s:
            ret = test(str(s['default_prefix']))
            if ret is not None:
                return ret
    return None

def is_debug_build():
    return 'DEBUG' in os.environ

def is_clang():
    return sys.platform.lower().startswith('darwin')

def load_dependencies(basedir):
    so_ext = 'dylib' if is_clang() else 'so'

    min_cython_version = '0.20.2' if is_clang() else '0.20.1'
    if LooseVersion(cython_version) < LooseVersion(min_cython_version):
        raise ValueError(
            'cython support requires cython>={}'.format(min_cython_version))

    cc = os.environ.get('CC', None)
    cxx = os.environ.get('CXX', None)
    distributions_lib, distributions_inc = find_dependency(
        'libdistributions_shared.{}'.format(so_ext), 'distributions')
    microscopes_common_lib, microscopes_common_inc = find_dependency(
        'libmicroscopes_common.{}'.format(so_ext), 'microscopes')
    microscopes_common_cython_inc = find_cython_dependency('microscopes')
    microscopes_lda_lib, microscopes_lda_inc = find_dependency(
        'libmicroscopes_lda.{}'.format(so_ext), 'microscopes')

    if 'OFFICIAL_BUILD' not in os.environ:
        sha1 = get_git_sha1()
        if sha1 is None:
            sha1 = 'unknown'
        print 'writing git hash:', sha1
        githashfile = join_path(basedir, 'githash.txt')
        with open(githashfile, 'w') as fp:
            print >>fp, sha1
    elif is_debug_build():
        raise RuntimeError("OFFICIAL_BUILD and DEBUG both set")

    if distributions_inc is not None:
        print 'Using distributions_inc:', distributions_inc
    if distributions_lib is not None:
        print 'Using distributions_lib:', distributions_lib
    if microscopes_common_inc is not None:
        print 'Using microscopes_common_inc:', microscopes_common_inc
    if microscopes_common_cython_inc is not None:
        print 'Using microscopes_common_cython_inc:', microscopes_common_cython_inc
    if microscopes_common_lib is not None:
        print 'Using microscopes_common_lib:', microscopes_common_lib
    if microscopes_lda_inc is not None:
        print 'Using microscopes_lda_inc:', microscopes_lda_inc
    if microscopes_lda_lib is not None:
        print 'Using microscopes_lda_lib:', microscopes_lda_lib
    if cc is not None:
        print 'Using CC={}'.format(cc)
    if cxx is not None:
        print 'Using CXX={}'.format(cxx)
    if is_debug_build():
        print 'Debug build'

    include_dirs = [numpy.get_include()]
    if 'EXTRA_INCLUDE_PATH' in os.environ:
        include_dirs.append(os.environ['EXTRA_INCLUDE_PATH'])
    if distributions_inc is not None:
        include_dirs.append(distributions_inc)
    if microscopes_common_inc is not None:
        include_dirs.append(microscopes_common_inc)
    if microscopes_lda_inc is not None:
        include_dirs.append(microscopes_lda_inc)

    library_dirs = []
    if distributions_lib is not None:
        library_dirs.append(distributions_lib)
    if microscopes_common_lib is not None:
        library_dirs.append(microscopes_common_lib)
    if microscopes_lda_lib is not None:
        library_dirs.append(microscopes_lda_lib)

    include_paths = {"microscopes_common_cython_inc": microscopes_common_cython_inc,
                     }
    return include_dirs, library_dirs, include_paths

basedir = join_path(os.path.dirname(__file__), 'microscopes', 'lda')
include_dirs, library_dirs, include_paths = load_dependencies(basedir)

extra_compile_args = [
    '-std=c++0x',
    '-Wno-unused-function',
]
# taken from distributions
math_opt_flags = [
    '-mfpmath=sse',
    '-msse4.1',
]
if not is_debug_build():
    extra_compile_args.extend(math_opt_flags)
if is_clang():
    extra_compile_args.extend([
        '-mmacosx-version-min=10.7',  # for anaconda
        '-stdlib=libc++',
        '-Wno-deprecated-register',
    ])
if is_debug_build():
    extra_compile_args.append('-DDEBUG_MODE')

extra_link_args = []
if 'EXTRA_LINK_ARGS' in os.environ:
    extra_link_args.append(os.environ['EXTRA_LINK_ARGS'])

def make_extension(module_name):
    sources = [module_name.replace('.', '/') + '.pyx']
    return Extension(
        module_name,
        sources=sources,
        language="c++",
        include_dirs=include_dirs,
        libraries=["microscopes_common", "microscopes_lda",
                   "protobuf", "distributions_shared"],
        library_dirs=library_dirs,
        extra_compile_args=extra_compile_args,
        extra_link_args=extra_link_args)

extensions = cythonize([make_extension(module) for module in CYTHON_MODULES],
                       include_path=[include_paths['microscopes_common_cython_inc']])

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

version = None
with open(join_path(basedir, '__init__.py')) as fp:
    for line in fp:
        if re.match("_version_base\s+=\s+'\S+'$", line):
            version = line.split()[-1].strip("'")
if not version:
    raise RuntimeError("could not determine version")

setup(version=version,
      name='microscopes-lda',
      description='Non-parametric bayesian inference',
      long_description=long_description,
      url='https://github.com/datamicroscopes/lda',
      author='Stephen Tu, Eric Jonas',
      maintainer='Stephen Tu',
      maintainer_email='tu.stephenl@gmail.com',
      packages=(
          'microscopes.lda',
      ),
      ext_modules=extensions)
<commit_msg>Add build_extra_compile_args and build_extra_link_args functions<commit_after>#!/usr/bin/env python

from distutils.core import setup
from distutils.extension import Extension
from distutils.version import LooseVersion
from Cython.Build import cythonize
import Cython.Compiler.Options
Cython.Compiler.Options.fail_fast = True
from cython import __version__ as cython_version
from pkg_resources import parse_version
from os.path import join as join_path

import numpy
import sys
import os
import json
import re

from subprocess import Popen, PIPE

CYTHON_MODULES = ['microscopes.lda._model',
                  'microscopes.lda.definition',
                  'microscopes.lda.kernels',
                  'microscopes.lda.biology_data']

def get_git_sha1():
    try:
        import git
        required_version = '0.3.7'
        if parse_version(git.__version__) < parse_version(required_version):
            raise ImportError('could not import gitpython>=%s' % required_version)
    except ImportError as e:
        print >>sys.stderr, e
        return None
    repo = git.Repo(os.path.dirname(__file__))
    sha1 = repo.iter_commits().next().hexsha
    return sha1

def find_dependency(soname, incname):
    def test(prefix):
        sofile = join_path(prefix, 'lib/{}'.format(soname))
        incdir = join_path(prefix, 'include/{}'.format(incname))
        if os.path.isfile(sofile) and os.path.isdir(incdir):
            return (join_path(prefix, 'lib'),
                    join_path(prefix, 'include'))
        return None
    if 'VIRTUAL_ENV' in os.environ:
        ret = test(os.environ['VIRTUAL_ENV'])
        if ret is not None:
            return ret[0], ret[1]
    if 'CONDA_BUILD' in os.environ:
        d = os.environ.get('PREFIX', None)
        if d:
            ret = test(d)
            if ret is not None:
                return ret[0], ret[1]
    if 'CONDA_DEFAULT_ENV' in os.environ:
        # shell out to conda to get info
        cmd = ['conda', 'info', '--json']
        s = Popen(cmd, shell=False, stdout=PIPE).stdout.read()
        s = json.loads(s)
        if 'default_prefix' in s:
            ret = test(str(s['default_prefix']))
            if ret is not None:
                return ret[0], ret[1]
    return None, None

def find_cython_dependency(dirname):
    def test(prefix):
        incdir = join_path(prefix, 'cython/{}'.format(dirname))
        if os.path.isdir(incdir):
            return join_path(prefix, 'cython')
        return None
    if 'VIRTUAL_ENV' in os.environ:
        ret = test(os.environ['VIRTUAL_ENV'])
        if ret is not None:
            return ret
    if 'CONDA_BUILD' in os.environ:
        d = os.environ.get('PREFIX', None)
        if d:
            ret = test(d)
            if ret is not None:
                return ret
    if 'CONDA_DEFAULT_ENV' in os.environ:
        # shell out to conda to get info
        cmd = ['conda', 'info', '--json']
        s = Popen(cmd, shell=False, stdout=PIPE).stdout.read()
        s = json.loads(s)
        if 'default_prefix' in s:
            ret = test(str(s['default_prefix']))
            if ret is not None:
                return ret
    return None

def is_debug_build():
    return 'DEBUG' in os.environ

def is_clang():
    return sys.platform.lower().startswith('darwin')

def load_dependencies(basedir):
    so_ext = 'dylib' if is_clang() else 'so'

    min_cython_version = '0.20.2' if is_clang() else '0.20.1'
    if LooseVersion(cython_version) < LooseVersion(min_cython_version):
        raise ValueError(
            'cython support requires cython>={}'.format(min_cython_version))

    cc = os.environ.get('CC', None)
    cxx = os.environ.get('CXX', None)
    distributions_lib, distributions_inc = find_dependency(
        'libdistributions_shared.{}'.format(so_ext), 'distributions')
    microscopes_common_lib, microscopes_common_inc = find_dependency(
        'libmicroscopes_common.{}'.format(so_ext), 'microscopes')
    microscopes_common_cython_inc = find_cython_dependency('microscopes')
    microscopes_lda_lib, microscopes_lda_inc = find_dependency(
        'libmicroscopes_lda.{}'.format(so_ext), 'microscopes')

    if 'OFFICIAL_BUILD' not in os.environ:
        sha1 = get_git_sha1()
        if sha1 is None:
            sha1 = 'unknown'
        print 'writing git hash:', sha1
        githashfile = join_path(basedir, 'githash.txt')
        with open(githashfile, 'w') as fp:
            print >>fp, sha1
    elif is_debug_build():
        raise RuntimeError("OFFICIAL_BUILD and DEBUG both set")

    if distributions_inc is not None:
        print 'Using distributions_inc:', distributions_inc
    if distributions_lib is not None:
        print 'Using distributions_lib:', distributions_lib
    if microscopes_common_inc is not None:
        print 'Using microscopes_common_inc:', microscopes_common_inc
    if microscopes_common_cython_inc is not None:
        print 'Using microscopes_common_cython_inc:', microscopes_common_cython_inc
    if microscopes_common_lib is not None:
        print 'Using microscopes_common_lib:', microscopes_common_lib
    if microscopes_lda_inc is not None:
        print 'Using microscopes_lda_inc:', microscopes_lda_inc
    if microscopes_lda_lib is not None:
        print 'Using microscopes_lda_lib:', microscopes_lda_lib
    if cc is not None:
        print 'Using CC={}'.format(cc)
    if cxx is not None:
        print 'Using CXX={}'.format(cxx)
    if is_debug_build():
        print 'Debug build'

    include_dirs = [numpy.get_include()]
    if 'EXTRA_INCLUDE_PATH' in os.environ:
        include_dirs.append(os.environ['EXTRA_INCLUDE_PATH'])
    if distributions_inc is not None:
        include_dirs.append(distributions_inc)
    if microscopes_common_inc is not None:
        include_dirs.append(microscopes_common_inc)
    if microscopes_lda_inc is not None:
        include_dirs.append(microscopes_lda_inc)

    library_dirs = []
    if distributions_lib is not None:
        library_dirs.append(distributions_lib)
    if microscopes_common_lib is not None:
        library_dirs.append(microscopes_common_lib)
    if microscopes_lda_lib is not None:
        library_dirs.append(microscopes_lda_lib)

    include_paths = {"microscopes_common_cython_inc": microscopes_common_cython_inc,
                     }
    return include_dirs, library_dirs, include_paths

def build_extra_compile_args():
    extra_compile_args = [
        '-std=c++0x',
        '-Wno-unused-function',
    ]
    # taken from distributions
    math_opt_flags = [
        '-mfpmath=sse',
        '-msse4.1',
    ]
    if not is_debug_build():
        extra_compile_args.extend(math_opt_flags)
    if is_clang():
        extra_compile_args.extend([
            '-mmacosx-version-min=10.7',  # for anaconda
            '-stdlib=libc++',
            '-Wno-deprecated-register',
        ])
    if is_debug_build():
        extra_compile_args.append('-DDEBUG_MODE')

    return extra_compile_args

def build_extra_link_args():
    extra_link_args = []
    if 'EXTRA_LINK_ARGS' in os.environ:
        extra_link_args.append(os.environ['EXTRA_LINK_ARGS'])
    return extra_link_args

basedir = join_path(os.path.dirname(__file__), 'microscopes', 'lda')
include_dirs, library_dirs, include_paths = load_dependencies(basedir)
extra_compile_args = build_extra_compile_args()
extra_link_args = build_extra_link_args()

def make_extension(module_name):
    sources = [module_name.replace('.', '/') + '.pyx']
    return Extension(
        module_name,
        sources=sources,
        language="c++",
        include_dirs=include_dirs,
        libraries=["microscopes_common", "microscopes_lda",
                   "protobuf", "distributions_shared"],
        library_dirs=library_dirs,
        extra_compile_args=extra_compile_args,
        extra_link_args=extra_link_args)

extensions = cythonize([make_extension(module) for module in CYTHON_MODULES],
                       include_path=[include_paths['microscopes_common_cython_inc']])

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

version = None
with open(join_path(basedir, '__init__.py')) as fp:
    for line in fp:
        if re.match("_version_base\s+=\s+'\S+'$", line):
            version = line.split()[-1].strip("'")
if not version:
    raise RuntimeError("could not determine version")

setup(version=version,
      name='microscopes-lda',
      description='Non-parametric bayesian inference',
      long_description=long_description,
      url='https://github.com/datamicroscopes/lda',
      author='Stephen Tu, Eric Jonas',
      maintainer='Stephen Tu',
      maintainer_email='tu.stephenl@gmail.com',
      packages=(
          'microscopes.lda',
      ),
      ext_modules=extensions)
<|endoftext|>


<commit_before>import sys
import os

NAME="opentumblr-client"
VERSION = "0.0.5"
DESCRIPTION = "Cliente de escritorio para tumblr"
AUTHOR = "Jair Gaxiola"
AUTHOR_EMAIL = "jyr.gaxiola@gmail.com"
URL = "http://opentumblr.tumblr.com"
LICENSE = "MIT LICENSE"

packages_path = os.path.abspath(os.path.dirname(__file__))
print packages_path
poster = packages_path + '/poster'
simplejson = packages_path + '/simplejson'
opentumblr = packages_path + '/opentumblr'
opentumblr_client = opentumblr + '/opentumblr-client.py'
tumblr = packages_path + '/tumblr.py'

image_files = []

if sys.platform == "darwin":
	"""
	This is a setup.py script generated by py2applet

	Usage:
	    python setup.py py2app --iconfile images/opentumblr.icns
	"""

	from setuptools import setup

	APP = [opentumblr_client]
	path_images = packages_path + '/images/'
	images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png']
	for img in images:
		image_files.append(path_images + img)

	DATA_FILES = [('images',image_files)]
	OPTIONS = {'argv_emulation': True}

	setup(
		name=NAME,
		version=VERSION,
		description=DESCRIPTION,
	   	author=AUTHOR,
     	author_email=AUTHOR_EMAIL,
      	url=URL,
      	license=LICENSE,
    	app=APP,
		packages=[poster, simplejson],
	    data_files=DATA_FILES,
	    options={'py2app': OPTIONS},
	    setup_requires=['py2app'],
	)

else:
	if sys.platform == "win32":
		"""
			Usage:
				python setup.py py2exe
		"""

		from distutils.core import setup
		import py2exe

		opentumblr_client = opentumblr + '\\opentumblr-client.py'

		path_images = packages_path + '\\images\\'
		images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png','audiomac.png','chatmac.png','linkmac.png','photomac.png','quotemac.png','textmac.png','videomac.png','opentumblr.png']
		for img in images:
			image_files.append(path_images + img)

		setup(
			windows=[opentumblr_client],
			data_files=[('images',image_files)],
			options={'py2exe':{'skip_archive':1,'packages':'opentumblr,poster,simplejson'}}
		)
	else:
		from distutils.core import setup

		datafiles = []
		doc_files = []
		icon_files = []

		prefix = sys.prefix + '/'

		for arg in sys.argv:
			if arg.startswith('--prefix='):
				prefix = arg[9:]
				prefix = os.path.expandvars(prefix)

		ipath_docs = '%sshare/doc/opentumblr/' % prefix
		ipath_images = '%sshare/pixmaps/opentumblr/' % prefix
		ipath_dashboard = ipath_images+'dashboard/'

		path_images = packages_path + '/images/'

		images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png','opentumblr.png']
		for img in images:
			image_files.append(path_images + img)

		docs = ['AUTHORS','INSTALL','LICENSE','README','THANKS']
		for doc in docs:
			doc_files.append(packages_path + '/' + doc)

		if not os.path.isdir(ipath_docs):
			if not os.path.isdir(prefix + 'share'):
				os.mkdir(prefix + 'share')
				os.mkdir(prefix + 'share/doc')
			os.mkdir(ipath_docs)

		if not os.path.isdir(ipath_images):
			if not os.path.isdir(prefix + 'share/pixmaps'):
				os.mkdir(prefix + 'share/pixmaps')
			os.mkdir(ipath_images)
			os.mkdir(ipath_dashboard)

		datafiles.append((ipath_docs, doc_files))
		datafiles.append(('share/applications',[packages_path+'/opentumblr.desktop']))
		datafiles.append((ipath_dashboard, image_files))

		setup(
			name=NAME,
			version=VERSION,
	      	description=DESCRIPTION,
	      	author=AUTHOR,
	      	author_email=AUTHOR_EMAIL,
	      	url=URL,
	      	license=LICENSE,
	      	scripts=[opentumblr_client],
	      	packages=['opentumblr'],
		    package_dir= {'opentumblr': opentumblr},
            data_files= datafiles
		)
<commit_msg>Update setup at linux<commit_after>import sys
import os

NAME="opentumblr-client"
VERSION = "0.0.5"
DESCRIPTION = "Cliente de escritorio para tumblr"
AUTHOR = "Jair Gaxiola"
AUTHOR_EMAIL = "jyr.gaxiola@gmail.com"
URL = "http://opentumblr.tumblr.com"
LICENSE = "MIT LICENSE"

packages_path = os.path.abspath(os.path.dirname(__file__))
print packages_path
poster = packages_path + '/poster'
simplejson = packages_path + '/simplejson'
opentumblr = packages_path + '/opentumblr'
opentumblr_client = opentumblr + '/opentumblr-client.py'
tumblr = packages_path + '/tumblr.py'

image_files = []

if sys.platform == "darwin":
	"""
	This is a setup.py script generated by py2applet

	Usage:
	    python setup.py py2app --iconfile images/opentumblr.icns
	"""

	from setuptools import setup

	APP = [opentumblr_client]
	path_images = packages_path + '/images/'
	images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png']
	for img in images:
		image_files.append(path_images + img)

	DATA_FILES = [('images',image_files)]
	OPTIONS = {'argv_emulation': True}

	setup(
		name=NAME,
		version=VERSION,
		description=DESCRIPTION,
	   	author=AUTHOR,
     	author_email=AUTHOR_EMAIL,
      	url=URL,
      	license=LICENSE,
    	app=APP,
		packages=[poster, simplejson],
	    data_files=DATA_FILES,
	    options={'py2app': OPTIONS},
	    setup_requires=['py2app'],
	)

else:
	if sys.platform == "win32":
		"""
			Usage:
				python setup.py py2exe
		"""

		from distutils.core import setup
		import py2exe

		opentumblr_client = opentumblr + '\\opentumblr-client.py'

		path_images = packages_path + '\\images\\'
		images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png','audiomac.png','chatmac.png','linkmac.png','photomac.png','quotemac.png','textmac.png','videomac.png','opentumblr.png']
		for img in images:
			image_files.append(path_images + img)

		setup(
			windows=[opentumblr_client],
			data_files=[('images',image_files)],
			options={'py2exe':{'skip_archive':1,'packages':'opentumblr,poster,simplejson'}}
		)
	else:
		from distutils.core import setup

		datafiles = []
		doc_files = []
		icon_files = []

		prefix = sys.prefix + '/'

		for arg in sys.argv:
			if arg.startswith('--prefix='):
				prefix = arg[9:]
				prefix = os.path.expandvars(prefix)

		ipath_docs = '%sshare/doc/opentumblr/' % prefix
		ipath_images = '%sshare/pixmaps/opentumblr/' % prefix
		ipath_dashboard = ipath_images+'dashboard/'

		path_images = packages_path + '/images/'

		images = ['audio.png','chat.png','link.png','photo.png','quote.png','text.png','video.png','audiomac.png','chatmac.png','linkmac.png','photomac.png','quotemac.png','textmac.png','videomac.png','opentumblr.png']
		for img in images:
			image_files.append(path_images + img)

		docs = ['AUTHORS','INSTALL','LICENSE','README','THANKS']
		for doc in docs:
			doc_files.append(packages_path + '/' + doc)

		if not os.path.isdir(ipath_docs):
			if not os.path.isdir(prefix + 'share'):
				os.mkdir(prefix + 'share')
				os.mkdir(prefix + 'share/doc')
			os.mkdir(ipath_docs)

		if not os.path.isdir(ipath_images):
			if not os.path.isdir(prefix + 'share/pixmaps'):
				os.mkdir(prefix + 'share/pixmaps')
			os.mkdir(ipath_images)
			os.mkdir(ipath_dashboard)

		datafiles.append((ipath_docs, doc_files))
		datafiles.append(('share/applications',[packages_path+'/opentumblr.desktop']))
		datafiles.append((ipath_dashboard, image_files))

		setup(
			name=NAME,
			version=VERSION,
	      	description=DESCRIPTION,
	      	author=AUTHOR,
	      	author_email=AUTHOR_EMAIL,
	      	url=URL,
	      	license=LICENSE,
	      	scripts=[opentumblr_client],
	      	packages=['opentumblr'],
		    package_dir= {'opentumblr': opentumblr},
            data_files= datafiles
		)
<|endoftext|>


<commit_before>import os
from setuptools import setup

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

setup(
    name='hops',
    version='1.3.4',
    author='Robin Andersson',
    author_email='robin.eric.andersson@gmail.com',
    description='A helper library for Hops that facilitates development by hiding the complexity of discovering services and setting up security.',
    license='Apache License 2.0',
    keywords='HOPS, Hadoop, TensorFlow, Spark',
    url='https://github.com/hopshadoop/hops-util-py',
    download_url = 'https://github.com/hopshadoop/hops-util-py/archive/1.3.4.tar.gz',
    packages=['hops'],
    long_description=read('README.rst'),
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Topic :: Utilities',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
    ],
    install_requires=[]
)
<commit_msg>bump version<commit_after>import os
from setuptools import setup

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

setup(
    name='hops',
    version='1.3.5',
    author='Robin Andersson',
    author_email='robin.eric.andersson@gmail.com',
    description='A helper library for Hops that facilitates development by hiding the complexity of discovering services and setting up security.',
    license='Apache License 2.0',
    keywords='HOPS, Hadoop, TensorFlow, Spark',
    url='https://github.com/hopshadoop/hops-util-py',
    download_url = 'https://github.com/hopshadoop/hops-util-py/archive/1.3.5.tar.gz',
    packages=['hops'],
    long_description=read('README.rst'),
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Topic :: Utilities',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
    ],
    install_requires=[]
)
<|endoftext|>


<commit_before>import sys, time, os, shutil, pprint, subprocess
from distutils.core import setup
from distutils.dir_util import copy_tree

PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(PATH, "source"))
from version import VERSION

#constants
DEFAULT_DISTRIBUTION_FOLDER = os.path.join(PATH, 'dist')
COMBINED_DISTRIBUTION_FOLDER = os.path.join(DEFAULT_DISTRIBUTION_FOLDER, 'screenlock')
NEW_DISTRIBUTION_FOLDER = COMBINED_DISTRIBUTION_FOLDER
BUILD_FOLDER = os.path.join(PATH, 'build')
SOURCE_FOLDER = os.path.join(PATH, 'source')
STATIC_FOLDER = os.path.join(SOURCE_FOLDER, 'static')
TEMPLATE_FOLDER = os.path.join(SOURCE_FOLDER, 'templates')
TAGS_BASE_FOLDER = os.path.join(PATH, 'Tags')
TAGGED_FOLDER = os.path.join(TAGS_BASE_FOLDER, VERSION)

def main():
    delete_old_build()
    create_exe()
    merge_files()
    copy_static_files_tagged_folder()
    copy_support_files_to_dist_folder()
    create_tagged_folder()
    move_assets_to_tagged_folder()
    print_message()
    try_running_nsis()
    clean_up()

def delete_old_build():
    if os.path.isdir(DEFAULT_DISTRIBUTION_FOLDER):
        shutil.rmtree(DEFAULT_DISTRIBUTION_FOLDER)
    if os.path.isdir(NEW_DISTRIBUTION_FOLDER):
        shutil.rmtree(NEW_DISTRIBUTION_FOLDER)
    if os.path.isdir(BUILD_FOLDER):
        shutil.rmtree(BUILD_FOLDER)

def copy_support_files_to_dist_folder():
    copy_config_and_text_files_to_dist_folder()
    write_version_to_text_file()
    copy_nsis_file_to_dist_folder()
    dynamically_add_file_list_to_nsis()

def create_tagged_folder():
    if os.path.isdir(TAGGED_FOLDER):
        shutil.rmtree(TAGGED_FOLDER)
    os.makedirs(TAGGED_FOLDER)

def move_assets_to_tagged_folder():
    shutil.move(NEW_DISTRIBUTION_FOLDER, TAGGED_FOLDER)

def copy_static_files_tagged_folder():
    destination = os.path.join(NEW_DISTRIBUTION_FOLDER, "static")
    shutil.copytree(STATIC_FOLDER, destination)
    destination = os.path.join(NEW_DISTRIBUTION_FOLDER, "templates")
    shutil.copytree(TEMPLATE_FOLDER, destination)

def print_message():
    make_nsis_command_example = '"c:\\Program Files\\NSIS\\makensis.exe" %s' % (os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'install.nsi'))

    message = """
    Finished building EXE files for Nanofab Screenlock.  The files
    are located in the Tag folder (%s).
    You may want to package
    them all up into an installer.  To do so, run the make NSI
    application using the build file located in the Tagged folder's
    subdirectory "installer"

    For example, you might run:
    %s
    """
    print(message % (TAGGED_FOLDER, make_nsis_command_example))

def try_running_nsis():
    try:
        print( "Trying to automatically run nsis make for you\n")
        nsis_location = "c:\\Program Files\\NSIS\\makensis.exe"
        if os.path.isfile("c:\\Program Files (x86)\\NSIS\\makensis.exe"):
            nsis_location = "c:\\Program Files (x86)\\NSIS\\makensis.exe"
        make_nsis_command = [nsis_location, os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'install.nsi')]
        subprocess.call(make_nsis_command)
        print( "Successfully Ran NSIS.\n Check the folder %s for installer exe file" % (os.path.join(TAGS_BASE_FOLDER)))
    except:
        print( "Failed to automatically run nsis\n")

def clean_up():
    shutil.rmtree(BUILD_FOLDER)
    clean_up_temporary_assets_if_nsis_succeeded()

def copy_config_and_text_files_to_dist_folder():
    files = [os.path.join(SOURCE_FOLDER, 'config.ini'),
            os.path.join(SOURCE_FOLDER, 'key.pem'),
            os.path.join(SOURCE_FOLDER, 'cert.pem'),
            os.path.join(SOURCE_FOLDER, 'license.txt'),
            os.path.join(SOURCE_FOLDER, 'post-install.txt'),
            os.path.join(SOURCE_FOLDER, 'startup.bat'),
            os.path.join(SOURCE_FOLDER, 'startup.vbs'),
            os.path.join(SOURCE_FOLDER, 'startupNCD.bat'),
            os.path.join(SOURCE_FOLDER, 'startupNCD.vbs'),
            os.path.join(PATH, 'README.md')]

    for f in files:
        shutil.copy (f,NEW_DISTRIBUTION_FOLDER)

def write_version_to_text_file():
    version_filename = os.path.join(NEW_DISTRIBUTION_FOLDER, 'releaseVersion.txt')
    with open(version_filename, "w") as text_file:
        text_file.write( VERSION )

def copy_nsis_file_to_dist_folder():
    nsis_file = os.path.join(SOURCE_FOLDER, 'installer', 'install.nsi')
    new_installer_folder = os.path.join(NEW_DISTRIBUTION_FOLDER, 'installer')
    os.makedirs(new_installer_folder)
    print("copying %s to %s" %  (nsis_file,new_installer_folder))
    shutil.copy (nsis_file,new_installer_folder)

def clean_up_temporary_assets_if_nsis_succeeded():
    nsis_setup_file = os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'ScreenLock-' + VERSION + '-Setup.exe')
    if os.path.isfile(nsis_setup_file):
        shutil.copy(nsis_setup_file, TAGS_BASE_FOLDER )
        #shutil.rmtree(TAGGED_FOLDER)

def dynamically_add_file_list_to_nsis():
    nsis_file = os.path.join(NEW_DISTRIBUTION_FOLDER, 'installer', 'install.nsi')
    buff = create_nsis_file_instructions()
    file = open(nsis_file)
    contents = file.read()
    file.close()
    new_contents = contents.replace(';DYNAMIC_ADD_OF_PY2EXE_FILES', ";DYNAMIC_ADD_OF_PY2EXE_FILES\n" + buff)
    file = open(nsis_file, 'w')
    file.write(new_contents)
    file.close()

def create_nsis_file_instructions():
    path = NEW_DISTRIBUTION_FOLDER

    buff = ''
    toplevel = next(os.walk(path))[0]
    toplevel_subdirs = next(os.walk(path))[1]
    toplevel_files = next(os.walk(path))[2]
    pprint.pprint(toplevel_subdirs)

    for f in toplevel_files:
        # buff += "; in root: %s\n" % root
        buff += 'File "..\\%s"' % f
        buff += "\n"

    for f in toplevel_subdirs:
        buff += 'File /r "..\\%s"' % f
        buff += "\n"

    return buff.replace(toplevel + "\\", "")

def touch(filename):
    if not os.path.exists(filename):
        print("Creating file")
        open(filename, 'w').close()
    else:
        print("file exists, skipping")

def source_files():
    return [
        'setAdminPassword',
        'postinstall',
        'commandClient',
        'ncdClient',
        'screenlockServerNCD',
        'screenlockServer',
        'screenlockServerNCD',
        'screenlockApp']

def create_exe():
    os.system('pyinstaller  --windowed --uac-admin source/setAdminPassword.py')
    os.system('pyinstaller  --windowed --uac-admin source/postinstall.py')
    os.system('pyinstaller  --console source/commandClient.py')
    os.system('pyinstaller  --console source/ncdClient.py')
    os.system('pyinstaller  --console -n screenlockServerNCD_console source/screenlockServerNCD.py')
    os.system('pyinstaller  --windowed source/screenlockServer.py')
    os.system('pyinstaller  --windowed source/screenlockServerNCD.py')
    os.system('pyinstaller  --windowed source/screenlockApp.py')

def merge_files():
    if not os.path.isdir(COMBINED_DISTRIBUTION_FOLDER):
        os.mkdir(COMBINED_DISTRIBUTION_FOLDER)

    for i in source_files():
        copy_tree("dist/%s" % i, COMBINED_DISTRIBUTION_FOLDER)

main()
<commit_msg>use absolute path of pyinstaller<commit_after>import sys, time, os, shutil, pprint, subprocess
from distutils.core import setup
from distutils.dir_util import copy_tree

PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(PATH, "source"))
from version import VERSION

#constants
DEFAULT_DISTRIBUTION_FOLDER = os.path.join(PATH, 'dist')
COMBINED_DISTRIBUTION_FOLDER = os.path.join(DEFAULT_DISTRIBUTION_FOLDER, 'screenlock')
NEW_DISTRIBUTION_FOLDER = COMBINED_DISTRIBUTION_FOLDER
BUILD_FOLDER = os.path.join(PATH, 'build')
SOURCE_FOLDER = os.path.join(PATH, 'source')
STATIC_FOLDER = os.path.join(SOURCE_FOLDER, 'static')
TEMPLATE_FOLDER = os.path.join(SOURCE_FOLDER, 'templates')
TAGS_BASE_FOLDER = os.path.join(PATH, 'Tags')
TAGGED_FOLDER = os.path.join(TAGS_BASE_FOLDER, VERSION)

def main():
    delete_old_build()
    create_exe()
    merge_files()
    copy_static_files_tagged_folder()
    copy_support_files_to_dist_folder()
    create_tagged_folder()
    move_assets_to_tagged_folder()
    print_message()
    try_running_nsis()
    clean_up()

def delete_old_build():
    if os.path.isdir(DEFAULT_DISTRIBUTION_FOLDER):
        shutil.rmtree(DEFAULT_DISTRIBUTION_FOLDER)
    if os.path.isdir(NEW_DISTRIBUTION_FOLDER):
        shutil.rmtree(NEW_DISTRIBUTION_FOLDER)
    if os.path.isdir(BUILD_FOLDER):
        shutil.rmtree(BUILD_FOLDER)

def copy_support_files_to_dist_folder():
    copy_config_and_text_files_to_dist_folder()
    write_version_to_text_file()
    copy_nsis_file_to_dist_folder()
    dynamically_add_file_list_to_nsis()

def create_tagged_folder():
    if os.path.isdir(TAGGED_FOLDER):
        shutil.rmtree(TAGGED_FOLDER)
    os.makedirs(TAGGED_FOLDER)

def move_assets_to_tagged_folder():
    shutil.move(NEW_DISTRIBUTION_FOLDER, TAGGED_FOLDER)

def copy_static_files_tagged_folder():
    destination = os.path.join(NEW_DISTRIBUTION_FOLDER, "static")
    shutil.copytree(STATIC_FOLDER, destination)
    destination = os.path.join(NEW_DISTRIBUTION_FOLDER, "templates")
    shutil.copytree(TEMPLATE_FOLDER, destination)

def print_message():
    make_nsis_command_example = '"c:\\Program Files\\NSIS\\makensis.exe" %s' % (os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'install.nsi'))

    message = """
    Finished building EXE files for Nanofab Screenlock.  The files
    are located in the Tag folder (%s).
    You may want to package
    them all up into an installer.  To do so, run the make NSI
    application using the build file located in the Tagged folder's
    subdirectory "installer"

    For example, you might run:
    %s
    """
    print(message % (TAGGED_FOLDER, make_nsis_command_example))

def try_running_nsis():
    try:
        print( "Trying to automatically run nsis make for you\n")
        nsis_location = "c:\\Program Files\\NSIS\\makensis.exe"
        if os.path.isfile("c:\\Program Files (x86)\\NSIS\\makensis.exe"):
            nsis_location = "c:\\Program Files (x86)\\NSIS\\makensis.exe"
        make_nsis_command = [nsis_location, os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'install.nsi')]
        subprocess.call(make_nsis_command)
        print( "Successfully Ran NSIS.\n Check the folder %s for installer exe file" % (os.path.join(TAGS_BASE_FOLDER)))
    except:
        print( "Failed to automatically run nsis\n")

def clean_up():
    shutil.rmtree(BUILD_FOLDER)
    clean_up_temporary_assets_if_nsis_succeeded()

def copy_config_and_text_files_to_dist_folder():
    files = [os.path.join(SOURCE_FOLDER, 'config.ini'),
            os.path.join(SOURCE_FOLDER, 'key.pem'),
            os.path.join(SOURCE_FOLDER, 'cert.pem'),
            os.path.join(SOURCE_FOLDER, 'license.txt'),
            os.path.join(SOURCE_FOLDER, 'post-install.txt'),
            os.path.join(SOURCE_FOLDER, 'startup.bat'),
            os.path.join(SOURCE_FOLDER, 'startup.vbs'),
            os.path.join(SOURCE_FOLDER, 'startupNCD.bat'),
            os.path.join(SOURCE_FOLDER, 'startupNCD.vbs'),
            os.path.join(PATH, 'README.md')]

    for f in files:
        shutil.copy (f,NEW_DISTRIBUTION_FOLDER)

def write_version_to_text_file():
    version_filename = os.path.join(NEW_DISTRIBUTION_FOLDER, 'releaseVersion.txt')
    with open(version_filename, "w") as text_file:
        text_file.write( VERSION )

def copy_nsis_file_to_dist_folder():
    nsis_file = os.path.join(SOURCE_FOLDER, 'installer', 'install.nsi')
    new_installer_folder = os.path.join(NEW_DISTRIBUTION_FOLDER, 'installer')
    os.makedirs(new_installer_folder)
    print("copying %s to %s" %  (nsis_file,new_installer_folder))
    shutil.copy (nsis_file,new_installer_folder)

def clean_up_temporary_assets_if_nsis_succeeded():
    nsis_setup_file = os.path.join(TAGGED_FOLDER, 'screenlock','installer', 'ScreenLock-' + VERSION + '-Setup.exe')
    if os.path.isfile(nsis_setup_file):
        shutil.copy(nsis_setup_file, TAGS_BASE_FOLDER )
        #shutil.rmtree(TAGGED_FOLDER)

def dynamically_add_file_list_to_nsis():
    nsis_file = os.path.join(NEW_DISTRIBUTION_FOLDER, 'installer', 'install.nsi')
    buff = create_nsis_file_instructions()
    file = open(nsis_file)
    contents = file.read()
    file.close()
    new_contents = contents.replace(';DYNAMIC_ADD_OF_PY2EXE_FILES', ";DYNAMIC_ADD_OF_PY2EXE_FILES\n" + buff)
    file = open(nsis_file, 'w')
    file.write(new_contents)
    file.close()

def create_nsis_file_instructions():
    path = NEW_DISTRIBUTION_FOLDER

    buff = ''
    toplevel = next(os.walk(path))[0]
    toplevel_subdirs = next(os.walk(path))[1]
    toplevel_files = next(os.walk(path))[2]
    pprint.pprint(toplevel_subdirs)

    for f in toplevel_files:
        # buff += "; in root: %s\n" % root
        buff += 'File "..\\%s"' % f
        buff += "\n"

    for f in toplevel_subdirs:
        buff += 'File /r "..\\%s"' % f
        buff += "\n"

    return buff.replace(toplevel + "\\", "")

def touch(filename):
    if not os.path.exists(filename):
        print("Creating file")
        open(filename, 'w').close()
    else:
        print("file exists, skipping")

def source_files():
    return [
        'setAdminPassword',
        'postinstall',
        'commandClient',
        'ncdClient',
        'screenlockServerNCD',
        'screenlockServer',
        'screenlockServerNCD',
        'screenlockApp']

def create_exe():
    os.system('C:\\Python27\\Scripts\\pyinstaller  --windowed --uac-admin source/setAdminPassword.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --windowed --uac-admin source/postinstall.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --console source/commandClient.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --console source/ncdClient.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --console -n screenlockServerNCD_console source/screenlockServerNCD.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --windowed source/screenlockServer.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --windowed source/screenlockServerNCD.py')
    os.system('C:\\Python27\\Scripts\\pyinstaller  --windowed source/screenlockApp.py')

def merge_files():
    if not os.path.isdir(COMBINED_DISTRIBUTION_FOLDER):
        os.mkdir(COMBINED_DISTRIBUTION_FOLDER)

    for i in source_files():
        copy_tree("dist/%s" % i, COMBINED_DISTRIBUTION_FOLDER)

main()
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

requires = [
    'amaasutils',
    'configparser',
    'python-dateutil',
    'pytz',
    'requests',
    'warrant'
]

setup(
    name='amaascore',
    version='0.5.17',
    description='Asset Management as a Service - Core SDK',
    license='Apache License 2.0',
    url='https://github.com/amaas-fintech/amaas-core-sdk-python',
    author='AMaaS',
    author_email='tech@amaas.com',
    classifiers=[
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    packages=find_packages(exclude=['tests']),  # Very annoying that this doesnt work - I have to include a MANIFEST
    install_requires=requires,
)

<commit_msg>Updated version number<commit_after>from setuptools import setup, find_packages

requires = [
    'amaasutils',
    'configparser',
    'python-dateutil',
    'pytz',
    'requests',
    'warrant'
]

setup(
    name='amaascore',
    version='0.5.18',
    description='Asset Management as a Service - Core SDK',
    license='Apache License 2.0',
    url='https://github.com/amaas-fintech/amaas-core-sdk-python',
    author='AMaaS',
    author_email='tech@amaas.com',
    classifiers=[
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    packages=find_packages(exclude=['tests']),  # Very annoying that this doesnt work - I have to include a MANIFEST
    install_requires=requires,
)

<|endoftext|>


<commit_before>from codecs import open
from os import path

from setuptools import setup

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

setup(
    name='opendc-web-server',
    version='0.1.0',

    description='Python web server for the OpenDC project',
    long_description=long_description,

    url='http://opendc.org',

    author='The OpenDC team',
    author_email='opendc@atlarge-research.com',

    license='MIT',

    classifiers=[
        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
    ],

    keywords='opendc datacenter simulation web-server',

    packages=['opendc'],

    install_requires=[
        'Flask==1.0.2',
        'Flask-SocketIO==3.0.2',
        'oauth2client==4.1.3',
        'eventlet==0.24.1',
        'Flask-Compress==1.4.0',
        'pyasn1-modules==0.2.2'
    ],
)
<commit_msg>Add MySQL connector dependency<commit_after>from codecs import open
from os import path

from setuptools import setup

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

setup(
    name='opendc-web-server',
    version='0.1.0',

    description='Python web server for the OpenDC project',
    long_description=long_description,

    url='http://opendc.org',

    author='The OpenDC team',
    author_email='opendc@atlarge-research.com',

    license='MIT',

    classifiers=[
        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
    ],

    keywords='opendc datacenter simulation web-server',

    packages=['opendc'],

    install_requires=[
        'Flask==1.0.2',
        'Flask-SocketIO==3.0.2',
        'oauth2client==4.1.3',
        'eventlet==0.24.1',
        'Flask-Compress==1.4.0',
        'mysql-connector-python-rf==2.2.2',
        'pyasn1-modules==0.2.2',
        'six==1.11.0'
    ],
)
<|endoftext|>


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

# make sure that we import mklib/ (and not the system-wide one)
sys.path.insert(0, path.abspath(path.dirname(__file__)))
import mklib

setup(
    name='mk',
    version=mklib.__version__,
    description="a Makefile/make replacement written in Python (used at ActiveState)",
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
    ],
    keywords='make mk',
    author='Trent Mick',
    author_email='trentm@gmail.com',
    maintainer='Sridhar Ratnakumar',
    maintainer_email='sridharr@activestate.com',
    url='http://github.com/ActiveState/mk',
    license='MIT',
    packages=find_packages(exclude=[
        'examples', 'test']),
    include_package_data=True,
    zip_safe=False,
    entry_points={
      'console_scripts': [
          'mk=mklib.runner:main'
      ]
    },
)
<commit_msg>remove maint field; bad distutils<commit_after>from setuptools import setup, find_packages
import sys, os
from os import path

# make sure that we import mklib/ (and not the system-wide one)
sys.path.insert(0, path.abspath(path.dirname(__file__)))
import mklib

setup(
    name='mk',
    version=mklib.__version__,
    description="a Makefile/make replacement written in Python (used at ActiveState)",
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
    ],
    keywords='make mk',
    author='Trent Mick',
    author_email='trentm@gmail.com',
    url='http://github.com/ActiveState/mk',
    license='MIT',
    packages=find_packages(exclude=[
        'examples', 'test']),
    include_package_data=True,
    zip_safe=False,
    entry_points={
      'console_scripts': [
          'mk=mklib.runner:main'
      ]
    },
)
<|endoftext|>


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

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/

from setuptools import setup

install_requires = [
    'Flask',
    'requests',
    'celery',
    'pycurl',
    'pymongo'
]

setup(name="stooge",
      version="0.1",
      description="Stooge",
      url="https://github.com/st3fan/stooge",
      author="Stefan Arentz",
      author_email="sarentz@mozilla.com",
      install_requires = install_requires,
      packages=["stooge", "stooge.scanner"],
      scripts=["scripts/stooge-web", "scripts/stooge-scanner", "scripts/stooge-ctl"])
<commit_msg>Fixes #21 Add missing dependencies and versions to setup.py<commit_after>#!/usr/bin/env python

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/

from setuptools import setup

install_requires = [
    'Flask==0.10.1',
    'requests==2.3.0',
    'celery==3.1.11',
    'pycurl==7.19.3.1',
    'pymongo==2.7',
    'boogs==0.1'
]

setup(name="stooge",
      version="0.1",
      description="Stooge",
      url="https://github.com/st3fan/stooge",
      author="Stefan Arentz",
      author_email="sarentz@mozilla.com",
      install_requires = install_requires,
      packages=["stooge", "stooge.scanner"],
      scripts=["scripts/stooge-web", "scripts/stooge-scanner", "scripts/stooge-ctl"])
<|endoftext|>


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

from distutils.core import setup, Extension, Command
from distutils.command.build import build
from distutils.command.clean import clean
from distutils.command.sdist import sdist
from distutils.dir_util import remove_tree
from distutils.util import get_platform
from distutils.spawn import spawn
from distutils.errors import DistutilsExecError
import distutils

import sys
import os
import os.path
import re
import shutil
import time

MIN_LIBVIRT = "0.9.11"
MIN_LIBVIRT_LXC = "1.0.2"

# Hack to stop 'pip install' failing with error
# about missing 'build' dir.
if not os.path.exists("build"):
    os.mkdir("build")

_pkgcfg = -1
def get_pkgcfg(do_fail=True):
    global _pkgcfg
    if _pkgcfg == -1:
        _pkgcfg = os.getenv('PKG_CONFIG')
    if _pkgcfg is None:
        _pkgcfg = distutils.spawn.find_executable("pkg-config")
    if _pkgcfg is None and do_fail:
        raise Exception("pkg-config binary is required to compile libvirt-python")
    return _pkgcfg

def check_minimum_libvirt_version():
    spawn([get_pkgcfg(),
           "--print-errors",
           "--atleast-version=%s" % MIN_LIBVIRT,
           "libvirt"])

def have_libvirt_lxc():
    try:
        spawn([get_pkgcfg(),
               "--atleast-version=%s" % MIN_LIBVIRT_LXC,
             "libvirt"])
        return True
    except DistutilsExecError:
        return False

def have_libvirtaio():
    # This depends on asyncio, which in turn depends on "yield from" syntax.
    # The asyncio module itself is in standard library since 3.4, but there is
    # an out-of-tree version compatible with 3.3.
    return sys.version_info >= (3, 3)

def get_pkgconfig_data(args, mod, required=True):
    """Run pkg-config to and return content associated with it"""
    f = os.popen("%s %s %s" % (get_pkgcfg(), " ".join(args), mod))

    line = f.readline()
    if line is not None:
        line = line.strip()

    if line is None or line == "":
        if required:
            raise Exception("Cannot determine '%s' from libvirt pkg-config file" % " ".join(args))
        else:
            return ""

    return line

def get_api_xml_files():
    """Check with pkg-config that libvirt is present and extract
    the API XML file paths we need from it"""

    libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"], "libvirt")

    offset = libvirt_api.index("-api.xml")
    libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml"

    offset = libvirt_api.index("-api.xml")
    libvirt_lxc_api = libvirt_api[0:offset] + "-lxc-api.xml"

    return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api)

def get_module_lists():
    """
    Determine which modules we are actually building, and all their
    required config
    """
    if get_pkgcfg(do_fail=False) is None:
        return [], []

    c_modules = []
    py_modules = []
    ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
    cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()

    module = Extension('libvirtmod',
                       sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'],
                       libraries = [ "virt" ],
                       include_dirs = [ "." ])
    module.extra_compile_args.extend(cflags)
    module.extra_link_args.extend(ldflags)

    c_modules.append(module)
    py_modules.append("libvirt")

    moduleqemu = Extension('libvirtmod_qemu',
                           sources = ['libvirt-qemu-override.c', 'build/libvirt-qemu.c', 'typewrappers.c', 'libvirt-utils.c'],
                           libraries = [ "virt-qemu" ],
                           include_dirs = [ "." ])
    moduleqemu.extra_compile_args.extend(cflags)
    moduleqemu.extra_link_args.extend(ldflags)

    c_modules.append(moduleqemu)
    py_modules.append("libvirt_qemu")

    if have_libvirt_lxc():
        modulelxc = Extension('libvirtmod_lxc',
                              sources = ['libvirt-lxc-override.c', 'build/libvirt-lxc.c', 'typewrappers.c', 'libvirt-utils.c'],
                              libraries = [ "virt-lxc" ],
                              include_dirs = [ "." ])
        modulelxc.extra_compile_args.extend(cflags)
        modulelxc.extra_link_args.extend(ldflags)

        c_modules.append(modulelxc)
        py_modules.append("libvirt_lxc")

    if have_libvirtaio():
        py_modules.append("libvirtaio")

    return c_modules, py_modules

###################
# Custom commands #
###################

class my_build(build):

    def run(self):
        check_minimum_libvirt_version()
        apis = get_api_xml_files()

        self.spawn([sys.executable, "generator.py", "libvirt", apis[0]])
        self.spawn([sys.executable, "generator.py", "libvirt-qemu", apis[1]])
        if have_libvirt_lxc():
            self.spawn([sys.executable, "generator.py", "libvirt-lxc", apis[2]])
        if have_libvirtaio():
            shutil.copy('libvirtaio.py', 'build')

        build.run(self)

class my_sdist(sdist):
    user_options = sdist.user_options

    description = "Update libvirt-python.spec; build sdist-tarball."

    def initialize_options(self):
        self.snapshot = None
        sdist.initialize_options(self)

    def finalize_options(self):
        if self.snapshot is not None:
            self.snapshot = 1
        sdist.finalize_options(self)

    def gen_rpm_spec(self):
        f1 = open('libvirt-python.spec.in', 'r')
        f2 = open('libvirt-python.spec', 'w')
        for line in f1:
            f2.write(line
                     .replace('@PY_VERSION@', self.distribution.get_version()))
        f1.close()
        f2.close()

    def gen_authors(self):
        f = os.popen("git log --pretty=format:'%aN <%aE>'")
        authors = []
        for line in f:
            line = "   " + line.strip()
            if line not in authors:
                authors.append(line)

        authors.sort(key=str.lower)

        f1 = open('AUTHORS.in', 'r')
        f2 = open('AUTHORS', 'w')
        for line in f1:
            f2.write(line.replace('@AUTHORS@', "\n".join(authors)))
        f1.close()
        f2.close()

    def gen_changelog(self):
        f1 = os.popen("git log '--pretty=format:%H:%ct %an  <%ae>%n%n%s%n%b%n'")
        f2 = open("ChangeLog", 'w')

        for line in f1:
            m = re.match(r'([a-f0-9]+):(\d+)\s(.*)', line)
            if m:
                t = time.gmtime(int(m.group(2)))
                f2.write("%04d-%02d-%02d %s\n" % (t.tm_year, t.tm_mon, t.tm_mday, m.group(3)))
            else:
                if re.match(r'Signed-off-by', line):
                    continue
                f2.write("    " + line.strip() + "\n")

        f1.close()
        f2.close()

    def run(self):
        if not os.path.exists("build"):
            os.mkdir("build")

        if os.path.exists(".git"):
            try:
                self.gen_rpm_spec()
                self.gen_authors()
                self.gen_changelog()

                sdist.run(self)

            finally:
                files = ["libvirt-python.spec",
                         "AUTHORS",
                         "ChangeLog"]
                for f in files:
                    if os.path.exists(f):
                        os.unlink(f)
        else:
            sdist.run(self)

class my_rpm(Command):
    user_options = []

    description = "Build src and noarch rpms."

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        """
        Run sdist, then 'rpmbuild' the tar.gz
        """

        self.run_command('sdist')
        self.spawn(["/usr/bin/rpmbuild", "-ta", "--clean",
            "dist/libvirt-python-%s.tar.gz" % self.distribution.get_version()])

class my_test(Command):
    user_options = [
        ('build-base=', 'b',
         "base directory for build library"),
        ('build-platlib=', None,
         "build directory for platform-specific distributions"),
        ('plat-name=', 'p',
         "platform name to build for, if supported "
         "(default: %s)" % get_platform()),
    ]

    description = "Run test suite."

    def initialize_options(self):
        self.build_base = 'build'
        self.build_platlib = None
        self.plat_name = None

    def finalize_options(self):
        if self.plat_name is None:
            self.plat_name = get_platform()

        plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])

        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base,
                                              'lib' + plat_specifier)

    def find_nosetests_path(self):
        binaries = [
            "nosetests-%d.%d" % (sys.version_info[0],
                                 sys.version_info[1]),
            "nosetests-%d" % (sys.version_info[0]),
            "nosetests",
        ]

        for binary in binaries:
            path = distutils.spawn.find_executable(binary)
            if path is not None:
                return path

        raise Exception("Cannot find any nosetests binary")

    def run(self):
        """
        Run test suite
        """

        apis = get_api_xml_files()

        if "PYTHONPATH" in os.environ:
            os.environ["PYTHONPATH"] = self.build_platlib + ":" + os.environ["PYTHONPATH"]
        else:
            os.environ["PYTHONPATH"] = self.build_platlib
        self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
        nose = self.find_nosetests_path()
        self.spawn([sys.executable, nose])

class my_clean(clean):
    def run(self):
        clean.run(self)

        if os.path.exists("build"):
            remove_tree("build")

##################
# Invoke setup() #
##################

_c_modules, _py_modules = get_module_lists()

setup(name = 'libvirt-python',
      version = '5.0.0',
      url = 'http://www.libvirt.org',
      maintainer = 'Libvirt Maintainers',
      maintainer_email = 'libvir-list@redhat.com',
      description = 'The libvirt virtualization API python binding',
      long_description =
        '''The libvirt-python package provides a module that permits applications
written in the Python programming language to call the interface
supplied by the libvirt library, to manage the virtualization capabilities
of recent versions of Linux (and other OSes).''',
      license = 'LGPLv2+',
      ext_modules = _c_modules,
      py_modules = _py_modules,
      package_dir = {
          '': 'build'
      },
      cmdclass = {
          'build': my_build,
          'clean': my_clean,
          'sdist': my_sdist,
          'rpm': my_rpm,
          'test': my_test
      },
      classifiers = [
          "Development Status :: 5 - Production/Stable",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
          "Programming Language :: Python",
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 3",
      ]
)
<commit_msg>Release of libvirt-python 5.1.0<commit_after>#!/usr/bin/env python

from distutils.core import setup, Extension, Command
from distutils.command.build import build
from distutils.command.clean import clean
from distutils.command.sdist import sdist
from distutils.dir_util import remove_tree
from distutils.util import get_platform
from distutils.spawn import spawn
from distutils.errors import DistutilsExecError
import distutils

import sys
import os
import os.path
import re
import shutil
import time

MIN_LIBVIRT = "0.9.11"
MIN_LIBVIRT_LXC = "1.0.2"

# Hack to stop 'pip install' failing with error
# about missing 'build' dir.
if not os.path.exists("build"):
    os.mkdir("build")

_pkgcfg = -1
def get_pkgcfg(do_fail=True):
    global _pkgcfg
    if _pkgcfg == -1:
        _pkgcfg = os.getenv('PKG_CONFIG')
    if _pkgcfg is None:
        _pkgcfg = distutils.spawn.find_executable("pkg-config")
    if _pkgcfg is None and do_fail:
        raise Exception("pkg-config binary is required to compile libvirt-python")
    return _pkgcfg

def check_minimum_libvirt_version():
    spawn([get_pkgcfg(),
           "--print-errors",
           "--atleast-version=%s" % MIN_LIBVIRT,
           "libvirt"])

def have_libvirt_lxc():
    try:
        spawn([get_pkgcfg(),
               "--atleast-version=%s" % MIN_LIBVIRT_LXC,
             "libvirt"])
        return True
    except DistutilsExecError:
        return False

def have_libvirtaio():
    # This depends on asyncio, which in turn depends on "yield from" syntax.
    # The asyncio module itself is in standard library since 3.4, but there is
    # an out-of-tree version compatible with 3.3.
    return sys.version_info >= (3, 3)

def get_pkgconfig_data(args, mod, required=True):
    """Run pkg-config to and return content associated with it"""
    f = os.popen("%s %s %s" % (get_pkgcfg(), " ".join(args), mod))

    line = f.readline()
    if line is not None:
        line = line.strip()

    if line is None or line == "":
        if required:
            raise Exception("Cannot determine '%s' from libvirt pkg-config file" % " ".join(args))
        else:
            return ""

    return line

def get_api_xml_files():
    """Check with pkg-config that libvirt is present and extract
    the API XML file paths we need from it"""

    libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"], "libvirt")

    offset = libvirt_api.index("-api.xml")
    libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml"

    offset = libvirt_api.index("-api.xml")
    libvirt_lxc_api = libvirt_api[0:offset] + "-lxc-api.xml"

    return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api)

def get_module_lists():
    """
    Determine which modules we are actually building, and all their
    required config
    """
    if get_pkgcfg(do_fail=False) is None:
        return [], []

    c_modules = []
    py_modules = []
    ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
    cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()

    module = Extension('libvirtmod',
                       sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'],
                       libraries = [ "virt" ],
                       include_dirs = [ "." ])
    module.extra_compile_args.extend(cflags)
    module.extra_link_args.extend(ldflags)

    c_modules.append(module)
    py_modules.append("libvirt")

    moduleqemu = Extension('libvirtmod_qemu',
                           sources = ['libvirt-qemu-override.c', 'build/libvirt-qemu.c', 'typewrappers.c', 'libvirt-utils.c'],
                           libraries = [ "virt-qemu" ],
                           include_dirs = [ "." ])
    moduleqemu.extra_compile_args.extend(cflags)
    moduleqemu.extra_link_args.extend(ldflags)

    c_modules.append(moduleqemu)
    py_modules.append("libvirt_qemu")

    if have_libvirt_lxc():
        modulelxc = Extension('libvirtmod_lxc',
                              sources = ['libvirt-lxc-override.c', 'build/libvirt-lxc.c', 'typewrappers.c', 'libvirt-utils.c'],
                              libraries = [ "virt-lxc" ],
                              include_dirs = [ "." ])
        modulelxc.extra_compile_args.extend(cflags)
        modulelxc.extra_link_args.extend(ldflags)

        c_modules.append(modulelxc)
        py_modules.append("libvirt_lxc")

    if have_libvirtaio():
        py_modules.append("libvirtaio")

    return c_modules, py_modules

###################
# Custom commands #
###################

class my_build(build):

    def run(self):
        check_minimum_libvirt_version()
        apis = get_api_xml_files()

        self.spawn([sys.executable, "generator.py", "libvirt", apis[0]])
        self.spawn([sys.executable, "generator.py", "libvirt-qemu", apis[1]])
        if have_libvirt_lxc():
            self.spawn([sys.executable, "generator.py", "libvirt-lxc", apis[2]])
        if have_libvirtaio():
            shutil.copy('libvirtaio.py', 'build')

        build.run(self)

class my_sdist(sdist):
    user_options = sdist.user_options

    description = "Update libvirt-python.spec; build sdist-tarball."

    def initialize_options(self):
        self.snapshot = None
        sdist.initialize_options(self)

    def finalize_options(self):
        if self.snapshot is not None:
            self.snapshot = 1
        sdist.finalize_options(self)

    def gen_rpm_spec(self):
        f1 = open('libvirt-python.spec.in', 'r')
        f2 = open('libvirt-python.spec', 'w')
        for line in f1:
            f2.write(line
                     .replace('@PY_VERSION@', self.distribution.get_version()))
        f1.close()
        f2.close()

    def gen_authors(self):
        f = os.popen("git log --pretty=format:'%aN <%aE>'")
        authors = []
        for line in f:
            line = "   " + line.strip()
            if line not in authors:
                authors.append(line)

        authors.sort(key=str.lower)

        f1 = open('AUTHORS.in', 'r')
        f2 = open('AUTHORS', 'w')
        for line in f1:
            f2.write(line.replace('@AUTHORS@', "\n".join(authors)))
        f1.close()
        f2.close()

    def gen_changelog(self):
        f1 = os.popen("git log '--pretty=format:%H:%ct %an  <%ae>%n%n%s%n%b%n'")
        f2 = open("ChangeLog", 'w')

        for line in f1:
            m = re.match(r'([a-f0-9]+):(\d+)\s(.*)', line)
            if m:
                t = time.gmtime(int(m.group(2)))
                f2.write("%04d-%02d-%02d %s\n" % (t.tm_year, t.tm_mon, t.tm_mday, m.group(3)))
            else:
                if re.match(r'Signed-off-by', line):
                    continue
                f2.write("    " + line.strip() + "\n")

        f1.close()
        f2.close()

    def run(self):
        if not os.path.exists("build"):
            os.mkdir("build")

        if os.path.exists(".git"):
            try:
                self.gen_rpm_spec()
                self.gen_authors()
                self.gen_changelog()

                sdist.run(self)

            finally:
                files = ["libvirt-python.spec",
                         "AUTHORS",
                         "ChangeLog"]
                for f in files:
                    if os.path.exists(f):
                        os.unlink(f)
        else:
            sdist.run(self)

class my_rpm(Command):
    user_options = []

    description = "Build src and noarch rpms."

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        """
        Run sdist, then 'rpmbuild' the tar.gz
        """

        self.run_command('sdist')
        self.spawn(["/usr/bin/rpmbuild", "-ta", "--clean",
            "dist/libvirt-python-%s.tar.gz" % self.distribution.get_version()])

class my_test(Command):
    user_options = [
        ('build-base=', 'b',
         "base directory for build library"),
        ('build-platlib=', None,
         "build directory for platform-specific distributions"),
        ('plat-name=', 'p',
         "platform name to build for, if supported "
         "(default: %s)" % get_platform()),
    ]

    description = "Run test suite."

    def initialize_options(self):
        self.build_base = 'build'
        self.build_platlib = None
        self.plat_name = None

    def finalize_options(self):
        if self.plat_name is None:
            self.plat_name = get_platform()

        plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])

        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base,
                                              'lib' + plat_specifier)

    def find_nosetests_path(self):
        binaries = [
            "nosetests-%d.%d" % (sys.version_info[0],
                                 sys.version_info[1]),
            "nosetests-%d" % (sys.version_info[0]),
            "nosetests",
        ]

        for binary in binaries:
            path = distutils.spawn.find_executable(binary)
            if path is not None:
                return path

        raise Exception("Cannot find any nosetests binary")

    def run(self):
        """
        Run test suite
        """

        apis = get_api_xml_files()

        if "PYTHONPATH" in os.environ:
            os.environ["PYTHONPATH"] = self.build_platlib + ":" + os.environ["PYTHONPATH"]
        else:
            os.environ["PYTHONPATH"] = self.build_platlib
        self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
        nose = self.find_nosetests_path()
        self.spawn([sys.executable, nose])

class my_clean(clean):
    def run(self):
        clean.run(self)

        if os.path.exists("build"):
            remove_tree("build")

##################
# Invoke setup() #
##################

_c_modules, _py_modules = get_module_lists()

setup(name = 'libvirt-python',
      version = '5.1.0',
      url = 'http://www.libvirt.org',
      maintainer = 'Libvirt Maintainers',
      maintainer_email = 'libvir-list@redhat.com',
      description = 'The libvirt virtualization API python binding',
      long_description =
        '''The libvirt-python package provides a module that permits applications
written in the Python programming language to call the interface
supplied by the libvirt library, to manage the virtualization capabilities
of recent versions of Linux (and other OSes).''',
      license = 'LGPLv2+',
      ext_modules = _c_modules,
      py_modules = _py_modules,
      package_dir = {
          '': 'build'
      },
      cmdclass = {
          'build': my_build,
          'clean': my_clean,
          'sdist': my_sdist,
          'rpm': my_rpm,
          'test': my_test
      },
      classifiers = [
          "Development Status :: 5 - Production/Stable",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
          "Programming Language :: Python",
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 3",
      ]
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
# pylint: disable=missing-docstring

import os
import re
import codecs
from setuptools import setup

def read_metafile(path):
    """
        Read contents from given metafile
    """
    with codecs.open(path, "rb", "utf-8") as f:
        return f.read()

def get_meta(name):
    """
        Get some metdata with the give name from the
        Meta file
    """
    meta_match = re.search(
        r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=name.upper()),
        __META_DATA__, re.M
    )

    if not meta_match:
        raise RuntimeError("Unable to find __{}string.".format(name))
    return meta_match.group(1)

__META_FILE__ = os.path.join("radish", "__init__.py")
__META_DATA__ = read_metafile(__META_FILE__)

setup(
    name="radish-bdd",
    version=get_meta("version"),
    license=get_meta("license"),
    description=get_meta("description"),
    author=get_meta("author"),
    author_email=get_meta("author_email"),
    maintainer=get_meta("author"),
    maintainer_email=get_meta("author_email"),
    platforms=["Linux", "Windows", "MAC OS X"],
    url=get_meta("url"),
    download_url=get_meta("download_url"),
    packages=["radish", "radish/extensions", "radish/languages"],
    package_data={"": ["radish/languages/*", "*.md"]},
    install_requires=["docopt", "parse", "pysingleton", "colorful>=0.01.03", "lxml", "ipython"],
    include_package_data=True,
    entry_points={"console_scripts": ["radish = radish.main:main"]},
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Other Audience",
        "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
        "Natural Language :: English",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: OS Independent",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: Microsoft :: Windows :: Windows 7",
        "Operating System :: Microsoft :: Windows :: Windows XP",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: Implementation",
        "Topic :: Education :: Testing",
        "Topic :: Software Development",
        "Topic :: Software Development :: Testing"
    ],
)
<commit_msg>Fix classifiers for pypi<commit_after># -*- coding: utf-8 -*-
# pylint: disable=missing-docstring

import os
import re
import codecs
from setuptools import setup

def read_metafile(path):
    """
        Read contents from given metafile
    """
    with codecs.open(path, "rb", "utf-8") as f:
        return f.read()

def get_meta(name):
    """
        Get some metdata with the give name from the
        Meta file
    """
    meta_match = re.search(
        r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=name.upper()),
        __META_DATA__, re.M
    )

    if not meta_match:
        raise RuntimeError("Unable to find __{}string.".format(name))
    return meta_match.group(1)

__META_FILE__ = os.path.join("radish", "__init__.py")
__META_DATA__ = read_metafile(__META_FILE__)

setup(
    name="radish-bdd",
    version=get_meta("version"),
    license=get_meta("license"),
    description=get_meta("description"),
    author=get_meta("author"),
    author_email=get_meta("author_email"),
    maintainer=get_meta("author"),
    maintainer_email=get_meta("author_email"),
    platforms=["Linux", "Windows", "MAC OS X"],
    url=get_meta("url"),
    download_url=get_meta("download_url"),
    packages=["radish", "radish/extensions", "radish/languages"],
    package_data={"": ["radish/languages/*", "*.md"]},
    install_requires=["docopt", "parse", "pysingleton", "colorful>=0.01.03", "lxml", "ipython"],
    include_package_data=True,
    entry_points={"console_scripts": ["radish = radish.main:main"]},
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Other Audience",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: OS Independent",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: Microsoft :: Windows :: Windows 7",
        "Operating System :: Microsoft :: Windows :: Windows XP",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: Implementation",
        "Topic :: Education :: Testing",
        "Topic :: Software Development",
        "Topic :: Software Development :: Testing"
    ],
)
<|endoftext|>