<commit_before>from setuptools import setup, find_packages
import os

version = '0.6.2.dev0'

setup(
    name='touchdown',
    version=version,
    url="http://yaybu.com/",
    description="Orchestration and configuration management in Python",
    long_description = open("README.rst").read(),
    author="Isotoma Limited",
    author_email="support@isotoma.com",
    license="Apache Software License",
    classifiers = [
        "Intended Audience :: System Administrators",
        "Operating System :: POSIX",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
    ],
    packages=find_packages(exclude=['ez_setup']),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'six',
        'contextlib2',
        'netaddr',
        'fuselage>=0.0.10',
        'botocore>=1.3.20',
        'progressbar2>=3.0.0',
        'requests',
        'python-gnupg',
    ],
    entry_points='''
        [console_scripts]
        touchdown = touchdown.core.main:main
    ''',
)
<commit_msg>Pin botocore in setup.py<commit_after>from setuptools import setup, find_packages
import os

version = '0.6.2.dev0'

setup(
    name='touchdown',
    version=version,
    url="http://yaybu.com/",
    description="Orchestration and configuration management in Python",
    long_description = open("README.rst").read(),
    author="Isotoma Limited",
    author_email="support@isotoma.com",
    license="Apache Software License",
    classifiers = [
        "Intended Audience :: System Administrators",
        "Operating System :: POSIX",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
    ],
    packages=find_packages(exclude=['ez_setup']),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'six',
        'contextlib2',
        'netaddr',
        'fuselage>=0.0.10',
        'botocore>=1.3.23',
        'progressbar2>=3.0.0',
        'requests',
        'python-gnupg',
    ],
    entry_points='''
        [console_scripts]
        touchdown = touchdown.core.main:main
    ''',
)
<|endoftext|>


<commit_before>import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
    'pyramid',
    'SQLAlchemy',
    'transaction',
    'pyramid_tm',
    'pyramid_debugtoolbar',
    'zope.sqlalchemy',
    'waitress',
    ]

setup(name='prism_core',
      version='0.0',
      description='prism_core',
      long_description=README + '\n\n' + CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pyramid",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='',
      author_email='',
      url='',
      keywords='web wsgi bfg pylons pyramid',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      test_suite='prism_core',
      install_requires=requires,
      entry_points="""\
      [paste.app_factory]
      main = prism_core:main
      [console_scripts]
      initialize_prism_core_db = prism_core.scripts.initializedb:main
      """,
      )
<commit_msg>update author info<commit_after>import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
    'pyramid',
    'SQLAlchemy',
    'transaction',
    'pyramid_tm',
    'pyramid_debugtoolbar',
    'zope.sqlalchemy',
    'waitress',
    ]

setup(name='prism_core',
      version='0.0',
      description='prism_core',
      long_description=README + '\n\n' + CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pyramid",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='Elliot Peele',
      author_email='elliot@bentlogic.net',
      url='',
      keywords='web wsgi bfg pylons pyramid',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      test_suite='prism_core',
      install_requires=requires,
      entry_points="""\
      [paste.app_factory]
      main = prism_core:main
      [console_scripts]
      initialize_prism_core_db = prism_core.scripts.initializedb:main
      """,
      )
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='ChannelWorm',
    packages=[
        'channelworm',
        'channelworm.ion_channel',
        'channelworm.digitizer',
        'channelworm.web_app',
        'channelworm.fitter'
    ],
    long_description=open('README.md').read(),
    install_requires=[
        'inspyred',
        'sqlparse',
        'python-unicodecsv',
        'pillow',
        'pytest',
        'pytest-django',
    ]
)
<commit_msg>Fixing setup file<commit_after>from setuptools import setup

setup(
    name='ChannelWorm',
    packages=[
        'channelworm',
        'channelworm.ion_channel',
        'channelworm.digitizer',
        'channelworm.web_app',
        'channelworm.fitter'
    ],
    long_description=open('README.md').read(),
    install_requires=[
        'inspyred',
        'sqlparse',
        'unicodecsv',
        'pillow',
        'pytest',
        'pytest-django',
    ]
)
<|endoftext|>


<commit_before>#!/usr/bin/python

# python setup.py sdist --format=zip,gztar

from setuptools import setup
import os
import sys
import platform
import imp

version = imp.load_source('version', 'lib/version.py')
util = imp.load_source('util', 'lib/util.py')

if sys.version_info[:3] < (2, 6, 0):
    sys.exit("Error: Electrum requires Python version >= 2.6.0...")

usr_share = util.usr_share_dir()
if not os.access(usr_share, os.W_OK):
    try:
        os.mkdir(usr_share)
    except:
        sys.exit("Error: cannot write to %s.\nIf you do not have root permissions, you may install Electrum in a virtualenv.\nAlso, please note that you can run Electrum without installing it on your system."%usr_share)

