<commit_before>"""Setup.py for ProsperAPI Flask project"""

from os import path, listdir
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

HERE = path.abspath(path.dirname(__file__))
__version__ = '0.2.0'

def hack_find_packages(include_str):
    """patches setuptools.find_packages issue

    setuptools.find_packages(path='') doesn't work as intended

    Returns:
        (:obj:`list` :obj:`str`) append <include_str>. onto every element of setuptools.find_pacakges() call

    """
    new_list = [include_str]
    for element in find_packages(include_str):
        new_list.append(include_str + '.' + element)

    return new_list

def include_all_subfiles(*args):
    """Slurps up all files in a directory (non recursive) for data_files section

    Note:
        Not recursive, only includes flat files

    Returns:
        (:obj:`list` :obj:`str`) list of all non-directories in a file

    """
    file_list = []
    for path_included in args:
        local_path = path.join(HERE, path_included)

        for file in listdir(local_path):
            file_abspath = path.join(local_path, file)
            if path.isdir(file_abspath):        #do not include sub folders
                continue
            if '_local.cfg' in file_abspath:    #do not include secret configs
                continue
            file_list.append(path_included + '/' + file)

    return file_list

class PyTest(TestCommand):
    """PyTest cmdclass hook for test-at-buildtime functionality

    http://doc.pytest.org/en/latest/goodpractices.html#manual-integration

    """
    user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = [
            'Tests',
            '--cov=publicAPI/',
            '--cov-report=term-missing'
        ]    #load defaults here

    def run_tests(self):
        import shlex
        #import here, cause outside the eggs aren't loaded
        import pytest
        pytest_commands = []
        try:    #read commandline
            pytest_commands = shlex.split(self.pytest_args)
        except AttributeError:  #use defaults
            pytest_commands = self.pytest_args
        errno = pytest.main(pytest_commands)
        exit(errno)

setup(
    name='ProsperAPI',
    author='John Purcell',
    author_email='prospermarketshow@gmail.com',
    url='https://github.com/EVEprosper/ProsperAPI',
    download_url='https://github.com/EVEprosper/ProsperAPI/tarball/v' + __version__,
    version=__version__,
    license='MIT',
    classifiers=[
        'Programming Language :: Python :: 3.5'
    ],
    keywords='prosper eveonline api CREST',
    #packages=hack_find_packages('prosper'),
    packages=find_packages(),
    data_files=[
        ('services', include_all_subfiles('services')),
        ('docs', include_all_subfiles('docs')),
        ('tests', include_all_subfiles('tests')),
        ('scripts', include_all_subfiles('scripts'))
    ],
    package_data={
        'publicAPI':[
            'publicAPI.cfg'
        ]
        #'prosper':[
        #    'publicAPI/prosperAPI.cfg',
        #    'publicAPI/prosperAPI_local.cfg'
        #]
    },
    install_requires=[
        'Flask~=0.12',
        'Flask-RESTful~=0.3.5',
        'flask-script~=2.0.5',
        'requests~=2.13.0',
        'pandas~=0.19.2',
        'numpy~=1.12.0',
        'cython~=0.25.2',
        'matplotlib~=2.0.0',        #required for building fbprophet
        'pystan~=2.14.0',
        'fbprophet~=0.1.post1',     #order matters: need pystan/cython first
        'ProsperCommon~=0.5.0',     #--extra-index-url=https://repo.fury.io/lockefox/
        'tinydb~=3.2.2',
        'ujson~=1.35',
        'plumbum~=1.6.3',
        'shortuuid~=0.5.0'
    ],
    tests_require=[
        'pytest~=3.0.0',
        'pytest_cov~=2.4.0',
        'pytest-flask~=0.10.0',
        'pymysql~=0.7.10'
    ],
    cmdclass={
        'test':PyTest
    }
)
<commit_msg>adding api cachefile to setup (for installer)<commit_after>"""Setup.py for ProsperAPI Flask project"""

from os import path, listdir
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

HERE = path.abspath(path.dirname(__file__))
__version__ = '0.2.0'

def hack_find_packages(include_str):
    """patches setuptools.find_packages issue

    setuptools.find_packages(path='') doesn't work as intended

    Returns:
        (:obj:`list` :obj:`str`) append <include_str>. onto every element of setuptools.find_pacakges() call

    """
    new_list = [include_str]
    for element in find_packages(include_str):
        new_list.append(include_str + '.' + element)

    return new_list

def include_all_subfiles(*args):
    """Slurps up all files in a directory (non recursive) for data_files section

    Note:
        Not recursive, only includes flat files

    Returns:
        (:obj:`list` :obj:`str`) list of all non-directories in a file

    """
    file_list = []
    for path_included in args:
        local_path = path.join(HERE, path_included)

        for file in listdir(local_path):
            file_abspath = path.join(local_path, file)
            if path.isdir(file_abspath):        #do not include sub folders
                continue
            if '_local.cfg' in file_abspath:    #do not include secret configs
                continue
            file_list.append(path_included + '/' + file)

    return file_list

class PyTest(TestCommand):
    """PyTest cmdclass hook for test-at-buildtime functionality

    http://doc.pytest.org/en/latest/goodpractices.html#manual-integration

    """
    user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = [
            'Tests',
            '--cov=publicAPI/',
            '--cov-report=term-missing'
        ]    #load defaults here

    def run_tests(self):
        import shlex
        #import here, cause outside the eggs aren't loaded
        import pytest
        pytest_commands = []
        try:    #read commandline
            pytest_commands = shlex.split(self.pytest_args)
        except AttributeError:  #use defaults
            pytest_commands = self.pytest_args
        errno = pytest.main(pytest_commands)
        exit(errno)