data_files = []
if (len(sys.argv) > 1 and (sys.argv[1] == "sdist")) or (platform.system() != 'Windows' and platform.system() != 'Darwin'):
    print "Including all files"
    data_files += [
        (os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
        (os.path.join(usr_share, 'app-install', 'icons/'), ['icons/electrum.png'])
    ]
    if not os.path.exists('locale'):
        os.mkdir('locale')
    for lang in os.listdir('locale'):
        if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo' % lang):
            data_files.append((os.path.join(usr_share, 'locale/%s/LC_MESSAGES' % lang), ['locale/%s/LC_MESSAGES/electrum.mo' % lang]))

appdata_dir = os.path.join(usr_share, "electrum")

data_files += [
    (appdata_dir, ["data/README"]),
    (os.path.join(appdata_dir, "cleanlook"), [
        "data/cleanlook/name.cfg",
        "data/cleanlook/style.css"
    ]),
    (os.path.join(appdata_dir, "sahara"), [
        "data/sahara/name.cfg",
        "data/sahara/style.css"
    ]),
    (os.path.join(appdata_dir, "dark"), [
        "data/dark/name.cfg",
        "data/dark/style.css"
    ])
]

for lang in os.listdir('data/wordlist'):
    data_files.append((os.path.join(appdata_dir, 'wordlist'), ['data/wordlist/%s' % lang]))

setup(
    name="Electrum",
    version=version.ELECTRUM_VERSION,
    install_requires=[
        'slowaes',
        'ecdsa>=0.9',
        'pbkdf2',
        'requests',
        'pyasn1',
        'pyasn1-modules',
        'qrcode',
        'SocksiPy-branch',
        'tlslite'
    ],
    package_dir={
        'electrum': 'lib',
        'electrum_gui': 'gui',
        'electrum_plugins': 'plugins',
    },
    scripts=['electrum'],
    data_files=data_files,
    py_modules=[
        'electrum.account',
        'electrum.bitcoin',
        'electrum.blockchain',
        'electrum.bmp',
        'electrum.commands',
        'electrum.daemon',
        'electrum.i18n',
        'electrum.interface',
        'electrum.mnemonic',
        'electrum.msqr',
        'electrum.network',
        'electrum.network_proxy',
        'electrum.old_mnemonic',
        'electrum.paymentrequest',
        'electrum.paymentrequest_pb2',
        'electrum.plugins',
        'electrum.qrscanner',
        'electrum.simple_config',
        'electrum.synchronizer',
        'electrum.transaction',
        'electrum.util',
        'electrum.verifier',
        'electrum.version',
        'electrum.wallet',
        'electrum.x509',
        'electrum_gui.gtk',
        'electrum_gui.qt.__init__',
        'electrum_gui.qt.amountedit',
        'electrum_gui.qt.console',
        'electrum_gui.qt.history_widget',
        'electrum_gui.qt.icons_rc',
        'electrum_gui.qt.installwizard',
        'electrum_gui.qt.lite_window',
        'electrum_gui.qt.main_window',
        'electrum_gui.qt.network_dialog',
        'electrum_gui.qt.password_dialog',
        'electrum_gui.qt.paytoedit',
        'electrum_gui.qt.qrcodewidget',
        'electrum_gui.qt.qrtextedit',
        'electrum_gui.qt.receiving_widget',
        'electrum_gui.qt.seed_dialog',
        'electrum_gui.qt.transaction_dialog',
        'electrum_gui.qt.util',
        'electrum_gui.qt.version_getter',
        'electrum_gui.stdio',
        'electrum_gui.text',
        'electrum_plugins.btchipwallet',
        'electrum_plugins.coinbase_buyback',
        'electrum_plugins.cosigner_pool',
        'electrum_plugins.exchange_rate',
        'electrum_plugins.greenaddress_instant',
        'electrum_plugins.labels',
        'electrum_plugins.trezor',
        'electrum_plugins.virtualkeyboard',
        'electrum_plugins.plot',

    ],
    description="Lightweight Bitcoin Wallet",
    author="Thomas Voegtlin",
    author_email="thomasv1@gmx.de",
    license="GNU GPLv3",
    url="https://electrum.org",
    long_description="""Lightweight Bitcoin Wallet"""
)
<commit_msg>add missing electrum_gui.qt.qrwindow to setup.py<commit_after>#!/usr/bin/python

# python setup.py sdist --format=zip,gztar

from setuptools import setup
import os
import sys
import platform
import imp

version = imp.load_source('version', 'lib/version.py')
util = imp.load_source('util', 'lib/util.py')

if sys.version_info[:3] < (2, 6, 0):
    sys.exit("Error: Electrum requires Python version >= 2.6.0...")

usr_share = util.usr_share_dir()
if not os.access(usr_share, os.W_OK):
    try:
        os.mkdir(usr_share)
    except:
        sys.exit("Error: cannot write to %s.\nIf you do not have root permissions, you may install Electrum in a virtualenv.\nAlso, please note that you can run Electrum without installing it on your system."%usr_share)

data_files = []
if (len(sys.argv) > 1 and (sys.argv[1] == "sdist")) or (platform.system() != 'Windows' and platform.system() != 'Darwin'):
    print "Including all files"
    data_files += [
        (os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
        (os.path.join(usr_share, 'app-install', 'icons/'), ['icons/electrum.png'])
    ]
    if not os.path.exists('locale'):
        os.mkdir('locale')
    for lang in os.listdir('locale'):
        if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo' % lang):
            data_files.append((os.path.join(usr_share, 'locale/%s/LC_MESSAGES' % lang), ['locale/%s/LC_MESSAGES/electrum.mo' % lang]))

appdata_dir = os.path.join(usr_share, "electrum")

data_files += [
    (appdata_dir, ["data/README"]),
    (os.path.join(appdata_dir, "cleanlook"), [
        "data/cleanlook/name.cfg",
        "data/cleanlook/style.css"
    ]),
    (os.path.join(appdata_dir, "sahara"), [
        "data/sahara/name.cfg",
        "data/sahara/style.css"
    ]),
    (os.path.join(appdata_dir, "dark"), [
        "data/dark/name.cfg",
        "data/dark/style.css"
    ])
]

for lang in os.listdir('data/wordlist'):
    data_files.append((os.path.join(appdata_dir, 'wordlist'), ['data/wordlist/%s' % lang]))

setup(
    name="Electrum",
    version=version.ELECTRUM_VERSION,
    install_requires=[
        'slowaes',
        'ecdsa>=0.9',
        'pbkdf2',
        'requests',
        'pyasn1',
        'pyasn1-modules',
        'qrcode',
        'SocksiPy-branch',
        'tlslite'
    ],
    package_dir={
        'electrum': 'lib',
        'electrum_gui': 'gui',
        'electrum_plugins': 'plugins',
    },
    scripts=['electrum'],
    data_files=data_files,
    py_modules=[
        'electrum.account',
        'electrum.bitcoin',
        'electrum.blockchain',
        'electrum.bmp',
        'electrum.commands',
        'electrum.daemon',
        'electrum.i18n',
        'electrum.interface',
        'electrum.mnemonic',
        'electrum.msqr',
        'electrum.network',
        'electrum.network_proxy',
        'electrum.old_mnemonic',
        'electrum.paymentrequest',
        'electrum.paymentrequest_pb2',
        'electrum.plugins',
        'electrum.qrscanner',
        'electrum.simple_config',
        'electrum.synchronizer',
        'electrum.transaction',
        'electrum.util',
        'electrum.verifier',
        'electrum.version',
        'electrum.wallet',
        'electrum.x509',
        'electrum_gui.gtk',
        'electrum_gui.qt.__init__',
        'electrum_gui.qt.amountedit',
        'electrum_gui.qt.console',
        'electrum_gui.qt.history_widget',
        'electrum_gui.qt.icons_rc',
        'electrum_gui.qt.installwizard',
        'electrum_gui.qt.lite_window',
        'electrum_gui.qt.main_window',
        'electrum_gui.qt.network_dialog',
        'electrum_gui.qt.password_dialog',
        'electrum_gui.qt.paytoedit',
        'electrum_gui.qt.qrcodewidget',
        'electrum_gui.qt.qrtextedit',
        'electrum_gui.qt.qrwindow',
        'electrum_gui.qt.receiving_widget',
        'electrum_gui.qt.seed_dialog',
        'electrum_gui.qt.transaction_dialog',
        'electrum_gui.qt.util',
        'electrum_gui.qt.version_getter',
        'electrum_gui.stdio',
        'electrum_gui.text',
        'electrum_plugins.btchipwallet',
        'electrum_plugins.coinbase_buyback',
        'electrum_plugins.cosigner_pool',
        'electrum_plugins.exchange_rate',
        'electrum_plugins.greenaddress_instant',
        'electrum_plugins.labels',
        'electrum_plugins.trezor',
        'electrum_plugins.virtualkeyboard',
        'electrum_plugins.plot',

    ],
    description="Lightweight Bitcoin Wallet",
    author="Thomas Voegtlin",
    author_email="thomasv1@gmx.de",
    license="GNU GPLv3",
    url="https://electrum.org",
    long_description="""Lightweight Bitcoin Wallet"""
)
<|endoftext|>


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

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

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

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

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

if __name__ == '__main__':
    run_setup()
<commit_msg>PEP8: fit docstring summary on a single line<commit_after>#!/usr/bin/env python
"""Installation script."""
import logging
from setuptools import setup
# inline:
# import git

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

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

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

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

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


<commit_before>from distutils.core import setup

setup(
    name = "summary",
    packages = ["summary"],
    version = "0.2.0",
    install_requires = ["chardet", "lxml==2.3.5", "nltk", "numpy", "networkx"],
    description = "Extractor to get main content from the web page.",
    author = "Satoshi Okami",
    author_email = "me.after.12am@gmail.com",
    url = "https://github.com/after12am/summary",
    download_url = "https://github.com/after12am/summary/archive/master.zip",
    keywords = ["summary", "extract", "scraping", "web"],
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Development Status :: 4 - Beta",
        "Operating System :: MacOS",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Internet"
    ],
    long_description = """\

Extractor to get main content from the web page.
 - title
 - body
 - candidates of main image

Install
   sudo easy_install "summary==0.1.1"

Usages
   visit at https://github.com/after12am/summary
"""
)<commit_msg>added LICENSE info to setup.py<commit_after>from distutils.core import setup

setup(
    name = "summary",
    packages = ["summary"],
    version = "0.2.0",
    install_requires = ["chardet", "lxml==2.3.5", "nltk", "numpy", "networkx"],
    description = "Extractor to get main content from the web page.",
    author = "Satoshi Okami",
    author_email = "me.after.12am@gmail.com",
    license = "MIT License",
    url = "https://github.com/after12am/summary",
    download_url = "https://github.com/after12am/summary/archive/master.zip",
    keywords = ["summary", "extract", "scraping", "web"],
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: MIT License",
        "Development Status :: 4 - Beta",
        "Operating System :: MacOS",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Internet"
    ],
    long_description = """\

Extractor to get main content from the web page.
 - title
 - body
 - candidates of main image

Install
   sudo easy_install "summary==0.1.1"

Usages
   visit at https://github.com/after12am/summary
"""
)<|endoftext|>


<commit_before>import sys

from setuptools import setup, Extension

def has_option(name):
    try:
        sys.argv.remove('--%s' % name)
        return True
    except ValueError:
        return False

USE_CYTHON = has_option('cython')

ext = '.pyx' if USE_CYTHON else '.c'

extensions = [
    Extension('contracts.abc', ['contracts/abc'+ext]),
    Extension('contracts.contract', ['contracts/contract'+ext]),
    Extension('contracts.exceptions', ['contracts/exceptions'+ext]),
    Extension('contracts.fields', ['contracts/fields'+ext]),
    Extension('contracts.validators', ['contracts/validators'+ext]),
    Extension('contracts.utils', ['contracts/utils'+ext]),
]

if USE_CYTHON:
    from Cython.Build import cythonize
    extensions = cythonize(extensions)

setup(
    name='contracts',
    version='0.1',
    packages=['contracts'],
    install_requires=['ciso8601'],
    ext_modules=extensions
)
<commit_msg>Add missing timezone.pyx file<commit_after>import sys

from setuptools import setup, Extension

def has_option(name):
    try:
        sys.argv.remove('--%s' % name)
        return True
    except ValueError:
        return False

USE_CYTHON = has_option('cython')

ext = '.pyx' if USE_CYTHON else '.c'

extensions = [
    Extension('contracts.abc', ['contracts/abc'+ext]),
    Extension('contracts.contract', ['contracts/contract'+ext]),
    Extension('contracts.exceptions', ['contracts/exceptions'+ext]),
    Extension('contracts.fields', ['contracts/fields'+ext]),
    Extension('contracts.timezone', ['contracts/timezone'+ext]),
    Extension('contracts.validators', ['contracts/validators'+ext]),
    Extension('contracts.utils', ['contracts/utils'+ext]),
]

if USE_CYTHON:
    from Cython.Build import cythonize
    extensions = cythonize(extensions)

setup(
    name='contracts',
    version='0.1',
    packages=['contracts'],
    install_requires=['ciso8601'],
    ext_modules=extensions
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# flake8: noqa
from __future__ import unicode_literals

import codecs
import re

from setuptools import setup, find_packages

RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$')

PYPI_RST_FILTERS = (
    # Replace code-blocks
    (r'\.\.\s? code-block::\s*(\w|\+)+',  '::'),
    # Remove all badges
    (r'\.\. image:: .*', ''),
    (r'    :target: .*', ''),
    (r'    :alt: .*', ''),
)

def rst(filename):
    '''
    Load rst file and sanitize it for PyPI.
    Remove unsupported github tags:
     - code-block directive
     - all badges
    '''
    content = codecs.open(filename, encoding='utf-8').read()
    for regex, replacement in PYPI_RST_FILTERS:
        content = re.sub(regex, replacement, content)
    return content

long_description = '\n'.join((
    rst('README.rst'),
    rst('CHANGELOG.rst'),
    ''
))

# Import metadatas
exec(compile(open('minibench/__about__.py').read(),
             'minibench/__about__.py', 'exec'))

tests_require = ['nose', 'rednose', 'markdown', 'docutils']
install_requires = ['click', 'six']

setup(
    name='minibench',
    version=__version__,
    description=__description__,
    long_description=long_description,
    url=__url__,
    author=__author__,
    author_email=__email__,
    packages=find_packages(),
    include_package_data=True,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require={
        'test': tests_require,
    },
    entry_points={
        'console_scripts': [
            'bench = minibench.cli:cli',
        ]
    },
    license='MIT',
    zip_safe=False,
    keywords='benchmark test development reporting performance',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Operating System :: OS Independent',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',
        'Topic :: System :: Benchmark',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'License :: OSI Approved :: MIT License',
    ],
)
<commit_msg>Added dev requirements<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# flake8: noqa
from __future__ import unicode_literals

import codecs
import re

from setuptools import setup, find_packages

RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$')

PYPI_RST_FILTERS = (
    # Replace code-blocks
    (r'\.\.\s? code-block::\s*(\w|\+)+',  '::'),
    # Remove all badges
    (r'\.\. image:: .*', ''),
    (r'    :target: .*', ''),
    (r'    :alt: .*', ''),
)

def rst(filename):
    '''
    Load rst file and sanitize it for PyPI.
    Remove unsupported github tags:
     - code-block directive
     - all badges
    '''
    content = codecs.open(filename, encoding='utf-8').read()
    for regex, replacement in PYPI_RST_FILTERS:
        content = re.sub(regex, replacement, content)
    return content

long_description = '\n'.join((
    rst('README.rst'),
    rst('CHANGELOG.rst'),
    ''
))

# Import metadatas
exec(compile(open('minibench/__about__.py').read(),
             'minibench/__about__.py', 'exec'))

tests_require = ['nose', 'rednose', 'markdown', 'docutils']
install_requires = ['click', 'six']
dev_requires = ['invoke', 'tox', 'flake8', 'sphinx']

setup(
    name='minibench',
    version=__version__,
    description=__description__,
    long_description=long_description,
    url=__url__,
    author=__author__,
    author_email=__email__,
    packages=find_packages(),
    include_package_data=True,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require={
        'test': tests_require,
        'dev': dev_requires,
    },
    entry_points={
        'console_scripts': [
            'bench = minibench.cli:cli',
        ]
    },
    license='MIT',
    zip_safe=False,
    keywords='benchmark test development reporting performance',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Operating System :: OS Independent',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',
        'Topic :: System :: Benchmark',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'License :: OSI Approved :: MIT License',
    ],
)
<|endoftext|>


<commit_before>#
# Kivy - Crossplatform NUI toolkit
# http://kivy.org/
#

import sys
from copy import deepcopy
from os.path import join, dirname, sep, exists
from os import walk, environ
from distutils.core import setup
from distutils.extension import Extension

# -----------------------------------------------------------------------------
# Detect options
#
c_options = {
    'use_opengl_es2': True,
    'use_opengl_debug': False,
    'use_glew': False,
    'use_mesagl': 'USE_MESAGL' in environ}

# -----------------------------------------------------------------------------
# Determine on which platform we are

platform = sys.platform

# Detect Python for android project (http://github.com/kivy/python-for-android)
ndkplatform = environ.get('NDKPLATFORM')
if ndkplatform is not None and environ.get('LIBLINK'):
    platform = 'android'

# -----------------------------------------------------------------------------
# Cython check
try:
    # check for cython
    from Cython.Distutils import build_ext
    have_cython = True
except ImportError:
    if platform != 'android':
        print '\nCython is missing, its required for compiling kivy !\n\n'
        raise
    # on python-for-android, cython usage is external
    have_cython = False
    from distutils.command.build_ext import build_ext

# -----------------------------------------------------------------------------
# Setup classes
class KivyBuildExt(build_ext):

    def build_extensions(self):
        print 'Build configuration is:'
        for opt, value in c_options.iteritems():
            print ' *', opt, ' = ', repr(value)
        print 'Generate config.h'
        config_h = join(dirname(__file__), 'kivy', 'graphics', 'config.h')
        with open(config_h, 'w') as fd:
            fd.write('// Autogenerated file for Kivy C configuration\n')
            for k, v in c_options.iteritems():
                fd.write('#define __%s %d\n' % (k.upper(), int(v)))

        print 'Generate config.pxi'
        config_pxi = join(dirname(__file__), 'kivy', 'graphics', 'config.pxi')
        with open(config_pxi, 'w') as fd:
            fd.write('# Autogenerated file for Kivy Cython configuration\n')
            for k, v in c_options.iteritems():
                fd.write('DEF %s = %d\n' % (k.upper(), int(v)))

        build_ext.build_extensions(self)

# -----------------------------------------------------------------------------
# extract version (simulate doc generation, kivy will be not imported)
environ['KIVY_DOC_INCLUDE'] = '1'
import kivy

# extra build commands go in the cmdclass dict {'command-name': CommandClass}
# see tools.packaging.{platform}.build.py for custom build commands for
# portable packages.  also e.g. we use build_ext command from cython if its
# installed for c extensions.
from kivy.tools.packaging.factory import FactoryBuild
cmdclass = {
    'build_factory': FactoryBuild,
    'build_ext': KivyBuildExt }