setup(
    name='ProsperAPI',
    author='John Purcell',
    author_email='prospermarketshow@gmail.com',
    url='https://github.com/EVEprosper/ProsperAPI',
    download_url='https://github.com/EVEprosper/ProsperAPI/tarball/v' + __version__,
    version=__version__,
    license='MIT',
    classifiers=[
        'Programming Language :: Python :: 3.5'
    ],
    keywords='prosper eveonline api CREST',
    #packages=hack_find_packages('prosper'),
    packages=find_packages(),
    data_files=[
        ('services', include_all_subfiles('services')),
        ('docs', include_all_subfiles('docs')),
        ('tests', include_all_subfiles('tests')),
        ('scripts', include_all_subfiles('scripts'))
    ],
    package_data={
        'publicAPI':[
            'cache/apikeys.json'    #including key file for installer
        ]
    },
    install_requires=[
        'Flask~=0.12',
        'Flask-RESTful~=0.3.5',
        'flask-script~=2.0.5',
        'requests~=2.13.0',
        'pandas~=0.19.2',
        'numpy~=1.12.0',
        'cython~=0.25.2',
        'matplotlib~=2.0.0',        #required for building fbprophet
        'pystan~=2.14.0',
        'fbprophet~=0.1.post1',     #order matters: need pystan/cython first
        'ProsperCommon~=0.5.0',     #--extra-index-url=https://repo.fury.io/lockefox/
        'tinydb~=3.2.2',
        'ujson~=1.35',
        'plumbum~=1.6.3',
        'shortuuid~=0.5.0'
    ],
    tests_require=[
        'pytest~=3.0.0',
        'pytest_cov~=2.4.0',
        'pytest-flask~=0.10.0',
        'pymysql~=0.7.10'
    ],
    cmdclass={
        'test':PyTest
    }
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""
Library to create/handle geometries and tight-binding parameters in Python. Made with DFT in mind.
"""

from __future__ import print_function

if __doc__ is None:
    __doc__ = """sisl: Creating and handling of geometries.

Enables tight-binding models etc."""

DOCLINES = __doc__.split("\n")

import sys
import subprocess
import os
import os.path as osp

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Topic :: Software Development
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics
Topic :: Utilities
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
"""

MAJOR = 0
MINOR = 7
MICRO = 13
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
GIT_REVISION = "b75012f6438afcb731bb7e868a76bfde1168f1a1"

# The MANIFEST should be updated (which it only is
# if it does not exist...)
# So we try and delete it...
if os.path.exists('MANIFEST'):
    os.remove('MANIFEST')

def generate_cython():
    cwd = osp.abspath(osp.dirname(__file__))
    print("Cythonizing sources")
    p = subprocess.call([sys.executable,
                         osp.join(cwd, 'tools', 'cythonize.py'),
                         'sisl'],
                        cwd=cwd)
    if p != 0:
        raise RuntimeError("Running cythonize failed!")

build_requires = ['six', 'setuptools', 'numpy>=1.9', 'scipy', 'netCDF4']

# Create list of all sub-directories with
#   __init__.py files...
packages = ['sisl']
for subdir, dirs, files in os.walk('sisl'):
    if '__init__.py' in files:
        packages.append(subdir.replace(os.sep, '.'))
        if 'tests' in 'dirs':
            packages.append(subdir.replace(os.sep, '.') + '.tests')

metadata = dict(
    name='sisl',
    maintainer="Nick R. Papior",
    maintainer_email="nickpapior@gmail.com",
    description="Tight-binding models and interfacing the tight-binding transport calculator TBtrans",
    long_description="""Manipulating with SIESTA output files.

Creation of geometries using simple IO interfaces with multiple formats.

Tight-binding models and interfacing the tight-binding transport calculator TBtrans.
""",
    url="http://github.com/zerothi/sisl",
    download_url="http://github.com/zerothi/sisl/releases",
    license='LGPLv3',
    packages=packages,
    entry_points={
        'console_scripts' :
        ['sgeom = sisl.geometry:sgeom',
         'sgrid = sisl.grid:sgrid',
         'sdata = sisl.utils.sdata:sdata']
    },
    classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
    platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
    install_requires=build_requires,
)

cwd = osp.abspath(osp.dirname(__file__))
if not osp.exists(osp.join(cwd, 'PKG-INFO')):
    # Generate Cython sources, unless building from source release
    # generate_cython()
    pass

# Generate configuration
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration(None, parent_package, top_path)
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    config.add_subpackage('sisl')

    return config

metadata['version'] = VERSION
if not ISRELEASED:
    metadata['version'] = VERSION + '-dev'

# With credits from NUMPY developers we use this
# routine to get the git-tag

def git_version():
    global GIT_REVISION

    def _minimal_ext_cmd(cmd):
        # construct minimal environment
        env = {}
        for k in ['SYSTEMROOT', 'PATH']:
            v = os.environ.get(k)
            if v is not None:
                env[k] = v
        # LANGUAGE is used on win32
        env['LANGUAGE'] = 'C'
        env['LANG'] = 'C'
        env['LC_ALL'] = 'C'
        out = subprocess.Popen(
            cmd,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            env=env).communicate()[0]
        return out

    try:
        out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
        rev = out.strip().decode('ascii')
    except OSError:
        # Retain the revision name
        rev = GIT_REVISION

    return rev

def write_version(filename='sisl/info.py'):
    version_str = """
# This file is automatically generated from sisl setup.py
major   = {version[0]}
minor   = {version[1]}
micro   = {version[2]}
version = '.'.join(map(str,{version}))
release = {release}
# Git information
git_revision = '{git}'
git_revision_short = git_revision[:7]

if not release:
    version = version + '-' + git_revision_short
"""
    # If we are in git we try and fetch the
    # git version as well
    GIT_REV = git_version()

    with open(filename, 'w') as fh:
        fh.write(version_str.format(version=[MAJOR, MINOR, MICRO],
                                    release=str(ISRELEASED),
                                    git=GIT_REV))

if __name__ == '__main__':

    try:
        # Create version file
        # if allowed
        write_version()
    except:
        pass

    # Be sure to import this before numpy setup
    from setuptools import setup

    # Now we import numpy distutils for installation.
    from numpy.distutils.core import setup
    metadata['configuration'] = configuration

    # Main setup of python modules
    setup(**metadata)
<commit_msg>enh: version now prints full git-hash (for dev version)<commit_after>#!/usr/bin/env python
"""
Library to create/handle geometries and tight-binding parameters in Python. Made with DFT in mind.
"""

from __future__ import print_function

if __doc__ is None:
    __doc__ = """sisl: Creating and handling of geometries.

Enables tight-binding models etc."""

DOCLINES = __doc__.split("\n")

import sys
import subprocess
import os
import os.path as osp

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Topic :: Software Development
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics
Topic :: Utilities
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
"""

MAJOR = 0
MINOR = 7
MICRO = 13
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
GIT_REVISION = "b75012f6438afcb731bb7e868a76bfde1168f1a1"

# The MANIFEST should be updated (which it only is
# if it does not exist...)
# So we try and delete it...
if os.path.exists('MANIFEST'):
    os.remove('MANIFEST')

def generate_cython():
    cwd = osp.abspath(osp.dirname(__file__))
    print("Cythonizing sources")
    p = subprocess.call([sys.executable,
                         osp.join(cwd, 'tools', 'cythonize.py'),
                         'sisl'],
                        cwd=cwd)
    if p != 0:
        raise RuntimeError("Running cythonize failed!")

build_requires = ['six', 'setuptools', 'numpy>=1.9', 'scipy', 'netCDF4']

# Create list of all sub-directories with
#   __init__.py files...
packages = ['sisl']
for subdir, dirs, files in os.walk('sisl'):
    if '__init__.py' in files:
        packages.append(subdir.replace(os.sep, '.'))
        if 'tests' in 'dirs':
            packages.append(subdir.replace(os.sep, '.') + '.tests')

metadata = dict(
    name='sisl',
    maintainer="Nick R. Papior",
    maintainer_email="nickpapior@gmail.com",
    description="Tight-binding models and interfacing the tight-binding transport calculator TBtrans",
    long_description="""Manipulating with SIESTA output files.

Creation of geometries using simple IO interfaces with multiple formats.

Tight-binding models and interfacing the tight-binding transport calculator TBtrans.
""",
    url="http://github.com/zerothi/sisl",
    download_url="http://github.com/zerothi/sisl/releases",
    license='LGPLv3',
    packages=packages,
    entry_points={
        'console_scripts' :
        ['sgeom = sisl.geometry:sgeom',
         'sgrid = sisl.grid:sgrid',
         'sdata = sisl.utils.sdata:sdata']
    },
    classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
    platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
    install_requires=build_requires,
)

cwd = osp.abspath(osp.dirname(__file__))
if not osp.exists(osp.join(cwd, 'PKG-INFO')):
    # Generate Cython sources, unless building from source release
    # generate_cython()
    pass

# Generate configuration
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration(None, parent_package, top_path)
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    config.add_subpackage('sisl')

    return config

metadata['version'] = VERSION
if not ISRELEASED:
    metadata['version'] = VERSION + '-dev'

# With credits from NUMPY developers we use this
# routine to get the git-tag

def git_version():
    global GIT_REVISION

    def _minimal_ext_cmd(cmd):
        # construct minimal environment
        env = {}
        for k in ['SYSTEMROOT', 'PATH']:
            v = os.environ.get(k)
            if v is not None:
                env[k] = v
        # LANGUAGE is used on win32
        env['LANGUAGE'] = 'C'
        env['LANG'] = 'C'
        env['LC_ALL'] = 'C'
        out = subprocess.Popen(
            cmd,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            env=env).communicate()[0]
        return out

    try:
        out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
        rev = out.strip().decode('ascii')
    except OSError:
        # Retain the revision name
        rev = GIT_REVISION

    return rev

def write_version(filename='sisl/info.py'):
    version_str = """
# This file is automatically generated from sisl setup.py
major   = {version[0]}
minor   = {version[1]}
micro   = {version[2]}
version = '.'.join(map(str,{version}))
release = {release}
# Git information
git_revision = '{git}'
git_revision_short = git_revision[:7]

if not release:
    version = version + '-' + git_revision
"""
    # If we are in git we try and fetch the
    # git version as well
    GIT_REV = git_version()

    with open(filename, 'w') as fh:
        fh.write(version_str.format(version=[MAJOR, MINOR, MICRO],
                                    release=str(ISRELEASED),
                                    git=GIT_REV))

if __name__ == '__main__':

    try:
        # Create version file
        # if allowed
        write_version()
    except:
        pass

    # Be sure to import this before numpy setup
    from setuptools import setup

    # Now we import numpy distutils for installation.
    from numpy.distutils.core import setup
    metadata['configuration'] = configuration

    # Main setup of python modules
    setup(**metadata)
<|endoftext|>


<commit_before>try:
    from setuptools import setup
    from setuptools import find_packages
    packages = find_packages()
except ImportError:
    from distutils.core import setup
    import os
    packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')]

setup(
    name='cle',
    description='CLE Loads Everything (at least, may binary formats!) and provides a Pythonic interface to analyze what they are and what they would look like in memory.',
    version='6.7.1.13',
    packages=packages,
    install_requires=[ "pyelftools", "cffi", "idalink", "archinfo", "pyvex", "pefile" ]
)
<commit_msg>ticked version number to 6.7.1.13.post2<commit_after>try:
    from setuptools import setup
    from setuptools import find_packages
    packages = find_packages()
except ImportError:
    from distutils.core import setup
    import os
    packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')]

setup(
    name='cle',
    description='CLE Loads Everything (at least, may binary formats!) and provides a Pythonic interface to analyze what they are and what they would look like in memory.',
    version='6.7.1.13.post2',
    packages=packages,
    install_requires=[ "pyelftools", "cffi", "idalink", "archinfo", "pyvex", "pefile" ]
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name='django-easy-twitter',
    version='0.1.0',
    author='Chris Moss',
    description='Simple way to get your chosen twitter feed onto your project',
    long_description=open('README.md').read(),
    author_email='chris@publicfunction.co.uk',
    keywords='django twitter easy twitter easy-twitter',
    install_requires=['django', 'twython'],
    #url='http://github.com/DrMegahertz/django-gravatar',
    packages=[
        'easy_twitter',
        'easy_twitter.templatetags',
    ],
    package_data={
        'easy_twitter': [
            'templates/*',
        ],
    },
    classifiers=[
        'Development Status :: 1 - Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License (GPL)',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Framework :: Django',
    ]
)<commit_msg>added url.<commit_after>from distutils.core import setup

setup(
    name='django-easy-twitter',
    version='0.1.0',
    author='Chris Moss',
    description='Simple way to get your chosen twitter feed onto your project',
    long_description=open('README.md').read(),
    author_email='chris@publicfunction.co.uk',
    keywords='django twitter easy twitter easy-twitter',
    install_requires=['django', 'twython'],
    url='https://github.com/publicFunction/django-easy-twitter',
    packages=[
        'easy_twitter',
        'easy_twitter.templatetags',
    ],
    package_data={
        'easy_twitter': [
            'templates/*',
        ],
    },
    classifiers=[
        'Development Status :: 1 - Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU General Public License (GPL)',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Framework :: Django',
    ]
)<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license.  See the LICENSE.txt file for details.
import os

from setuptools import setup

VERSION = '0.2.3.dev'

def write_version_py(filename=None):
    if filename is None:
        filename = os.path.join(os.path.dirname(__file__),
                                'haas', 'version.py')
    ver = """\
version = {version!r}
"""
    fh = open(filename, 'w')
    try:
        fh.write(ver.format(version=VERSION))
    finally:
        fh.close()

write_version_py()

with open('README.rst') as fh:
    long_description = fh.read()

setup(
    name='haas',
    version=VERSION,
    url='https://github.com/sjagoe/haas',
    author='Simon Jagoe',
    author_email='simon@simonjagoe.com',
    classifiers=[
        'Development Status :: 1 - Planning',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: MacOS',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: OS Independent',
        'Operating System :: POSIX',
        'Operating System :: Unix',
        'Programming Language :: Python',
        'Topic :: Software Development',
        'Topic :: Software Development :: Testing',
    ],
    description='Extensible Python Test Runner',
    long_description=long_description,
    license='BSD',
    packages=['haas'],
    entry_points={
        'console_scripts': [
            'haas=haas.main:main',
        ],
    },
)
<commit_msg>Fix installation in python 2.6<commit_after># -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license.  See the LICENSE.txt file for details.
import os
import sys

from setuptools import setup

VERSION = '0.2.3.dev'

def write_version_py(filename=None):
    if filename is None:
        filename = os.path.join(os.path.dirname(__file__),
                                'haas', 'version.py')
    ver = """\
version = {version!r}
"""
    fh = open(filename, 'w')
    try:
        fh.write(ver.format(version=VERSION))
    finally:
        fh.close()

write_version_py()

with open('README.rst') as fh:
    long_description = fh.read()

if sys.version_info < (2, 7):
    setup_kwargs = {
        'install_requires': ['unittest2', 'argparse'],
    }
else:
    setup_kwargs = {}

setup(
    name='haas',
    version=VERSION,
    url='https://github.com/sjagoe/haas',
    author='Simon Jagoe',
    author_email='simon@simonjagoe.com',
    classifiers=[
        'Development Status :: 1 - Planning',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: MacOS',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: OS Independent',
        'Operating System :: POSIX',
        'Operating System :: Unix',
        'Programming Language :: Python',
        'Topic :: Software Development',
        'Topic :: Software Development :: Testing',
    ],
    description='Extensible Python Test Runner',
    long_description=long_description,
    license='BSD',
    packages=['haas'],
    entry_points={
        'console_scripts': [
            'haas=haas.main:main',
        ],
    },
    **setup_kwargs
)
<|endoftext|>


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

def read(fname):
    try:
        return open(os.path.join(os.path.dirname(__file__), fname)).read()
    except IOError:
        return ''

setup(
    name='djpl-emailing',
    version='0.1',
    description='a django-productline feature to include schnipp.js',
    long_description=read('README.rst'),
    license='The MIT License',
    keywords='django, django-productline, email',
    author='Toni Michel',
    author_email='toni@schnapptack.de',
    url="https://github.com/tonimichel/djpl-emailing",
    packages=find_packages(),
    package_dir={'emailing': 'emailing'},
    include_package_data=True,
    scripts=[],
    zip_safe=False,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent'
    ],
    install_requires=[
        'django-productline', 'premailer==3.0.1'
    ]
)

<commit_msg>Set premailer version to 3.1.1<commit_after>#! /usr/bin/env python
import os
from setuptools import setup, find_packages

def read(fname):
    try:
        return open(os.path.join(os.path.dirname(__file__), fname)).read()
    except IOError:
        return ''

setup(
    name='djpl-emailing',
    version='0.1',
    description='a django-productline feature to include schnipp.js',
    long_description=read('README.rst'),
    license='The MIT License',
    keywords='django, django-productline, email',
    author='Toni Michel',
    author_email='toni@schnapptack.de',
    url="https://github.com/tonimichel/djpl-emailing",
    packages=find_packages(),
    package_dir={'emailing': 'emailing'},
    include_package_data=True,
    scripts=[],
    zip_safe=False,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent'
    ],
    install_requires=[
        'django-productline', 'premailer==3.1.1'
    ]
)

<|endoftext|>


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

from setuptools import setup, find_packages
import os
import zipfile
import urllib.request

def install_apsw():
    try:
        import apsw
        return
    except:
        pass

    print("downloading apsw.")
    urllib.request.urlretrieve('https://github.com/rogerbinns/apsw/archive/3.8.7.3-r1.zip', 'apsw-3.8.7.3-r1.zip')

    print("extracting.")
    with zipfile.ZipFile('apsw-3.8.7.3-r1.zip', 'r') as zip_file:
        zip_file.extractall()

    print("install apsw.")
    os.system('cd apsw-3.8.7.3-r1 && python setup.py fetch --version=3.8.7.3 --all build --enable-all-extensions install')

    print("clean files.")
    os.system('rm -rf apsw-3.8.7.3-r1 && rm apsw-3.8.7.3-r1.zip')

def install_serpent():
    print("downloading serpent.")
    urllib.request.urlretrieve('https://github.com/ethereum/serpent/archive/master.zip', 'serpent.zip')

    print("extracting.")
    with zipfile.ZipFile('serpent.zip', 'r') as zip_file:
        zip_file.extractall()

    print("install serpent.")
    os.system('cd serpent-master && make && sudo make install')

    print("clean files.")
    os.system('rm -rf serpent-master && rm serpent.zip')

def readme():
    here = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(here, 'README.md')) as f:
        return f.read()

required_packages = [
    'appdirs==1.4.0',
    'prettytable==0.7.2',
    'python-dateutil==2.2',
    'flask==0.10.1',
    'json-rpc==1.7',
    'pytest==2.6.3',
    'pycoin==0.52',
    'requests==2.4.2',
    'Flask-HTTPAuth==2.3.0',
    'tornado==4.0.2',
    'pycrypto>=2.6.1',
    'tendo==0.2.6',
    'pysha3==0.3',
    'pytest-cov==1.8.0',
    'colorlog==2.4.0',
    'python-bitcoinlib==0.3.0'
]

required_repos = [
    'https://github.com/petertodd/python-bitcoinlib/archive/c481254c623cc9a002187dc23263cce3e05f5754.zip#egg=python-bitcoinlib-0.3.0'
]

setup_options = {
    'name': 'counterparty-lib',
    'version': '9.49.3',
    'description': 'Reference implementation of the Counterparty protocol.',
    'long_description': readme(),
    'classifiers': [
      "Programming Language :: Python",
    ],
    'url': 'https://github.com/CounterpartyXCP/counterpartyd',
    'keywords': 'counterparty, bitcoin',
    'packages': find_packages(),
    'zip_safe': False,
    'dependency_links': required_repos,
    'install_requires': required_packages,
    'include_package_data': True
}

install_serpent()
install_apsw()
setup(**setup_options)
<commit_msg>Update `setup.py`<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages
import os
import zipfile
import urllib.request

def install_apsw():
    try:
        import apsw
        return
    except:
        pass

    print("downloading apsw.")
    urllib.request.urlretrieve('https://github.com/rogerbinns/apsw/archive/3.8.7.3-r1.zip', 'apsw-3.8.7.3-r1.zip')

    print("extracting.")
    with zipfile.ZipFile('apsw-3.8.7.3-r1.zip', 'r') as zip_file:
        zip_file.extractall()

    print("install apsw.")
    os.system('cd apsw-3.8.7.3-r1 && python setup.py fetch --version=3.8.7.3 --all build --enable-all-extensions install')

    print("clean files.")
    os.system('rm -rf apsw-3.8.7.3-r1 && rm apsw-3.8.7.3-r1.zip')

def install_serpent():
    print("downloading serpent.")
    urllib.request.urlretrieve('https://github.com/ethereum/serpent/archive/master.zip', 'serpent.zip')

    print("extracting.")
    with zipfile.ZipFile('serpent.zip', 'r') as zip_file:
        zip_file.extractall()

    print("install serpent.")
    os.system('cd serpent-master && make && sudo make install')

    print("clean files.")
    os.system('rm -rf serpent-master && rm serpent.zip')

required_packages = [
    'appdirs==1.4.0',
    'prettytable==0.7.2',
    'python-dateutil==2.2',
    'flask==0.10.1',
    'json-rpc==1.7',
    'pytest==2.6.3',
    'pycoin==0.52',
    'requests==2.4.2',
    'Flask-HTTPAuth==2.3.0',
    'tornado==4.0.2',
    'pycrypto>=2.6.1',
    'tendo==0.2.6',
    'pysha3==0.3',
    'pytest-cov==1.8.0',
    'colorlog==2.4.0',
    'python-bitcoinlib==0.3.0'
]

required_repos = [
    'https://github.com/petertodd/python-bitcoinlib/archive/c481254c623cc9a002187dc23263cce3e05f5754.zip#egg=python-bitcoinlib-0.3.0'
]

setup_options = {
    'name': 'counterparty-lib',
    'version': '9.49.3',
    'author': 'Counterparty Foundation',
    'author_email': 'support@counterparty.io',
    'maintainer': 'Adam Krellenstein',
    'maintainer_email': 'adamk@counterparty.io',
    'url': 'http://counterparty.io',
    'license': 'MIT',
    'description': 'Reference implementation of the Counterparty protocol',
    'long_description': '',
    'keywords': 'counterparty, bitcoin',
    'classifiers': [
      "Programming Language :: Python",
    ],
    'download_url': 'https://github.com/CounterpartyXCP/counterpartyd/releases/tag/v9.49.3',
    'provides': ['counterpartylib'],
    'packages': find_packages(),
    'zip_safe': False,
    'dependency_links': required_repos,
    'install_requires': required_packages,
    'include_package_data': True
}

install_serpent()
install_apsw()
setup(**setup_options)
<|endoftext|>


<commit_before>import os
from setuptools import setup

README = """
See the README on `GitHub
<https://github.com/uw-it-aca/myuw>`_.
"""

# The VERSION file is created by travis-ci, based on the tag name
version_path = 'myuw/VERSION'
VERSION = open(os.path.join(os.path.dirname(__file__), version_path)).read()
VERSION = VERSION.replace("\n", "")

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

url = "https://github.com/uw-it-aca/myuw"
setup(
    name='MyUW',
    version=VERSION,
    packages=['myuw'],
    author="UW-IT AXDD",
    author_email="aca-it@uw.edu",
    include_package_data=True,
    install_requires=[
        'Django==1.10.5',
        'ordereddict',
        'simplejson',
        'django-compressor',
        'BeautifulSoup',
        'urllib3==1.10.2',
        'django-templatetag-handlebars',
        'django-userservice==1.2.1',
        'unittest2',
        'AuthZ-Group',
        'python-binary-memcached',
        'UW-RestClients>=2.2,<3.0',
        'UW-RestClients-SWS>=0.6.3,<1.0',
        'UW-RestClients-PWS>=0.5,<1.0',
        'UW-RestClients-HFS>=0.5,<1.0',
        'UW-RestClients-GWS>=0.2,<1.0',
        'UW-RestClients-GradePage>=0.1,<1.0',
        'Django-SupportTools',
        'django_mobileesp',
        'django_client_logger',
        'yajl',
        'bleach',
    ],
    license='Apache License, Version 2.0',
    description=('MyUW is the portal of the University of Washington'),
    long_description=README,
    url=url,
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
    ],
)
<commit_msg>switch to uw_gws and uw_libraries<commit_after>import os
from setuptools import setup

README = """
See the README on `GitHub
<https://github.com/uw-it-aca/myuw>`_.
"""

# The VERSION file is created by travis-ci, based on the tag name
version_path = 'myuw/VERSION'
VERSION = open(os.path.join(os.path.dirname(__file__), version_path)).read()
VERSION = VERSION.replace("\n", "")

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

url = "https://github.com/uw-it-aca/myuw"
setup(
    name='MyUW',
    version=VERSION,
    packages=['myuw'],
    author="UW-IT AXDD",
    author_email="aca-it@uw.edu",
    include_package_data=True,
    install_requires=[
        'Django==1.10.5',
        'ordereddict',
        'simplejson',
        'django-compressor',
        'BeautifulSoup',
        'urllib3==1.10.2',
        'django-templatetag-handlebars',
        'django-userservice==1.2.1',
        'unittest2',
        'AuthZ-Group',
        'python-binary-memcached',
        'UW-RestClients>=2.2,<3.0',
        'UW-RestClients-SWS>=0.6.3,<1.0',
        'UW-RestClients-PWS>=0.5,<1.0',
        'UW-RestClients-HFS>=0.5,<1.0',
        'UW-RestClients-GWS>=0.2,<1.0',
        'UW-RestClients-Libraries>=0.2,<1.0',
        'UW-RestClients-GradePage>=0.1,<1.0',
        'Django-SupportTools',
        'django_mobileesp',
        'django_client_logger',
        'yajl',
        'bleach',
    ],
    license='Apache License, Version 2.0',
    description=('MyUW is the portal of the University of Washington'),
    long_description=README,
    url=url,
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
    ],
)
<|endoftext|>


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

from setuptools import setup, find_packages

import rsr.config

setup(
    name=rsr.config.name,
    version=rsr.config.version,
    description=rsr.config.description,
    author=rsr.config.author,
    author_email=rsr.config.author_email,
    url=rsr.config.url,
    packages=find_packages(),
    entry_points={
        'console_scripts': ['runsqlrun=rsr.cmd:main'],
    },
    data_files=[
        ('share/runsqlrun/icons',
         glob.glob('data/icons/*.svg')),
        ('share/icons/hicolor/scalable/apps',
         glob.glob('data/icons/*.svg')),
        ('share/runsqlrun/themes',
         glob.glob('data/themes/*.xml')),
        ('share/applications/',
         ['data/runsqlrun.desktop']),
    ]
)
<commit_msg>Add runsqlrun.gresource to setup.py.<commit_after>#!/usr/bin/env python3
import glob

from setuptools import setup, find_packages

import rsr.config

setup(
    name=rsr.config.name,
    version=rsr.config.version,
    description=rsr.config.description,
    author=rsr.config.author,
    author_email=rsr.config.author_email,
    url=rsr.config.url,
    packages=find_packages(),
    entry_points={
        'console_scripts': ['runsqlrun=rsr.cmd:main'],
    },
    data_files=[
        ('share/runsqlrun/icons',
         glob.glob('data/icons/*.svg')),
        ('share/icons/hicolor/scalable/apps',
         glob.glob('data/icons/*.svg')),
        ('share/runsqlrun/themes',
         glob.glob('data/themes/*.xml')),
        ('share/applications/',
         ['data/runsqlrun.desktop']),
        ('share/runsqlrun/',
         ['data/runsqlrun.gresource']),
    ]
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

__author__ = 'shafferm'
__version__ = '0.5.0'

setup(
      name="SCNIC",
      version=__version__,
      setup_requires=['pytest-runner'],
      test_require=['pytest'],
      install_requires=["numpy", "scipy", "networkx>=2", "biom-format", "pandas", "scikit-bio", "statsmodels", "h5py"],
      scripts=["scripts/SCNIC_analysis.py"],
      packages=find_packages(),
      description="A tool for finding and summarizing modules of highly correlated observations in compositional data",
      author="Michael Shaffer",
      author_email='michael.shaffer@ucdenver.edu',
      url="https://github.com/shafferm/SCNIC/",
      download_url="https://github.com/shafferm/SCNIC/tarball/%s" % __version__
)
<commit_msg>Bump patch number<commit_after>from setuptools import setup, find_packages

__author__ = 'shafferm'
__version__ = '0.5.1'

setup(
      name="SCNIC",
      version=__version__,
      setup_requires=['pytest-runner'],
      test_require=['pytest'],
      install_requires=["numpy", "scipy", "networkx>=2", "biom-format", "pandas", "scikit-bio", "statsmodels", "h5py"],
      scripts=["scripts/SCNIC_analysis.py"],
      packages=find_packages(),
      description="A tool for finding and summarizing modules of highly correlated observations in compositional data",
      author="Michael Shaffer",
      author_email='michael.shaffer@ucdenver.edu',
      url="https://github.com/shafferm/SCNIC/",
      download_url="https://github.com/shafferm/SCNIC/tarball/%s" % __version__
)
<|endoftext|>


<commit_before># encoding=utf8
import os
from setuptools import setup

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

README = read('README.md')

setup(
    name="django-orderedmodel",
    version="0.1.5",
    url='http://github.com/MagicSolutions/django-orderedmodel',
    description="Intends to help you create models which can bemoved up\down (or left\right) with respect to each other.",
    long_description=README,

    author='Kirill Elagin',
    author_email='kirelagin@gmail.com',
    packages=[
        'orderedmodel',
    ],
    package_data={
        'orderedmodel': [
            'static/orderedmodel/*.gif',
            'static/orderedmodel/*.js',
        ],
    },
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ],
    install_requires=[
        'django>=1.3',
    ],
)
<commit_msg>Update setup.py<commit_after># encoding=utf8
import os
from setuptools import setup

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

README = read('README.md')

setup(
    name="django-orderedmodel",
    version="0.1.5",
    url='http://github.com/IndustriaTech/django-orderedmodel',
    description="Intends to help you create models which can bemoved up\down (or left\right) with respect to each other.",
    long_description=README,

    author='Kirill Elagin',
    author_email='kirelagin@gmail.com',
    packages=[
        'orderedmodel',
    ],
    package_data={
        'orderedmodel': [
            'static/orderedmodel/*.gif',
            'static/orderedmodel/*.js',
        ],
    },
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ],
    install_requires=[
        'django>=1.4',
    ],
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
# Copyright 2015 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup

setup(
    name='yelp-clog',
    version='2.6.5',
    description='A package which provides logging and reading from scribe.',
    author='Yelp Infra Team',
    author_email='infra@yelp.com',
    packages=['clog'],
    package_data={'clog': ['fb303.thrift', 'scribe.thrift']},
    install_requires=[
        'boto>=2.0.0',
        'thriftpy',
        'PyStaticConfiguration >= 0.10.3',
        'simplejson',
        'six>=1.4.0',
    ],
    extras_require={
        'uwsgi_offload': ['uWSGI>=2.0.14.0.post3'],
    },
    classifiers=[
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
    ],
)
<commit_msg>Use proper uWSGI version<commit_after># -*- coding: utf-8 -*-
# Copyright 2015 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup

setup(
    name='yelp-clog',
    version='2.6.5',
    description='A package which provides logging and reading from scribe.',
    author='Yelp Infra Team',
    author_email='infra@yelp.com',
    packages=['clog'],
    package_data={'clog': ['fb303.thrift', 'scribe.thrift']},
    install_requires=[
        'boto>=2.0.0',
        'thriftpy',
        'PyStaticConfiguration >= 0.10.3',
        'simplejson',
        'six>=1.4.0',
    ],
    extras_require={
        'uwsgi': ['uWSGI>=2.0.14'],
    },
    classifiers=[
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
    ],
)
<|endoftext|>


<commit_before># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# libcloud.org licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from distutils.core import setup
from distutils.core import Command
from unittest import TextTestRunner, TestLoader
from glob import glob
from os.path import splitext, basename, join as pjoin

class TestCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        THIS_DIR = os.path.abspath(os.path.split(__file__)[0])
        sys.path.insert(0, THIS_DIR)
        sys.path.insert(0, pjoin(THIS_DIR, 'test'))
        self._dir = os.getcwd()

    def finalize_options(self):
        pass

    def run(self):
        testfiles = [ ]
        for t in glob(pjoin(self._dir, 'test', 'test_*.py')):
            testfiles.append('.'.join(
                ['test', splitext(basename(t))[0]])
            )

        tests = TestLoader().loadTestsFromNames(testfiles)
        t = TextTestRunner(verbosity = 1)
        res = t.run(tests)
        sys.exit(not res.wasSuccessful())

class ApiDocsCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        os.system('pydoctor --add-package=libcloud --project-name=libcloud --make-html    --project-url="http://incubator.apache.org/libcloud/"')

setup(name = 'apache-libcloud',
      version = '0.1.1',
      description = 'A unified interface into many cloud server providers',
      author = 'Apache Software Foundation',
      author_email = 'libcloud@incubator.apache.org',
      packages = ['libcloud', 'libcloud.drivers'],
      package_dir = {'libcloud' : 'libcloud', 'libcloud.drivers': 'libcloud/drivers' },
      license = 'Apache License (2.0)',
      url = 'http://incubator.apache.org/libcloud/',
      cmdclass = { 'test': TestCommand, 'apidocs': ApiDocsCommand },
      classifiers = [
	        'Development Status :: 4 - Beta',
	        'Environment :: Console',
	        'Intended Audience :: System Administrators',
	        'License :: OSI Approved :: Apache Software License',
	        'Operating System :: OS Independent',
	        'Programming Language :: Python',
	        'Topic :: Software Development :: Libraries :: Python Modules'
	    ],
)

<commit_msg>try to include view source links to viewvc<commit_after># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# libcloud.org licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from distutils.core import setup
from distutils.core import Command
from unittest import TextTestRunner, TestLoader
from glob import glob
from os.path import splitext, basename, join as pjoin

class TestCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        THIS_DIR = os.path.abspath(os.path.split(__file__)[0])
        sys.path.insert(0, THIS_DIR)
        sys.path.insert(0, pjoin(THIS_DIR, 'test'))
        self._dir = os.getcwd()

    def finalize_options(self):
        pass

    def run(self):
        testfiles = [ ]
        for t in glob(pjoin(self._dir, 'test', 'test_*.py')):
            testfiles.append('.'.join(
                ['test', splitext(basename(t))[0]])
            )

        tests = TestLoader().loadTestsFromNames(testfiles)
        t = TextTestRunner(verbosity = 1)
        res = t.run(tests)
        sys.exit(not res.wasSuccessful())

class ApiDocsCommand(Command):
    user_options = [ ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        os.system('pydoctor --add-package=libcloud --project-name=libcloud --make-html   --html-viewsource-base=https://svn.apache.org/viewvc/incubator/libcloud/trunk  --project-base-dir=`pwd` --project-url="http://incubator.apache.org/libcloud/"')

setup(name = 'apache-libcloud',
      version = '0.1.1',
      description = 'A unified interface into many cloud server providers',
      author = 'Apache Software Foundation',
      author_email = 'libcloud@incubator.apache.org',
      packages = ['libcloud', 'libcloud.drivers'],
      package_dir = {'libcloud' : 'libcloud', 'libcloud.drivers': 'libcloud/drivers' },
      license = 'Apache License (2.0)',
      url = 'http://incubator.apache.org/libcloud/',
      cmdclass = { 'test': TestCommand, 'apidocs': ApiDocsCommand },
      classifiers = [
	        'Development Status :: 4 - Beta',
	        'Environment :: Console',
	        'Intended Audience :: System Administrators',
	        'License :: OSI Approved :: Apache Software License',
	        'Operating System :: OS Independent',
	        'Programming Language :: Python',
	        'Topic :: Software Development :: Libraries :: Python Modules'
	    ],
)

<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name='vcii',
    version='0.0.0',
    author='Brandon Mulcahy',
    author_email='brandon@jangler.info',
    url='https://github.com/jangler/vcii',
    description='A TUI spreadsheet application.',
    long_description=open('README.md').read(),
    packages=['vcii', 'vcii.test'],
    scripts=['bin/vcii'],
    license='MIT',
    classifiers=[
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: End Users/Desktop',
        'Topic :: Office/Business :: Financial :: Spreadsheet',
    ],
)
<commit_msg>fix readme reference in setup.py<commit_after>from distutils.core import setup

setup(
    name='vcii',
    version='0.0.0',
    author='Brandon Mulcahy',
    author_email='brandon@jangler.info',
    url='https://github.com/jangler/vcii',
    description='A TUI spreadsheet application.',
    long_description=open('README.txt').read(),
    packages=['vcii', 'vcii.test'],
    scripts=['bin/vcii'],
    license='MIT',
    classifiers=[
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: End Users/Desktop',
        'Topic :: Office/Business :: Financial :: Spreadsheet',
    ],
)
<|endoftext|>


<commit_before># coding: utf-8
from setuptools import setup

setup(
    name='remote_storage_finder',
    version='0.0.1',
    license='BSD',
    author=u'shandymora',
    description=('A plugin for connecting graphite-web with remote graphite-webs'),
    py_modules=('remote_storage_finder',),
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=(
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Topic :: System :: Monitoring',
    ),
    install_requires=(
        'requests',
    ),
)<commit_msg>tidy up<commit_after># coding: utf-8
from setuptools import setup

setup(
    name='remote_storage_finder',
    version='0.0.1',
    license='Apache 2',
    author=u'shandymora',
    description=('A plugin for connecting graphite-web with remote graphite-webs'),
    py_modules=('remote_storage_finder',),
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=(
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: Apache 2 License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Topic :: System :: Monitoring',
    ),
    install_requires=(
        'requests',
    ),
)<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst

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

with open('VERSION') as version_file:
    version = version_file.read().rstrip('\n')

with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read().replace('.. :changelog:', '')

requirements = [
    'numpy',
    'netCDF4',
    'scipy',
]

with open('test-requirements.txt') as test_requirements_file:
    test_requirements = test_requirements_file.read()

setup(
    name='pyWOA',
    version=version,
    description="Package to subsample World Ocean Atlas climatology.",
    long_description=readme + '\n\n' + history,
    author="Guilherme Castelao",
    author_email='guilherme@castelao.net',
    url='https://github.com/castelao/pyWOA',
    packages=[
        'WOA',
    ],
    package_dir={'WOA':
                 'WOA'},
    include_package_data=True,
    install_requires=requirements,
    license='3-clause BSD',
    zip_safe=False,
    keywords='WOA World Ocean Atlas climatology oceanographic data oceanography temperature salinity',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: BSD License',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Topic :: Scientific/Engineering',
    ]
)
<commit_msg>Temporary solution to download WOA DB.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst

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

with open('VERSION') as version_file:
    version = version_file.read().rstrip('\n')

with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read().replace('.. :changelog:', '')

requirements = [
    'numpy',
    'netCDF4',
    'scipy',
]

with open('test-requirements.txt') as test_requirements_file:
    test_requirements = test_requirements_file.read()

# == Temporary solution
def download_data():
    """ Temporary solution to download WOA database.

        Copied from CoTeDe. Update it after CoTeDe is completely migrated to use it here.
    """
    try:
        # Python 3
        import urllib.request as urllib
    except:
        import urllib2 as urllib
    import os
    woa_dir = os.path.expanduser(os.getenv('WOA_DIR', '~/.woarc'))
    urls = ['http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA09/NetCDFdata/temperature_seasonal_5deg.nc',
    'http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA09/NetCDFdata/salinity_seasonal_5deg.nc']

    if not os.path.exists(woa_dir):
        os.makedirs(woa_dir)

    for url in urls:
        print("Downloading: %s" % url)
        remote = urllib.urlopen(url)
        f = open(os.path.join(woa_dir, os.path.basename(url)), 'wb')
        f.write(remote.read())
        f.close()

download_data()

setup(
    name='pyWOA',
    version=version,
    description="Package to subsample World Ocean Atlas climatology.",
    long_description=readme + '\n\n' + history,
    author="Guilherme Castelao",
    author_email='guilherme@castelao.net',
    url='https://github.com/castelao/pyWOA',
    packages=[
        'WOA',
    ],
    package_dir={'WOA':
                 'WOA'},
    include_package_data=True,
    install_requires=requirements,
    license='3-clause BSD',
    zip_safe=False,
    keywords='WOA World Ocean Atlas climatology oceanographic data oceanography temperature salinity',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: BSD License',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Topic :: Scientific/Engineering',
    ]
)
<|endoftext|>


<commit_before>from distutils.core import setup
import os

# Stolen from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
    os.chdir(root_dir)

for dirpath, dirnames, filenames in os.walk('tx_salaries'):
    # Ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'):
            del dirnames[i]
    if '__init__.py' in filenames:
        pkg = dirpath.replace(os.path.sep, '.')
        if os.path.altsep:
            pkg = pkg.replace(os.path.altsep, '.')
        packages.append(pkg)
    elif filenames:
        prefix = dirpath[len('tx_salaries/'):]
        for f in filenames:
            data_files.append(os.path.join(prefix, f))

setup(
    name='tx_salaries',
    version='1.12.0',
    description='Texas Tribune: tx_salaries',
    author='Tribune Tech',
    author_email='tech@texastribune.org',
    url='http://github.com/texastribune/tx_salaries/',
    packages=packages,
    package_data={'tx_salaries': data_files},
    install_requires=[
        'csvkit==0.9.1',
        'name_cleaver==0.6.0',
        'requests==2.5.1',
        'psycopg2>=2.6.1',
        'tx_people>=2.0.0',
    ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
    ],
)
<commit_msg>Bump to v1.12.1<commit_after>from distutils.core import setup
import os

# Stolen from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
    os.chdir(root_dir)

for dirpath, dirnames, filenames in os.walk('tx_salaries'):
    # Ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'):
            del dirnames[i]
    if '__init__.py' in filenames:
        pkg = dirpath.replace(os.path.sep, '.')
        if os.path.altsep:
            pkg = pkg.replace(os.path.altsep, '.')
        packages.append(pkg)
    elif filenames:
        prefix = dirpath[len('tx_salaries/'):]
        for f in filenames:
            data_files.append(os.path.join(prefix, f))

setup(
    name='tx_salaries',
    version='1.12.1',
    description='Texas Tribune: tx_salaries',
    author='Tribune Tech',
    author_email='tech@texastribune.org',
    url='http://github.com/texastribune/tx_salaries/',
    packages=packages,
    package_data={'tx_salaries': data_files},
    install_requires=[
        'csvkit==0.9.1',
        'name_cleaver==0.6.0',
        'requests==2.5.1',
        'psycopg2>=2.6.1',
        'tx_people>=2.0.0',
    ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Utilities',
    ],
)
<|endoftext|>


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

from distutils.command.build import build
from distutils.command.build_ext import build_ext
from setuptools import setup, Command, Extension
from codecs import open

import distutils.errors
import distutils.ccompiler
import distutils.sysconfig

import contextlib
import os
import sys
import tempfile
import shutil
import subprocess

OPTIONS = [
   ('dynamic-linking', None, 'link dynamically against libyara'),
   ('enable-cuckoo', None, 'enable "cuckoo" module'),
   ('enable-magic', None, 'enable "magic" module'),
   ('enable-dotnet', None, 'enable "dotnet" module'),
   ('enable-profiling', None, 'enable profiling features')]

BOOLEAN_OPTIONS = [
    'dynamic-linking',
    'enable-cuckoo',
    'enable-magic',
    'enable-dotnet',
    'enable-profiling']

@contextlib.contextmanager
def muted(*streams):
  """A context manager to redirect stdout and/or stderr to /dev/null.

  Examples:
    with muted(sys.stdout):
      ...

    with muted(sys.stderr):
      ...

    with muted(sys.stdout, sys.stderr):
      ...
  """
  devnull = open(os.devnull, 'w')
  try:
    old_streams = [os.dup(s.fileno()) for s in streams]
    for s in streams:
      os.dup2(devnull.fileno(), s.fileno())
    yield
  finally:
    for o,n in zip(old_streams, streams):
      os.dup2(o, n.fileno())
    devnull.close()

def has_function(function_name, libraries=None):
  """Checks if a given functions exists in the current platform."""
  compiler = distutils.ccompiler.new_compiler()
  with muted(sys.stdout, sys.stderr):
    result = compiler.has_function(
        function_name, libraries=libraries)
  if os.path.exists('a.out'):
    os.remove('a.out')
  return result

class BuildCommand(build):

  user_options = build.user_options + OPTIONS
  boolean_options = build.boolean_options + BOOLEAN_OPTIONS

  def initialize_options(self):

    build.initialize_options(self)
    self.dynamic_linking = None
    self.enable_magic = None
    self.enable_cuckoo = None
    self.enable_dotnet = None
    self.enable_profiling = None

  def finalize_options(self):

    build.finalize_options(self)

class BuildExtCommand(build_ext):

  user_options = build_ext.user_options + OPTIONS
  boolean_options = build_ext.boolean_options + BOOLEAN_OPTIONS

  def initialize_options(self):

    build_ext.initialize_options(self)
    self.dynamic_linking = None
    self.enable_magic = None
    self.enable_cuckoo = None
    self.enable_dotnet = None
    self.enable_profiling = None

  def finalize_options(self):

    build_ext.finalize_options(self)

    # If the build_ext command was invoked by the build command, take the
    # values for these options from the build command.

    self.set_undefined_options('build',
        ('dynamic_linking', 'dynamic_linking'),
        ('enable_magic', 'enable_magic'),
        ('enable_cuckoo', 'enable_cuckoo'),
        ('enable_dotnet', 'enable_dotnet'),
        ('enable_dex', 'enable_dex'),
        ('enable_profiling', 'enable_profiling'))

    if self.enable_magic and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-magic can''t be used with --dynamic-linking')
    if self.enable_cuckoo and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-cuckoo can''t be used with --dynamic-linking')
    if self.enable_dotnet and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-dotnet can''t be used with --dynamic-linking')
    if self.enable_dex and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-dex can''t be used with --dynamic-linking')

  def run(self):
    """Execute the build command."""

    module = self.distribution.ext_modules[0]
    base_dir = os.path.dirname(__file__)

    if base_dir:
      os.chdir(base_dir)

    exclusions = []

    for define in self.define or []:
      module.define_macros.append(define)

    for library in self.libraries or []:
      module.libraries.append(library)

    building_for_windows = self.plat_name in ('win32','win-amd64')
    building_for_osx = 'macosx' in self.plat_name
    building_for_linux = 'linux' in self.plat_name
    building_for_freebsd = 'freebsd' in self.plat_name
    building_for_openbsd = 'openbsd' in self.plat_name # need testing

    if building_for_linux:
      module.define_macros.append(('USE_LINUX_PROC', '1'))
    elif building_for_windows:
      module.define_macros.append(('USE_WINDOWS_PROC', '1'))
      module.define_macros.append(('_CRT_SECURE_NO_WARNINGS', '1'))
      module.libraries.append('kernel32')
      module.libraries.append('advapi32')
      module.libraries.append('user32')
      module.libraries.append('crypt32')
      module.libraries.append('ws2_32')
    elif building_for_osx:
      module.define_macros.append(('USE_MACH_PROC', '1'))
      module.include_dirs.append('/usr/local/opt/openssl/include')
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_freebsd:
      module.define_macros.append(('USE_FREEBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_openbsd:
      module.define_macros.append(('USE_OPENBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    else:
      module.define_macros.append(('USE_NO_PROC', '1'))

    if has_function('memmem'):
      module.define_macros.append(('HAVE_MEMMEM', '1'))
    if has_function('strlcpy'):
      module.define_macros.append(('HAVE_STRLCPY', '1'))
    if has_function('strlcat'):
      module.define_macros.append(('HAVE_STRLCAT', '1'))

    if self.enable_profiling:
      module.define_macros.append(('PROFILING_ENABLED', '1'))

    if self.dynamic_linking:
      module.libraries.append('yara')
    else:
      if not self.define or not ('HASH_MODULE', '1') in self.define:
        if (has_function('MD5_Init', libraries=['crypto']) and
            has_function('SHA256_Init', libraries=['crypto'])):
          module.define_macros.append(('HASH_MODULE', '1'))
          module.define_macros.append(('HAVE_LIBCRYPTO', '1'))
          module.libraries.append('crypto')
        else:
          exclusions.append('yara/libyara/modules/hash.c')

      if self.enable_magic:
        module.define_macros.append(('MAGIC_MODULE', '1'))
        module.libraries.append('magic')
      else:
        exclusions.append('yara/libyara/modules/magic.c')

      if self.enable_cuckoo:
        module.define_macros.append(('CUCKOO_MODULE', '1'))
        module.libraries.append('jansson')
      else:
        exclusions.append('yara/libyara/modules/cuckoo.c')

      if self.enable_dotnet:
        module.define_macros.append(('DOTNET_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dotnet.c')

      if self.enable_dex:
        module.define_macros.append(('DEX_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dex.c')

      exclusions = [os.path.normpath(x) for x in exclusions]

      for directory, _, files in os.walk('yara/libyara/'):
        for x in files:
          x = os.path.normpath(os.path.join(directory, x))
          if x.endswith('.c') and x not in exclusions:
            module.sources.append(x)

    build_ext.run(self)

class UpdateCommand(Command):
  """Update libyara source.

  This is normally only run by packagers to make a new release.
  """
  user_options = []

  def initialize_options(self):
    pass

  def finalize_options(self):
    pass

  def run(self):
    subprocess.check_call(['git', 'stash'], cwd='yara')

    subprocess.check_call(['git', 'submodule', 'init'])
    subprocess.check_call(['git', 'submodule', 'update'])

    subprocess.check_call(['git', 'reset', '--hard'], cwd='yara')
    subprocess.check_call(['git', 'clean', '-x', '-f', '-d'], cwd='yara')

    subprocess.check_call(['git', 'checkout', 'master'], cwd='yara')
    subprocess.check_call(['git', 'pull'], cwd='yara')
    subprocess.check_call(['git', 'fetch', '--tags'], cwd='yara')

    tag_name = 'tags/v%s' % self.distribution.metadata.version
    subprocess.check_call(['git', 'checkout', tag_name], cwd='yara')

    subprocess.check_call(['./bootstrap.sh'], cwd='yara')
    subprocess.check_call(['./configure'], cwd='yara')

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

setup(
    name='yara-python',
    version='3.7.0',
    description='Python interface for YARA',
    long_description=readme,
    license='Apache 2.0',
    author='Victor M. Alvarez',
    author_email='plusvic@gmail.com;vmalvarez@virustotal.com',
    url='https://github.com/VirusTotal/yara-python',
    zip_safe=False,
    cmdclass={
        'build': BuildCommand,
        'build_ext': BuildExtCommand,
        'update': UpdateCommand},
    ext_modules=[Extension(
        name='yara',
        include_dirs=['yara/libyara/include', 'yara/libyara/', '.'],
        sources=['yara-python.c'])])
<commit_msg>Add argument for enabling "dex" module.<commit_after>#
# Copyright (c) 2007-2013. The YARA Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from distutils.command.build import build
from distutils.command.build_ext import build_ext
from setuptools import setup, Command, Extension
from codecs import open

import distutils.errors
import distutils.ccompiler
import distutils.sysconfig

import contextlib
import os
import sys
import tempfile
import shutil
import subprocess

OPTIONS = [
   ('dynamic-linking', None, 'link dynamically against libyara'),
   ('enable-cuckoo', None, 'enable "cuckoo" module'),
   ('enable-magic', None, 'enable "magic" module'),
   ('enable-dotnet', None, 'enable "dotnet" module'),
   ('enable-dex', None, 'enable "dex" module'),
   ('enable-profiling', None, 'enable profiling features')]

BOOLEAN_OPTIONS = [
    'dynamic-linking',
    'enable-cuckoo',
    'enable-magic',
    'enable-dotnet',
    'enable-dex',
    'enable-profiling']

@contextlib.contextmanager
def muted(*streams):
  """A context manager to redirect stdout and/or stderr to /dev/null.

  Examples:
    with muted(sys.stdout):
      ...

    with muted(sys.stderr):
      ...

    with muted(sys.stdout, sys.stderr):
      ...
  """
  devnull = open(os.devnull, 'w')
  try:
    old_streams = [os.dup(s.fileno()) for s in streams]
    for s in streams:
      os.dup2(devnull.fileno(), s.fileno())
    yield
  finally:
    for o,n in zip(old_streams, streams):
      os.dup2(o, n.fileno())
    devnull.close()

def has_function(function_name, libraries=None):
  """Checks if a given functions exists in the current platform."""
  compiler = distutils.ccompiler.new_compiler()
  with muted(sys.stdout, sys.stderr):
    result = compiler.has_function(
        function_name, libraries=libraries)
  if os.path.exists('a.out'):
    os.remove('a.out')
  return result

class BuildCommand(build):

  user_options = build.user_options + OPTIONS
  boolean_options = build.boolean_options + BOOLEAN_OPTIONS

  def initialize_options(self):

    build.initialize_options(self)
    self.dynamic_linking = None
    self.enable_magic = None
    self.enable_cuckoo = None
    self.enable_dotnet = None
    self.enable_dex = None
    self.enable_profiling = None

  def finalize_options(self):

    build.finalize_options(self)

class BuildExtCommand(build_ext):

  user_options = build_ext.user_options + OPTIONS
  boolean_options = build_ext.boolean_options + BOOLEAN_OPTIONS

  def initialize_options(self):

    build_ext.initialize_options(self)
    self.dynamic_linking = None
    self.enable_magic = None
    self.enable_cuckoo = None
    self.enable_dotnet = None
    self.enable_dex = None
    self.enable_profiling = None

  def finalize_options(self):

    build_ext.finalize_options(self)

    # If the build_ext command was invoked by the build command, take the
    # values for these options from the build command.

    self.set_undefined_options('build',
        ('dynamic_linking', 'dynamic_linking'),
        ('enable_magic', 'enable_magic'),
        ('enable_cuckoo', 'enable_cuckoo'),
        ('enable_dotnet', 'enable_dotnet'),
        ('enable_dex', 'enable_dex'),
        ('enable_profiling', 'enable_profiling'))

    if self.enable_magic and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-magic can''t be used with --dynamic-linking')
    if self.enable_cuckoo and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-cuckoo can''t be used with --dynamic-linking')
    if self.enable_dotnet and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-dotnet can''t be used with --dynamic-linking')
    if self.enable_dex and self.dynamic_linking:
      raise distutils.errors.DistutilsOptionError(
          '--enable-dex can''t be used with --dynamic-linking')

  def run(self):
    """Execute the build command."""

    module = self.distribution.ext_modules[0]
    base_dir = os.path.dirname(__file__)

    if base_dir:
      os.chdir(base_dir)

    exclusions = []

    for define in self.define or []:
      module.define_macros.append(define)

    for library in self.libraries or []:
      module.libraries.append(library)

    building_for_windows = self.plat_name in ('win32','win-amd64')
    building_for_osx = 'macosx' in self.plat_name
    building_for_linux = 'linux' in self.plat_name
    building_for_freebsd = 'freebsd' in self.plat_name
    building_for_openbsd = 'openbsd' in self.plat_name # need testing

    if building_for_linux:
      module.define_macros.append(('USE_LINUX_PROC', '1'))
    elif building_for_windows:
      module.define_macros.append(('USE_WINDOWS_PROC', '1'))
      module.define_macros.append(('_CRT_SECURE_NO_WARNINGS', '1'))
      module.libraries.append('kernel32')
      module.libraries.append('advapi32')
      module.libraries.append('user32')
      module.libraries.append('crypt32')
      module.libraries.append('ws2_32')
    elif building_for_osx:
      module.define_macros.append(('USE_MACH_PROC', '1'))
      module.include_dirs.append('/usr/local/opt/openssl/include')
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_freebsd:
      module.define_macros.append(('USE_FREEBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    elif building_for_openbsd:
      module.define_macros.append(('USE_OPENBSD_PROC', '1'))
      module.include_dirs.append('/opt/local/include')
      module.library_dirs.append('/opt/local/lib')
      module.include_dirs.append('/usr/local/include')
      module.library_dirs.append('/usr/local/lib')
    else:
      module.define_macros.append(('USE_NO_PROC', '1'))

    if has_function('memmem'):
      module.define_macros.append(('HAVE_MEMMEM', '1'))
    if has_function('strlcpy'):
      module.define_macros.append(('HAVE_STRLCPY', '1'))
    if has_function('strlcat'):
      module.define_macros.append(('HAVE_STRLCAT', '1'))

    if self.enable_profiling:
      module.define_macros.append(('PROFILING_ENABLED', '1'))

    if self.dynamic_linking:
      module.libraries.append('yara')
    else:
      if not self.define or not ('HASH_MODULE', '1') in self.define:
        if (has_function('MD5_Init', libraries=['crypto']) and
            has_function('SHA256_Init', libraries=['crypto'])):
          module.define_macros.append(('HASH_MODULE', '1'))
          module.define_macros.append(('HAVE_LIBCRYPTO', '1'))
          module.libraries.append('crypto')
        else:
          exclusions.append('yara/libyara/modules/hash.c')

      if self.enable_magic:
        module.define_macros.append(('MAGIC_MODULE', '1'))
        module.libraries.append('magic')
      else:
        exclusions.append('yara/libyara/modules/magic.c')

      if self.enable_cuckoo:
        module.define_macros.append(('CUCKOO_MODULE', '1'))
        module.libraries.append('jansson')
      else:
        exclusions.append('yara/libyara/modules/cuckoo.c')

      if self.enable_dotnet:
        module.define_macros.append(('DOTNET_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dotnet.c')

      if self.enable_dex:
        module.define_macros.append(('DEX_MODULE', '1'))
      else:
        exclusions.append('yara/libyara/modules/dex.c')

      exclusions = [os.path.normpath(x) for x in exclusions]

      for directory, _, files in os.walk('yara/libyara/'):
        for x in files:
          x = os.path.normpath(os.path.join(directory, x))
          if x.endswith('.c') and x not in exclusions:
            module.sources.append(x)

    build_ext.run(self)

class UpdateCommand(Command):
  """Update libyara source.

  This is normally only run by packagers to make a new release.
  """
  user_options = []

  def initialize_options(self):
    pass

  def finalize_options(self):
    pass

  def run(self):
    subprocess.check_call(['git', 'stash'], cwd='yara')

    subprocess.check_call(['git', 'submodule', 'init'])
    subprocess.check_call(['git', 'submodule', 'update'])

    subprocess.check_call(['git', 'reset', '--hard'], cwd='yara')
    subprocess.check_call(['git', 'clean', '-x', '-f', '-d'], cwd='yara')

    subprocess.check_call(['git', 'checkout', 'master'], cwd='yara')
    subprocess.check_call(['git', 'pull'], cwd='yara')
    subprocess.check_call(['git', 'fetch', '--tags'], cwd='yara')

    tag_name = 'tags/v%s' % self.distribution.metadata.version
    subprocess.check_call(['git', 'checkout', tag_name], cwd='yara')

    subprocess.check_call(['./bootstrap.sh'], cwd='yara')
    subprocess.check_call(['./configure'], cwd='yara')

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

setup(
    name='yara-python',
    version='3.7.0',
    description='Python interface for YARA',
    long_description=readme,
    license='Apache 2.0',
    author='Victor M. Alvarez',
    author_email='plusvic@gmail.com;vmalvarez@virustotal.com',
    url='https://github.com/VirusTotal/yara-python',
    zip_safe=False,
    cmdclass={
        'build': BuildCommand,
        'build_ext': BuildExtCommand,
        'update': UpdateCommand},
    ext_modules=[Extension(
        name='yara',
        include_dirs=['yara/libyara/include', 'yara/libyara/', '.'],
        sources=['yara-python.c'])])
<|endoftext|>


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

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

SETUP_REQUIRES = ['setuptools >= 30.3.0']
SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else []

def get_locals(filename):
    l = {}
    exec(open(filename, 'r').read(), {}, l)
    return l

metadata = get_locals(path.join('masterfile', '_metadata.py'))

setup(
    name="masterfile",
    setup_requires=SETUP_REQUIRES,
    version=metadata['version'],
    packages=find_packages(),
    keywords="science research physiological biopac convert library",
)
<commit_msg>Improve keywords<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

SETUP_REQUIRES = ['setuptools >= 30.3.0']
SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else []

def get_locals(filename):
    l = {}
    exec(open(filename, 'r').read(), {}, l)
    return l

metadata = get_locals(path.join('masterfile', '_metadata.py'))

setup(
    name="masterfile",
    setup_requires=SETUP_REQUIRES,
    version=metadata['version'],
    packages=find_packages(),
    keywords="science research data library",
)
<|endoftext|>


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

import os
import sys
import glob
import numpy as np
import re

from setuptools import setup, Extension

def setup_xspec():

    headas_root = os.environ.get("HEADAS")

    if headas_root is None:

        print("No HEADAS env. variable set. Xspec support will not be installed ")

        return None

    library_dirs = [os.path.join(headas_root, 'lib')]

    # Check that the library directories exist

    if not os.path.exists(library_dirs[0]):

        print("\nERROR: the library directory %s of HEADAS does not exist!" % library_dirs[0])

        sys.exit(-1)

    libraries = ['XSFunctions', 'XSModel', 'XSUtil', 'XS']

    # Check that the libraries exist
    for library in libraries:

        library_name = 'lib%s.so' % library

        if not os.path.exists(os.path.join(library_dirs[0], library_name)):

            # See if it has been compiled static (usually libXS is)

            library_name = 'lib%s.a' % library

            if not os.path.exists(os.path.join(library_dirs[0], library_name)):

                # If on OS X look for dylib

                library_name = 'lib%s.dylib' % library

                if not os.path.exists(os.path.join(library_dirs[0], library_name)):

                    print("\nERROR: the library %s does not exist in %s while setting up Xspec!" %
                          (library, library_dirs[0]))

    # Now find versions for required libraries

    required_libraries = ['cfitsio_', 'CCfits_', 'wcs-']

    for library_to_probe in required_libraries:

        search_path = os.path.join(library_dirs[0], 'lib%s*.so' % library_to_probe)

        print search_path

        versions = glob.glob(search_path)

        if len(versions) == 0:
            search_path = os.path.join(library_dirs[0], 'lib%s*.dylib' % library_to_probe)
            print search_path

            versions = glob.glob(search_path)
            if len(versions) == 0:
                print("\nERROR: cannot find version for library %s while setting up Xspec" % (library_to_probe))
                sys.exit(-1)

        # Up to there versions[0] is a fully-qualified path
        # we need instead just the name of the library, without
        # the lib prefix nor the .so or .a extension

        name = os.path.basename(versions[0])
        sanitized_name = re.match('lib(.+)\.', name).groups()[0]

        libraries.append(sanitized_name)

    # We also need gfortran
    libraries.append('gfortran')
#    library_dirs.append("/usr/local/lib/gcc/6")
    # Configure the variables to build the external module with the C/C++ wrapper

    ext_modules_configuration = [

        Extension("astromodels.xspec._xspec",

                  ["astromodels/xspec/src/_xspec.cc", ],

                  libraries=libraries,

                  include_dirs=['astromodels/xspec/include', np.get_include()],

                  library_dirs=library_dirs,
                  extra_compile_args=[])]

    return ext_modules_configuration

# Normal packages

packages = ['astromodels',
            'astromodels/functions',
            'astromodels/tests',
            'astromodels/sources',
            'astromodels/utils',
            'astromodels/xspec'
            ]

# Check whether we can compile Xspec support
ext_modules_configuration = setup_xspec()

setup(
    name="astromodels",

    packages=packages,

    data_files=[('astromodels/data/functions', glob.glob('astromodels/data/functions/*.yaml'))],

    version='0.1',

    description="Astromodels contains models to be used in likelihood or Bayesian analysis in astronomy",

    author='Giacomo Vianello',

    author_email='giacomo.vianello@gmail.com',

    url='https://github.com/giacomov/astromodels',

    download_url='https://github.com/giacomov/astromodels/archive/v0.1',

    keywords=['Likelihood', 'Models', 'fit'],

    classifiers=[],

    install_requires=[
        'numpy >= 1.6',
        'PyYAML',
        'astropy >= 1.0',
        'scipy>=0.13',
        'numdifftools'],

    ext_modules=ext_modules_configuration

)
<commit_msg>Require a older version of numdifftools, which avoid pulling in too many requirements<commit_after>#!/usr/bin/env python

import os
import sys
import glob
import numpy as np
import re

from setuptools import setup, Extension

def setup_xspec():

    headas_root = os.environ.get("HEADAS")

    if headas_root is None:

        print("No HEADAS env. variable set. Xspec support will not be installed ")

        return None

    library_dirs = [os.path.join(headas_root, 'lib')]

    # Check that the library directories exist

    if not os.path.exists(library_dirs[0]):

        print("\nERROR: the library directory %s of HEADAS does not exist!" % library_dirs[0])

        sys.exit(-1)

    libraries = ['XSFunctions', 'XSModel', 'XSUtil', 'XS']

    # Check that the libraries exist
    for library in libraries:

        library_name = 'lib%s.so' % library

        if not os.path.exists(os.path.join(library_dirs[0], library_name)):

            # See if it has been compiled static (usually libXS is)

            library_name = 'lib%s.a' % library

            if not os.path.exists(os.path.join(library_dirs[0], library_name)):

                # If on OS X look for dylib

                library_name = 'lib%s.dylib' % library

                if not os.path.exists(os.path.join(library_dirs[0], library_name)):

                    print("\nERROR: the library %s does not exist in %s while setting up Xspec!" %
                          (library, library_dirs[0]))

    # Now find versions for required libraries

    required_libraries = ['cfitsio_', 'CCfits_', 'wcs-']

    for library_to_probe in required_libraries:

        search_path = os.path.join(library_dirs[0], 'lib%s*.so' % library_to_probe)

        print search_path

        versions = glob.glob(search_path)

        if len(versions) == 0:
            search_path = os.path.join(library_dirs[0], 'lib%s*.dylib' % library_to_probe)
            print search_path

            versions = glob.glob(search_path)
            if len(versions) == 0:
                print("\nERROR: cannot find version for library %s while setting up Xspec" % (library_to_probe))
                sys.exit(-1)

        # Up to there versions[0] is a fully-qualified path
        # we need instead just the name of the library, without
        # the lib prefix nor the .so or .a extension

        name = os.path.basename(versions[0])
        sanitized_name = re.match('lib(.+)\.', name).groups()[0]

        libraries.append(sanitized_name)

    # We also need gfortran
    libraries.append('gfortran')
#    library_dirs.append("/usr/local/lib/gcc/6")
    # Configure the variables to build the external module with the C/C++ wrapper

    ext_modules_configuration = [

        Extension("astromodels.xspec._xspec",

                  ["astromodels/xspec/src/_xspec.cc", ],

                  libraries=libraries,

                  include_dirs=['astromodels/xspec/include', np.get_include()],

                  library_dirs=library_dirs,
                  extra_compile_args=[])]

    return ext_modules_configuration

# Normal packages

packages = ['astromodels',
            'astromodels/functions',
            'astromodels/tests',
            'astromodels/sources',
            'astromodels/utils',
            'astromodels/xspec'
            ]

# Check whether we can compile Xspec support
ext_modules_configuration = setup_xspec()

setup(
    name="astromodels",

    packages=packages,

    data_files=[('astromodels/data/functions', glob.glob('astromodels/data/functions/*.yaml'))],

    version='0.1',

    description="Astromodels contains models to be used in likelihood or Bayesian analysis in astronomy",

    author='Giacomo Vianello',

    author_email='giacomo.vianello@gmail.com',

    url='https://github.com/giacomov/astromodels',

    download_url='https://github.com/giacomov/astromodels/archive/v0.1',

    keywords=['Likelihood', 'Models', 'fit'],

    classifiers=[],

    install_requires=[
        'numpy >= 1.6',
        'PyYAML',
        'astropy >= 1.0',
        'scipy>=0.13',
        # The new version of numdifftools require a bunch of
        # new versions (for example a new numpy)
        'numdifftools==0.7.7'],

    ext_modules=ext_modules_configuration

)
<|endoftext|>


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

try:
    from setuptools import setup, Extension
except ImportError:
    raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools")

from Cython.Build import cythonize

install_requires = ['fastcluster',
                    'dedupe-hcluster',
                    'affinegap>=1.3',
                    'categorical-distance>=1.9',
                    'dedupe-variable-datetime',
                    'rlr>=2.4.3',
                    'numpy>=1.13',
                    'doublemetaphone',
                    'highered>=0.2.0',
                    'simplecosine>=1.2',
                    'haversine>=0.4.1',
                    'BTrees>=4.1.4',
                    'zope.index',
                    'Levenshtein_search',
                    'typing_extensions']

setup(
    name='dedupe',
    url='https://github.com/dedupeio/dedupe',
    version='2.0.6',
    author='Forest Gregg',
    author_email='fgregg@datamade.us',
    description='A python library for accurate and scaleable data deduplication and entity-resolution',
    packages=['dedupe', 'dedupe.variables'],
    ext_modules=cythonize([Extension('dedupe.cpredicates', ['dedupe/cpredicates.pyx'])]),
    install_requires=install_requires,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Programming Language :: Cython',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Information Analysis'],
    long_description="""
    dedupe is a library that uses machine learning to perform de-duplication and entity resolution quickly on structured data. dedupe is the open source engine for `dedupe.io <https://dedupe.io>`_

    **dedupe** will help you:

    * **remove duplicate entries** from a spreadsheet of names and addresses
    * **link a list** with customer information to another with order history, even without unique customer id's
    * take a database of campaign contributions and **figure out which ones were made by the same person**, even if the names were entered slightly differently for each record

    dedupe takes in human training data and comes up with the best rules for your dataset to quickly and automatically find similar records, even with very large databases.
    """,  # noqa: E501
    project_urls={
        "Issues": "https://github.com/dedupeio/dedupe/issues",
        "Documentation": "https://docs.dedupe.io/en/latest/",
        "Examples": "https://github.com/dedupeio/dedupe-examples",
        "Twitter": "https://twitter.com/DedupeIo",
        "Changelog": "https://github.com/dedupeio/dedupe/blob/master/CHANGELOG.md",
        "Mailing List": "https://groups.google.com/forum/#!forum/open-source-deduplication",
    }
)
<commit_msg>bump version<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

try:
    from setuptools import setup, Extension
except ImportError:
    raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools")

from Cython.Build import cythonize

install_requires = ['fastcluster',
                    'dedupe-hcluster',
                    'affinegap>=1.3',
                    'categorical-distance>=1.9',
                    'dedupe-variable-datetime',
                    'rlr>=2.4.3',
                    'numpy>=1.13',
                    'doublemetaphone',
                    'highered>=0.2.0',
                    'simplecosine>=1.2',
                    'haversine>=0.4.1',
                    'BTrees>=4.1.4',
                    'zope.index',
                    'Levenshtein_search',
                    'typing_extensions']

setup(
    name='dedupe',
    url='https://github.com/dedupeio/dedupe',
    version='2.0.7',
    author='Forest Gregg',
    author_email='fgregg@datamade.us',
    description='A python library for accurate and scaleable data deduplication and entity-resolution',
    packages=['dedupe', 'dedupe.variables'],
    ext_modules=cythonize([Extension('dedupe.cpredicates', ['dedupe/cpredicates.pyx'])]),
    install_requires=install_requires,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Programming Language :: Cython',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Information Analysis'],
    long_description="""
    dedupe is a library that uses machine learning to perform de-duplication and entity resolution quickly on structured data. dedupe is the open source engine for `dedupe.io <https://dedupe.io>`_

    **dedupe** will help you:

    * **remove duplicate entries** from a spreadsheet of names and addresses
    * **link a list** with customer information to another with order history, even without unique customer id's
    * take a database of campaign contributions and **figure out which ones were made by the same person**, even if the names were entered slightly differently for each record

    dedupe takes in human training data and comes up with the best rules for your dataset to quickly and automatically find similar records, even with very large databases.
    """,  # noqa: E501
    project_urls={
        "Issues": "https://github.com/dedupeio/dedupe/issues",
        "Documentation": "https://docs.dedupe.io/en/latest/",
        "Examples": "https://github.com/dedupeio/dedupe-examples",
        "Twitter": "https://twitter.com/DedupeIo",
        "Changelog": "https://github.com/dedupeio/dedupe/blob/master/CHANGELOG.md",
        "Mailing List": "https://groups.google.com/forum/#!forum/open-source-deduplication",
    }
)
<|endoftext|>