try:
    # add build rules for portable packages to cmdclass
    if platform == 'win32':
        from kivy.tools.packaging.win32.build import WindowsPortableBuild
        cmdclass['build_portable'] = WindowsPortableBuild
    elif platform == 'darwin':
        from kivy.tools.packaging.osx.build import OSXPortableBuild
        cmdclass['build_portable'] = OSXPortableBuild
except ImportError:
    print 'User distribution detected, avoid portable command.'

# Detect which opengl version headers to use
if platform in ('android', 'darwin'):
    pass
elif platform == 'win32':
    print 'Windows platform detected, force GLEW usage.'
    c_options['use_glew'] = True
else:
    # searching GLES headers
    default_header_dirs = ['/usr/include', '/usr/local/include']
    found = False
    for hdir in default_header_dirs:
        filename = join(hdir, 'GLES2', 'gl2.h')
        if exists(filename):
            found = True
            print 'Found GLES 2.0 headers at', filename
            break
    if not found:
        print 'WARNING: GLES 2.0 headers are not found'
        print 'Fallback to Desktop opengl headers.'
        c_options['use_opengl_es2'] = False

# -----------------------------------------------------------------------------
# declare flags
def get_modulename_from_file(filename):
    pyx = '.'.join(filename.split('.')[:-1])
    pyxl = pyx.split(sep)
    while pyxl[0] != 'kivy':
        pyxl.pop(0)
    if pyxl[1] == 'kivy':
        pyxl.pop(0)
    return '.'.join(pyxl)

class CythonExtension(Extension):

    def __init__(self, *args, **kwargs):
        Extension.__init__(self, *args, **kwargs)
        self.pyrex_directives = {
            'profile': 'USE_PROFILE' in environ,
            'embedsignature': True}
        # XXX with pip, setuptools is imported before distutils, and change
        # our pyx to c, then, cythonize doesn't happen. So force again our
        # sources
        self.sources = args[1]

def merge(d1, *args):
    d1 = deepcopy(d1)
    for d2 in args:
        for key, value in d2.iteritems():
            if key in d1:
                d1[key].extend(value)
            else:
                d1[key] = value
    return d1

def determine_gl_flags():
    flags = {'libraries': []}
    if platform == 'win32':
        flags['libraries'] = ['opengl32']
    elif platform == 'darwin':
        flags['extra_link_args'] = ['-framework', 'OpenGL', '-arch', 'x86_64']
        flags['extra_compile_args'] = ['-arch', 'x86_64']
    elif platform.startswith('freebsd'):
        flags['include_dirs'] = ['/usr/local/include']
        flags['extra_link_args'] = ['-L', '/usr/local/lib']
    elif platform == 'android':
        flags['include_dirs'] += [join(ndkplatform, 'usr', 'include')]
        flags['extra_link_args'] += ['-L', join(ndkplatform, 'usr', 'lib')]
        flags['libraries'] = ['GLESv2']
    else:
        flags['libraries'] = ['GL']
    if c_options['use_glew']:
        if platform == 'win32':
            flags['libraries'] += ['glew32']
        else:
            flags['libraries'] += ['GLEW']
    return flags

def determine_graphics_pxd():
    flags = {'depends': [join(dirname(__file__), 'kivy', x) for x in [
        'graphics/buffer.pxd',
        'graphics/c_opengl.pxd',
        'graphics/c_opengl_debug.pxd',
        'graphics/compiler.pxd',
        'graphics/context_instructions.pxd',
        'graphics/fbo.pxd',
        'graphics/instructions.pxd',
        'graphics/opengl_utils.pxd',
        'graphics/shader.pxd',
        'graphics/texture.pxd',
        'graphics/transformation.pxd',
        'graphics/vbo.pxd',
        'graphics/vertex.pxd']]}
    return flags

base_flags = {
    'libraries': ['m'],
    'include_dirs': [],
    'extra_links_args': [],
    'extra_compile_args': []}

gl_flags = determine_gl_flags()
graphics_flags = determine_graphics_pxd()

# -----------------------------------------------------------------------------
# sources to compile
sources = {
    '_event.pyx': base_flags,
    'properties.pyx': base_flags,
    'graphics/buffer.pyx': base_flags,
    'graphics/c_opengl_debug.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/compiler.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/context_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/fbo.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/opengl.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/opengl_utils.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/shader.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/stencil_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/texture.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/transformation.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vbo.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vertex.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vertex_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
}

# -----------------------------------------------------------------------------
# extension modules
def get_extensions_from_sources(sources):
    ext_modules = []
    for pyx, flags in sources.iteritems():
        pyx = join(dirname(__file__), 'kivy', pyx)
        if not have_cython:
            pyx = '%s.c' % pyx[:-4]
        module_name = get_modulename_from_file(pyx)
        depends = flags.pop('depends', [])
        flags_clean = {}
        for key, value in flags.iteritems():
            if len(value):
                flags_clean[key] = value
        ext_modules.append(CythonExtension(module_name,
            [pyx] + depends, **flags_clean))
    return ext_modules

ext_modules = get_extensions_from_sources(sources)

# -----------------------------------------------------------------------------
# automatically detect data files
data_file_prefix = 'share/kivy-'
examples = {}
examples_allowed_ext = ('readme', 'py', 'wav', 'png', 'jpg', 'svg', 'json',
                        'avi', 'gif', 'txt', 'ttf', 'obj', 'mtl', 'kv')
for root, subFolders, files in walk('examples'):
    for fn in files:
        ext = fn.split('.')[-1].lower()
        if ext not in examples_allowed_ext:
            continue
        filename = join(root, fn)
        directory = '%s%s' % (data_file_prefix, dirname(filename))
        if not directory in examples:
            examples[directory] = []
        examples[directory].append(filename)

# -----------------------------------------------------------------------------
# setup !
setup(
    name='Kivy',
    version=kivy.__version__,
    author='Kivy Crew',
    author_email='kivy-dev@googlegroups.com',
    url='http://kivy.org/',
    license='LGPL',
    description='A software library for rapid development of ' + \
                'hardware-accelerated multitouch applications.',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    packages=[
        'kivy',
        'kivy.core',
        'kivy.core.audio',
        'kivy.core.camera',
        'kivy.core.clipboard',
        'kivy.core.image',
        'kivy.core.gl',
        'kivy.core.spelling',
        'kivy.core.text',
        'kivy.core.video',
        'kivy.core.window',
        'kivy.ext',
        'kivy.graphics',
        'kivy.input',
        'kivy.input.postproc',
        'kivy.input.providers',
        'kivy.lib',
        'kivy.lib.osc',
        'kivy.modules',
        'kivy.network',
        'kivy.tools',
        'kivy.tools.packaging',
        'kivy.uix', ],
    package_dir={'kivy': 'kivy'},
    package_data={'kivy': [
        'data/*.kv',
        'data/*.json',
        'data/fonts/*.ttf',
        'data/images/*.png',
        'data/images/*.jpg',
        'data/images/*.gif',
        'data/images/*.atlas',
        'data/keyboards/*.json',
        'data/logo/*.png',
        'data/glsl/*.png',
        'data/glsl/*.vs',
        'data/glsl/*.fs',
        'tools/packaging/README.txt',
        'tools/packaging/win32/kivy.bat',
        'tools/packaging/win32/kivyenv.sh',
        'tools/packaging/win32/README.txt',
        'tools/packaging/osx/kivy.sh']},
    data_files=examples.items(),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: MacOS X',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Information Technology',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: GNU Library or Lesser '
        'General Public License (LGPL)',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: BSD :: FreeBSD',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Artistic Software',
        'Topic :: Games/Entertainment',
        'Topic :: Multimedia :: Graphics :: 3D Rendering',
        'Topic :: Multimedia :: Graphics :: Capture :: Digital Camera',
        'Topic :: Multimedia :: Graphics :: Presentation',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Sound/Audio :: Players :: MP3',
        'Topic :: Multimedia :: Video :: Display',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',
        'Topic :: Scientific/Engineering :: Visualization',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
        'Topic :: Software Development :: User Interfaces'])

<commit_msg>fix window build.<commit_after>#
# Kivy - Crossplatform NUI toolkit
# http://kivy.org/
#

import sys
from copy import deepcopy
from os.path import join, dirname, sep, exists
from os import walk, environ
from distutils.core import setup
from distutils.extension import Extension

# -----------------------------------------------------------------------------
# Detect options
#
c_options = {
    'use_opengl_es2': True,
    'use_opengl_debug': False,
    'use_glew': False,
    'use_mesagl': 'USE_MESAGL' in environ}

# -----------------------------------------------------------------------------
# Determine on which platform we are

platform = sys.platform

# Detect Python for android project (http://github.com/kivy/python-for-android)
ndkplatform = environ.get('NDKPLATFORM')
if ndkplatform is not None and environ.get('LIBLINK'):
    platform = 'android'

# -----------------------------------------------------------------------------
# Cython check
try:
    # check for cython
    from Cython.Distutils import build_ext
    have_cython = True
except ImportError:
    if platform != 'android':
        print '\nCython is missing, its required for compiling kivy !\n\n'
        raise
    # on python-for-android, cython usage is external
    have_cython = False
    from distutils.command.build_ext import build_ext

# -----------------------------------------------------------------------------
# Setup classes
class KivyBuildExt(build_ext):

    def build_extensions(self):
        print 'Build configuration is:'
        for opt, value in c_options.iteritems():
            print ' *', opt, ' = ', repr(value)
        print 'Generate config.h'
        config_h = join(dirname(__file__), 'kivy', 'graphics', 'config.h')
        with open(config_h, 'w') as fd:
            fd.write('// Autogenerated file for Kivy C configuration\n')
            for k, v in c_options.iteritems():
                fd.write('#define __%s %d\n' % (k.upper(), int(v)))

        print 'Generate config.pxi'
        config_pxi = join(dirname(__file__), 'kivy', 'graphics', 'config.pxi')
        with open(config_pxi, 'w') as fd:
            fd.write('# Autogenerated file for Kivy Cython configuration\n')
            for k, v in c_options.iteritems():
                fd.write('DEF %s = %d\n' % (k.upper(), int(v)))

        build_ext.build_extensions(self)

# -----------------------------------------------------------------------------
# extract version (simulate doc generation, kivy will be not imported)
environ['KIVY_DOC_INCLUDE'] = '1'
import kivy

# extra build commands go in the cmdclass dict {'command-name': CommandClass}
# see tools.packaging.{platform}.build.py for custom build commands for
# portable packages.  also e.g. we use build_ext command from cython if its
# installed for c extensions.
from kivy.tools.packaging.factory import FactoryBuild
cmdclass = {
    'build_factory': FactoryBuild,
    'build_ext': KivyBuildExt }

try:
    # add build rules for portable packages to cmdclass
    if platform == 'win32':
        from kivy.tools.packaging.win32.build import WindowsPortableBuild
        cmdclass['build_portable'] = WindowsPortableBuild
    elif platform == 'darwin':
        from kivy.tools.packaging.osx.build import OSXPortableBuild
        cmdclass['build_portable'] = OSXPortableBuild
except ImportError:
    print 'User distribution detected, avoid portable command.'

# Detect which opengl version headers to use
if platform in ('android', 'darwin'):
    pass
elif platform == 'win32':
    print 'Windows platform detected, force GLEW usage.'
    c_options['use_glew'] = True
else:
    # searching GLES headers
    default_header_dirs = ['/usr/include', '/usr/local/include']
    found = False
    for hdir in default_header_dirs:
        filename = join(hdir, 'GLES2', 'gl2.h')
        if exists(filename):
            found = True
            print 'Found GLES 2.0 headers at', filename
            break
    if not found:
        print 'WARNING: GLES 2.0 headers are not found'
        print 'Fallback to Desktop opengl headers.'
        c_options['use_opengl_es2'] = False

# -----------------------------------------------------------------------------
# declare flags
def get_modulename_from_file(filename):
    filename = filename.replace(sep, '/')
    pyx = '.'.join(filename.split('.')[:-1])
    pyxl = pyx.split('/')
    while pyxl[0] != 'kivy':
        pyxl.pop(0)
    if pyxl[1] == 'kivy':
        pyxl.pop(0)
    return '.'.join(pyxl)

class CythonExtension(Extension):

    def __init__(self, *args, **kwargs):
        Extension.__init__(self, *args, **kwargs)
        self.pyrex_directives = {
            'profile': 'USE_PROFILE' in environ,
            'embedsignature': True}
        # XXX with pip, setuptools is imported before distutils, and change
        # our pyx to c, then, cythonize doesn't happen. So force again our
        # sources
        self.sources = args[1]

def merge(d1, *args):
    d1 = deepcopy(d1)
    for d2 in args:
        for key, value in d2.iteritems():
            if key in d1:
                d1[key].extend(value)
            else:
                d1[key] = value
    return d1

def determine_gl_flags():
    flags = {'libraries': []}
    if platform == 'win32':
        flags['libraries'] = ['opengl32']
    elif platform == 'darwin':
        flags['extra_link_args'] = ['-framework', 'OpenGL', '-arch', 'x86_64']
        flags['extra_compile_args'] = ['-arch', 'x86_64']
    elif platform.startswith('freebsd'):
        flags['include_dirs'] = ['/usr/local/include']
        flags['extra_link_args'] = ['-L', '/usr/local/lib']
    elif platform == 'android':
        flags['include_dirs'] += [join(ndkplatform, 'usr', 'include')]
        flags['extra_link_args'] += ['-L', join(ndkplatform, 'usr', 'lib')]
        flags['libraries'] = ['GLESv2']
    else:
        flags['libraries'] = ['GL']
    if c_options['use_glew']:
        if platform == 'win32':
            flags['libraries'] += ['glew32']
        else:
            flags['libraries'] += ['GLEW']
    return flags

def determine_graphics_pxd():
    flags = {'depends': [join(dirname(__file__), 'kivy', x) for x in [
        'graphics/buffer.pxd',
        'graphics/c_opengl.pxd',
        'graphics/c_opengl_debug.pxd',
        'graphics/compiler.pxd',
        'graphics/context_instructions.pxd',
        'graphics/fbo.pxd',
        'graphics/instructions.pxd',
        'graphics/opengl_utils.pxd',
        'graphics/shader.pxd',
        'graphics/texture.pxd',
        'graphics/transformation.pxd',
        'graphics/vbo.pxd',
        'graphics/vertex.pxd']]}
    return flags

base_flags = {
    'libraries': ['m'],
    'include_dirs': [],
    'extra_links_args': [],
    'extra_compile_args': []}

gl_flags = determine_gl_flags()
graphics_flags = determine_graphics_pxd()

# -----------------------------------------------------------------------------
# sources to compile
sources = {
    '_event.pyx': base_flags,
    'properties.pyx': base_flags,
    'graphics/buffer.pyx': base_flags,
    'graphics/c_opengl_debug.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/compiler.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/context_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/fbo.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/opengl.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/opengl_utils.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/shader.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/stencil_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/texture.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/transformation.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vbo.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vertex.pyx': merge(base_flags, gl_flags, graphics_flags),
    'graphics/vertex_instructions.pyx': merge(base_flags, gl_flags, graphics_flags),
}

# -----------------------------------------------------------------------------
# extension modules
def get_extensions_from_sources(sources):
    ext_modules = []
    for pyx, flags in sources.iteritems():
        pyx = join(dirname(__file__), 'kivy', pyx)
        if not have_cython:
            pyx = '%s.c' % pyx[:-4]
        module_name = get_modulename_from_file(pyx)
        depends = flags.pop('depends', [])
        flags_clean = {}
        for key, value in flags.iteritems():
            if len(value):
                flags_clean[key] = value
        ext_modules.append(CythonExtension(module_name,
            [pyx] + depends, **flags_clean))
    return ext_modules

ext_modules = get_extensions_from_sources(sources)

# -----------------------------------------------------------------------------
# automatically detect data files
data_file_prefix = 'share/kivy-'
examples = {}
examples_allowed_ext = ('readme', 'py', 'wav', 'png', 'jpg', 'svg', 'json',
                        'avi', 'gif', 'txt', 'ttf', 'obj', 'mtl', 'kv')
for root, subFolders, files in walk('examples'):
    for fn in files:
        ext = fn.split('.')[-1].lower()
        if ext not in examples_allowed_ext:
            continue
        filename = join(root, fn)
        directory = '%s%s' % (data_file_prefix, dirname(filename))
        if not directory in examples:
            examples[directory] = []
        examples[directory].append(filename)

# -----------------------------------------------------------------------------
# setup !
setup(
    name='Kivy',
    version=kivy.__version__,
    author='Kivy Crew',
    author_email='kivy-dev@googlegroups.com',
    url='http://kivy.org/',
    license='LGPL',
    description='A software library for rapid development of ' + \
                'hardware-accelerated multitouch applications.',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    packages=[
        'kivy',
        'kivy.core',
        'kivy.core.audio',
        'kivy.core.camera',
        'kivy.core.clipboard',
        'kivy.core.image',
        'kivy.core.gl',
        'kivy.core.spelling',
        'kivy.core.text',
        'kivy.core.video',
        'kivy.core.window',
        'kivy.ext',
        'kivy.graphics',
        'kivy.input',
        'kivy.input.postproc',
        'kivy.input.providers',
        'kivy.lib',
        'kivy.lib.osc',
        'kivy.modules',
        'kivy.network',
        'kivy.tools',
        'kivy.tools.packaging',
        'kivy.uix', ],
    package_dir={'kivy': 'kivy'},
    package_data={'kivy': [
        'data/*.kv',
        'data/*.json',
        'data/fonts/*.ttf',
        'data/images/*.png',
        'data/images/*.jpg',
        'data/images/*.gif',
        'data/images/*.atlas',
        'data/keyboards/*.json',
        'data/logo/*.png',
        'data/glsl/*.png',
        'data/glsl/*.vs',
        'data/glsl/*.fs',
        'tools/packaging/README.txt',
        'tools/packaging/win32/kivy.bat',
        'tools/packaging/win32/kivyenv.sh',
        'tools/packaging/win32/README.txt',
        'tools/packaging/osx/kivy.sh']},
    data_files=examples.items(),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: MacOS X',
        'Environment :: Win32 (MS Windows)',
        'Environment :: X11 Applications',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'Intended Audience :: Information Technology',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: GNU Library or Lesser '
        'General Public License (LGPL)',
        'Natural Language :: English',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: BSD :: FreeBSD',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Artistic Software',
        'Topic :: Games/Entertainment',
        'Topic :: Multimedia :: Graphics :: 3D Rendering',
        'Topic :: Multimedia :: Graphics :: Capture :: Digital Camera',
        'Topic :: Multimedia :: Graphics :: Presentation',
        'Topic :: Multimedia :: Graphics :: Viewers',
        'Topic :: Multimedia :: Sound/Audio :: Players :: MP3',
        'Topic :: Multimedia :: Video :: Display',
        'Topic :: Scientific/Engineering :: Human Machine Interfaces',
        'Topic :: Scientific/Engineering :: Visualization',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
        'Topic :: Software Development :: User Interfaces'])

<|endoftext|>


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

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = ['Jinja2',
            'path.py',
            'pkginfo',
            'pyramid',
            'pyramid_debugtoolbar',
            'pyramid_jinja2',
            'requests',
            'pip']

setup(name='CheesePrism',
      version='0.1a1',
      description='CheesePrism',
      long_description=README + '\n\n' +  CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pylons",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='',
      author_email='',
      url='',
      keywords='web pyramid pylons',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      tests_require=requires,
      test_suite="cheeseprism",
      entry_points = """\
      [paste.app_factory]
      main = cheeseprism.wsgiapp:main
      """,
      paster_plugins=['pyramid'],
      )
<commit_msg>add some packaging shmutz<commit_after>from setuptools import find_packages
from setuptools import setup
import os

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = ['Jinja2',
            'path.py',
            'pkginfo',
            'pyramid',
            'pyramid_debugtoolbar',
            'pyramid_jinja2',
            'requests',
            'pip']

setup(name='CheesePrism',
      version='0.1a1',
      description='CheesePrism',
      long_description=README + '\n\n' +  CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pylons",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='Whit Morriss (et al.)',
      author_email='whit-at-surveymonky-dot-com',
      url='https://github.com/SurveyMonkey/CheesePrism',
      keywords='web pyramid pylons',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      tests_require=requires,
      test_suite="cheeseprism",
      entry_points = """\
      [paste.app_factory]
      main = cheeseprism.wsgiapp:main
      """,
      paster_plugins=['pyramid'],
      )
<|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: Generic library for manipulating DFT output, geometries and tight-binding parameter sets"""

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
Intended Audience :: Developers
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Topic :: Software Development
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics
Topic :: Utilities
"""

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

# 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')

def readme():
    if osp.exists('README.md'):
        return open('README.md').read()
    return ""

metadata = dict(
    name='sisl',
    maintainer="Nick R. Papior",
    maintainer_email="nickpapior@gmail.com",
    description="Tight-binding models (interface to NEGF calculator TBtrans) and generic DFT output manipulation",
    long_description="Documentation of sisl may be found here: https://zerothi.github.io/sisl\n\n\n" + readme(),
    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.strip() for _f in CLASSIFIERS.split('\n') if _f],
    platforms=['Unix', 'Linux', 'Mac OS-X', 'Windows'],
    install_requires=build_requires,
    tests_require=['pytest'],
    zip_safe=False,
)

# If pytest is installed, add it to setup_requires
try:
    import pytest
    metadata['setup_requires'] = ['pytest-runner']
except:
    pass

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:
        # Get latest revision tag
        out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
        rev = out.strip().decode('ascii')
        # Get latest tag
        out = _minimal_ext_cmd(['git', 'describe', '--abbrev=0'])
        tag = out.strip().decode('ascii')
        # Get number of commits since tag
        out = _minimal_ext_cmd(['git', 'rev-list', tag + '..', '--count'])
        count = out.strip().decode('ascii')
        if len(count) == 0:
            count = '1'
    except:
        # Retain the revision name
        rev = GIT_REVISION
        # Assume it is on tag
        count = '0'

    return rev, int(count)

def write_version(filename='sisl/info.py'):
    version_str = """# This file is automatically generated from sisl setup.py
released = {released}

# Git information (specific commit, etc.)
git_revision = '{git}'
git_revision_short = git_revision[:7]
git_count = '{count}'

# Version information
major   = {version[0]}
minor   = {version[1]}
micro   = {version[2]}
version = '.'.join(map(str,[major, minor, micro]))
release = version

if not released:
    # Add git-revision to the version string
    version += '+' + git_count

# BibTeX information if people wish to cite
bibtex = '''@misc{{{{zerothi_sisl,
    author = {{{{Papior, Nick R.}}}},
    title  = {{{{sisl: v{{0}}}}}},
    doi    = {{{{10.5281/zenodo.597181}}}},
    url    = {{{{https://doi.org/10.5281/zenodo.597181}}}},
}}}}'''.format(version)

def cite():
    return bibtex
"""
    # If we are in git we try and fetch the
    # git version as well
    GIT_REV, GIT_COUNT = git_version()
    with open(filename, 'w') as fh:
        fh.write(version_str.format(version=[MAJOR, MINOR, MICRO],
                                    released=ISRELEASED,
                                    count=GIT_COUNT,
                                    git=GIT_REV))

if __name__ == '__main__':

    # First figure out if we should define the
    # version file
    try:
        only_idx = sys.argv.index('only-version')
    except:
        only_idx = 0
    if only_idx > 0:
        # Figure out if we should write a specific file
        print("Only creating the version file")
        if len(sys.argv) > only_idx + 1:
            vF = sys.argv[only_idx+1]
            write_version(vF)
        else:
            write_version()
        sys.exit(0)

    try:
        # Create version file
        # if allowed
        write_version()
    except Exception as e:
        print('Could not write sisl/info.py:')
        print(str(e))

    # 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>sisl release: 0.9.2<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: Generic library for manipulating DFT output, geometries and tight-binding parameter sets"""

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
Intended Audience :: Developers
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Topic :: Software Development
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics
Topic :: Utilities
"""

MAJOR = 0
MINOR = 9
MICRO = 2
ISRELEASED = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
GIT_REVISION = "60dcab7b1b345fdcc6573de4df050b37192ee414"

# 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')

def readme():
    if osp.exists('README.md'):
        return open('README.md').read()
    return ""

metadata = dict(
    name='sisl',
    maintainer="Nick R. Papior",
    maintainer_email="nickpapior@gmail.com",
    description="Tight-binding models (interface to NEGF calculator TBtrans) and generic DFT output manipulation",
    long_description="Documentation of sisl may be found here: https://zerothi.github.io/sisl\n\n\n" + readme(),
    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.strip() for _f in CLASSIFIERS.split('\n') if _f],
    platforms=['Unix', 'Linux', 'Mac OS-X', 'Windows'],
    install_requires=build_requires,
    tests_require=['pytest'],
    zip_safe=False,
)

# If pytest is installed, add it to setup_requires
try:
    import pytest
    metadata['setup_requires'] = ['pytest-runner']
except:
    pass

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:
        # Get latest revision tag
        out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
        rev = out.strip().decode('ascii')
        # Get latest tag
        out = _minimal_ext_cmd(['git', 'describe', '--abbrev=0'])
        tag = out.strip().decode('ascii')
        # Get number of commits since tag
        out = _minimal_ext_cmd(['git', 'rev-list', tag + '..', '--count'])
        count = out.strip().decode('ascii')
        if len(count) == 0:
            count = '1'
    except:
        # Retain the revision name
        rev = GIT_REVISION
        # Assume it is on tag
        count = '0'

    return rev, int(count)

def write_version(filename='sisl/info.py'):
    version_str = """# This file is automatically generated from sisl setup.py
released = {released}

# Git information (specific commit, etc.)
git_revision = '{git}'
git_revision_short = git_revision[:7]
git_count = '{count}'

# Version information
major   = {version[0]}
minor   = {version[1]}
micro   = {version[2]}
version = '.'.join(map(str,[major, minor, micro]))
release = version

if not released:
    # Add git-revision to the version string
    version += '+' + git_count

# BibTeX information if people wish to cite
bibtex = '''@misc{{{{zerothi_sisl,
    author = {{{{Papior, Nick R.}}}},
    title  = {{{{sisl: v{{0}}}}}},
    doi    = {{{{10.5281/zenodo.597181}}}},
    url    = {{{{https://doi.org/10.5281/zenodo.597181}}}},
}}}}'''.format(version)

def cite():
    return bibtex
"""
    # If we are in git we try and fetch the
    # git version as well
    GIT_REV, GIT_COUNT = git_version()
    with open(filename, 'w') as fh:
        fh.write(version_str.format(version=[MAJOR, MINOR, MICRO],
                                    released=ISRELEASED,
                                    count=GIT_COUNT,
                                    git=GIT_REV))

if __name__ == '__main__':

    # First figure out if we should define the
    # version file
    try:
        only_idx = sys.argv.index('only-version')
    except:
        only_idx = 0
    if only_idx > 0:
        # Figure out if we should write a specific file
        print("Only creating the version file")
        if len(sys.argv) > only_idx + 1:
            vF = sys.argv[only_idx+1]
            write_version(vF)
        else:
            write_version()
        sys.exit(0)

    try:
        # Create version file
        # if allowed
        write_version()
    except Exception as e:
        print('Could not write sisl/info.py:')
        print(str(e))

    # 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><commit_msg>remove setup.py<commit_after><|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
    name="Pest",
    version="1.0",
    packages = ['pest'],
    scripts=['pest/pester'],
    package_data = {'pest': ['images/*.png'],},
    install_requires=['pyobjc-framework-FSEvents','growl-py'],
    description="Auto tester for python",
    author="Chuck Collins",
    author_email="chuck.collins@gmail.com",
    url="http://github.com/ccollins/pest",
)<commit_msg>update name<commit_after>#!/usr/bin/env python
from setuptools import setup
setup(
    name="pest",
    version="1.0",
    packages = ['pest'],
    scripts=['pest/pester'],
    package_data = {'pest': ['images/*.png'],},
    install_requires=['pyobjc-framework-FSEvents','growl-py'],
    description="Auto tester for python",
    author="Chuck Collins",
    author_email="chuck.collins@gmail.com",
    url="http://github.com/ccollins/pest",
)<|endoftext|>


<commit_before># Install rdflib
from distutils.core import setup
from rdflib import __version__, __date__
from distutils.extension import Extension
from distutils.core import Command

class uninstall(Command):
    description = "uninstall everything by renaming rdflib to 'rdflib-%s' % int(time())"

    user_options = [ ]

    def initialize_options (self):
        pass

    def finalize_options (self):
        pass

    def run (self):
        "Look for and rename rdflib if one has already been installed."
        from distutils.sysconfig import get_python_lib
        from os import rename
        from os.path import join, exists
        from time import time

        lib_dir = get_python_lib()
        rdflib_dir = join(lib_dir, "rdflib")
        if exists(rdflib_dir):
            backup = "%s-%s" % (rdflib_dir, int(time()))
            print "Renaming previously installed rdflib to: \n  %s" % backup
            rename(rdflib_dir, backup)

setup(
    cmdclass={'uninstall': uninstall},
    name = 'rdflib',
    version = __version__,
    description = "RDF library containing an RDF triple store and RDF/XML parser/serializer",
    author = "Daniel 'eikeon' Krech",
    author_email = "eikeon@eikeon.com",
    maintainer = "Daniel 'eikeon' Krech",
    maintainer_email = "eikeon@eikeon.com",
    url = "http://rdflib.net/",
    license = "http://rdflib.net/latest/LICENSE",
    platforms = ["any"],
    classifiers = ["Programming Language :: Python"],
    long_description = "RDF library containing an RDF triple store and RDF/XML parser/serializer",
    download_url = "http://rdflib.net/%s/rdflib-%s.tar.gz" % (__date__, __version__),

    packages = ['rdflib',
                'rdflib.store',
                'rdflib.store.FOPLRelationalModel',
                'rdflib.sparql',
                'rdflib.sparql.bison',
                'rdflib.syntax',
                'rdflib.syntax.serializers',
                'rdflib.syntax.parsers',
                'rdflib.syntax.parsers.n3p'],
     ext_modules = [
        Extension(
            name='rdflib.sparql.bison.SPARQLParserc',
            sources=['src/bison/SPARQLParser.c'],
            ),
        ]

    )

<commit_msg>upgrading to use ez_setup and setuptools<commit_after>from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages

from distutils.extension import Extension

# Install rdflib
from rdflib import __version__, __date__

setup(
    name = 'rdflib',
    version = __version__,
    description = "RDF library containing an RDF triple store and RDF/XML parser/serializer",
    author = "Daniel 'eikeon' Krech",
    author_email = "eikeon@eikeon.com",
    maintainer = "Daniel 'eikeon' Krech",
    maintainer_email = "eikeon@eikeon.com",
    url = "http://rdflib.net/",
    license = "http://rdflib.net/latest/LICENSE",
    platforms = ["any"],
    classifiers = ["Programming Language :: Python"],
    long_description = "RDF library containing an RDF triple store and RDF/XML parser/serializer",
    download_url = "http://rdflib.net/%s/rdflib-%s.tar.gz" % (__date__, __version__),

    packages = find_packages(),

     ext_modules = [
        Extension(
            name='rdflib.sparql.bison.SPARQLParserc',
            sources=['src/bison/SPARQLParser.c'],
            ),
        ]

    )

<|endoftext|>


<commit_before>from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

f = open('README')
desc = f.read()
f.close()

setup(name='timed',
      version='0.1',
      description="command-line time tracking",
      long_description=desc,
      url='http://github.com/adeel/timed',
      download_url='http://github.com/adeel/timed/tarball/master',
      author='Adeel Ahmad Khan',
      author_email='adeel2@umbc.edu',
      py_modules=['timed'],
      entry_points={'console_scripts': ['timed = timed:main']},
)<commit_msg>removed github download url<commit_after>from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

f = open('README')
desc = f.read()
f.close()

setup(name='timed',
      version='0.1',
      description="command-line time tracking",
      long_description=desc,
      url='http://github.com/adeel/timed',
      author='Adeel Ahmad Khan',
      author_email='adeel2@umbc.edu',
      py_modules=['timed'],
      entry_points={'console_scripts': ['timed = timed:main']},
)<|endoftext|>


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

from setuptools import setup
import re
import os
import sys

package = 'rolepermissions'

requirements = [
    'Django>=1.5',
    'django-discover-runner==1.0',
    'six',
]
test_requirements = [
    'model-mommy==1.2.1',
    'mock'
]

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

def get_packages(package):
    """
    Return root package and all sub-packages.
    """
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]

def get_package_data(package):
    """
    Return all files under the root package, that are not in a
    package themselves.
    """
    walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
            for dirpath, dirnames, filenames in os.walk(package)
            if not os.path.exists(os.path.join(dirpath, '__init__.py'))]

    filepaths = []
    for base, filenames in walk:
        filepaths.extend([os.path.join(base, filename)
                          for filename in filenames])
    return {package: filepaths}

# python setup.py register
if sys.argv[-1] == 'publish':
    os.system("python setup.py sdist upload")
    args = {'version': get_version(package)}
    print("You probably want to also tag the version now:")
    print("  git tag -a %(version)s -m 'version %(version)s'" % args)
    print("  git push --tags")
    sys.exit()

setup(
    name='django-role-permissions',
    version=get_version(package),
    url='http://github.com/vintasoftware/django-role-permissions',
    license='MIT',
    description='A django app for role based permissions.',
    author='Filipe Ximenes',
    author_email='filipeximenes@gmail.com',
    packages=get_packages(package),
    package_data=get_package_data(package),
    install_requires=requirements,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],
    test_suite='tox',
    tests_require=test_requirements
)
<commit_msg>adding python 3.5 support to pypi setup<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup
import re
import os
import sys

package = 'rolepermissions'

requirements = [
    'Django>=1.5',
    'django-discover-runner==1.0',
    'six',
]
test_requirements = [
    'model-mommy==1.2.1',
    'mock'
]

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

def get_packages(package):
    """
    Return root package and all sub-packages.
    """
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]

def get_package_data(package):
    """
    Return all files under the root package, that are not in a
    package themselves.
    """
    walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
            for dirpath, dirnames, filenames in os.walk(package)
            if not os.path.exists(os.path.join(dirpath, '__init__.py'))]

    filepaths = []
    for base, filenames in walk:
        filepaths.extend([os.path.join(base, filename)
                          for filename in filenames])
    return {package: filepaths}

# python setup.py register
if sys.argv[-1] == 'publish':
    os.system("python setup.py sdist upload")
    args = {'version': get_version(package)}
    print("You probably want to also tag the version now:")
    print("  git tag -a %(version)s -m 'version %(version)s'" % args)
    print("  git push --tags")
    sys.exit()

setup(
    name='django-role-permissions',
    version=get_version(package),
    url='http://github.com/vintasoftware/django-role-permissions',
    license='MIT',
    description='A django app for role based permissions.',
    author='Filipe Ximenes',
    author_email='filipeximenes@gmail.com',
    packages=get_packages(package),
    package_data=get_package_data(package),
    install_requires=requirements,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
    ],
    test_suite='tox',
    tests_require=test_requirements
)
<|endoftext|>


<commit_before>from distutils.core import setup
setup(name='dshelpers',
      version='1.1.0',
      description="Provides some helpers functions used by the ScraperWiki Data Services team.",
      long_description="Provides some helpers functions used by the ScraperWiki Data Services team.",
      classifiers=["Development Status :: 5 - Production/Stable",
                   "Intended Audience :: Developers",
                   "License :: OSI Approved :: BSD License",
                   "Operating System :: POSIX :: Linux",
                   "Programming Language :: Python :: 2.7",
                   "Programming Language :: Python :: 3.4",
                   ],
      author="ScraperWiki Limited",
      author_email='dataservices@scraperwiki.com',
      url='https://github.com/scraperwiki/data-services-helpers',
      license='BSD',

      py_modules=['dshelpers'],
      install_requires=['requests',
                        'requests_cache',
                        'mock',
                        'nose',
                        'scraperwiki'],
     )
<commit_msg>Bump version<commit_after>from distutils.core import setup
setup(name='dshelpers',
      version='1.2.0',
      description="Provides some helpers functions used by the ScraperWiki Data Services team.",
      long_description="Provides some helpers functions used by the ScraperWiki Data Services team.",
      classifiers=["Development Status :: 5 - Production/Stable",
                   "Intended Audience :: Developers",
                   "License :: OSI Approved :: BSD License",
                   "Operating System :: POSIX :: Linux",
                   "Programming Language :: Python :: 2.7",
                   "Programming Language :: Python :: 3.4",
                   ],
      author="ScraperWiki Limited",
      author_email='dataservices@scraperwiki.com',
      url='https://github.com/scraperwiki/data-services-helpers',
      license='BSD',

      py_modules=['dshelpers'],
      install_requires=['requests',
                        'requests_cache',
                        'mock',
                        'nose',
                        'scraperwiki'],
     )
<|endoftext|>


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

__version__ = '2.0.6'

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

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

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

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

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

__version__ = '2.0.7'

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

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

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

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

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


<commit_before>from setuptools import setup

setup(
    name='data structure',
    package_dir={'': 'src'},
    py_modules=['bst', 'graph_1', 'dll', 'stack', 'deque', 'binheap', 'deque', 'que', 'priorityq'],

    author='Han and Phillip',
    author_email='hbao2016@hotmail.com',
    description='Data structure graph.',
    install_requires=[],
    extras_require={'test': ['pytest', 'pytest-watch', 'pytest-cov', 'tox']}
<commit_msg>trying to get travis working<commit_after>from setuptools import setup

setup(
    name='data structure',
    package_dir={'': 'src'},
    py_modules=['bst', 'graph_1', 'dll', 'stack', 'deque', 'binheap', 'deque', 'que', 'priorityq'],

    author='Han and Phillip',
    author_email='hbao2016@hotmail.com',
    description='Data structure graph.',
    install_requires=[],
    extras_require={
        "test": ["pytest", "pytest-cov", "tox"]
    })<|endoftext|>


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

import os
import re
import sys

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

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

version = get_version('pytest_restrict.py')

if sys.argv[-1] == 'publish':
    if os.system("pip freeze | grep twine"):
        print("twine not installed.\nUse `pip install twine`.\nExiting.")
        sys.exit()
    os.system("python setup.py sdist bdist_wheel")
    os.system("twine upload dist/*")
    print("You probably want to also tag the version now:")
    print("  git tag -a %s -m 'Version %s'" % (version, version))
    print("  git push --tags")
    sys.exit()

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 = [
    'pytest',
    'six',
]

setup(
    name='pytest-restrict',
    version=version,
    description='Pytest plugin to restrict the test types allowed',
    long_description=readme + '\n\n' + history,
    author="Adam Johnson",
    author_email='me@adamj.eu',
    url='https://github.com/adamchainz/pytest-restrict',
    py_modules=['pytest_restrict'],
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='pytest, restrict, class',
    entry_points={
        'pytest11': ['restrict = pytest_restrict'],
    },
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Framework :: Pytest',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)
<commit_msg>Remove unused 'setup.py publish'<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import re

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

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

version = get_version('pytest_restrict.py')

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 = [
    'pytest',
    'six',
]

setup(
    name='pytest-restrict',
    version=version,
    description='Pytest plugin to restrict the test types allowed',
    long_description=readme + '\n\n' + history,
    author="Adam Johnson",
    author_email='me@adamj.eu',
    url='https://github.com/adamchainz/pytest-restrict',
    py_modules=['pytest_restrict'],
    include_package_data=True,
    install_requires=requirements,
    license="BSD",
    zip_safe=False,
    keywords='pytest, restrict, class',
    entry_points={
        'pytest11': ['restrict = pytest_restrict'],
    },
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Framework :: Pytest',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)
<|endoftext|>