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

import io
import os

import setuptools

name = "google-cloud-kms"
description = "Cloud Key Management Service (KMS) API client library"
version = "2.4.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
    "google-api-core[grpc] >= 1.26.0, <2.0.0dev",
    "grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
    "proto-plus >= 1.4.0",
    "packaging >= 14.3",
]

extras = {"libcst": "libcst >= 0.2.5"}

package_root = os.path.abspath(os.path.dirname(__file__))

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
    readme = readme_file.read()

# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
packages = [
    package
    for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")

setuptools.setup(
    name=name,
    version=version,
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="googleapis-packages@google.com",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-kms",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Operating System :: OS Independent",
        "Topic :: Internet",
    ],
    platforms="Posix; MacOS X; Windows",
    packages=packages,
    namespace_packages=namespaces,
    install_requires=dependencies,
    extras_require=extras,
    python_requires=">=3.6",
    scripts=["scripts/fixup_kms_v1_keywords.py"],
    include_package_data=True,
    zip_safe=False,
)
<commit_msg>fix(deps): pin 'google-{api,cloud}-core', 'google-auth' to allow 2.x versions (#143)<commit_after># -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os

import setuptools

name = "google-cloud-kms"
description = "Cloud Key Management Service (KMS) API client library"
version = "2.4.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
    # NOTE: Maintainers, please do not require google-api-core>=2.x.x
    # Until this issue is closed
    # https://github.com/googleapis/google-cloud-python/issues/10566
    "google-api-core[grpc] >= 1.26.0, <3.0.0dev",
    "grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
    "proto-plus >= 1.4.0",
    "packaging >= 14.3",
]

extras = {"libcst": "libcst >= 0.2.5"}

package_root = os.path.abspath(os.path.dirname(__file__))

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
    readme = readme_file.read()

# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
packages = [
    package
    for package in setuptools.PEP420PackageFinder.find()
    if package.startswith("google")
]

namespaces = ["google"]
if "google.cloud" in packages:
    namespaces.append("google.cloud")

setuptools.setup(
    name=name,
    version=version,
    description=description,
    long_description=readme,
    author="Google LLC",
    author_email="googleapis-packages@google.com",
    license="Apache 2.0",
    url="https://github.com/googleapis/python-kms",
    classifiers=[
        release_status,
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Operating System :: OS Independent",
        "Topic :: Internet",
    ],
    platforms="Posix; MacOS X; Windows",
    packages=packages,
    namespace_packages=namespaces,
    install_requires=dependencies,
    extras_require=extras,
    python_requires=">=3.6",
    scripts=["scripts/fixup_kms_v1_keywords.py"],
    include_package_data=True,
    zip_safe=False,
)
<|endoftext|>


<commit_before>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(name='pynrrd',
      version='0.2.3',
      description='Pure python module for reading and writing nrrd files.',
      long_description='Pure python module for reading and writing nrrd files. See the github page for more information.',
      author='Maarten Everts',
      author_email='me@nn8.nl',
      url='http://github.com/mhe/pynrrd',
      py_modules=['nrrd'],
      license="MIT License",
      install_requires=['numpy'],
      keywords = ["nrrd"],
      classifiers = [
          "License :: OSI Approved :: MIT License",
          "Topic :: Scientific/Engineering",
          "Programming Language :: Python",
          "Programming Language :: Python :: 3"
      ]
      )
<commit_msg>Version bump to 0.2.4.<commit_after>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(name='pynrrd',
      version='0.2.4',
      description='Pure python module for reading and writing nrrd files.',
      long_description='Pure python module for reading and writing nrrd files. See the github page for more information.',
      author='Maarten Everts',
      author_email='me@nn8.nl',
      url='http://github.com/mhe/pynrrd',
      py_modules=['nrrd'],
      license="MIT License",
      install_requires=['numpy'],
      keywords=["nrrd"],
      classifiers=[
          "License :: OSI Approved :: MIT License",
          "Topic :: Scientific/Engineering",
          "Programming Language :: Python",
          "Programming Language :: Python :: 3"
      ]
     )
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------

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

# require python 2.7+
if sys.hexversion < 0x02070000:
  raise RuntimeError('This package requires python 2.7 or better')

heredir = os.path.abspath(os.path.dirname(__file__))
def read(*parts, **kw):
  try:    return open(os.path.join(heredir, *parts)).read()
  except: return kw.get('default', '')

test_requires = [
  'nose                 >= 1.3.0',
  'coverage             >= 3.5.3',
  ]

requires = [
  'distribute           >= 0.6.24',
  'TemplateAlchemy      >= 0.1.20',
  'cssutils             >= 0.9.10b1',
  'cssselect            >= 0.7.1',
  'py-dom-xpath         >= 0.1',
  'html2text            >= 3.200.3',
  'dkimpy               >= 0.5.4',
  ]

entrypoints = {
  'console_scripts': [
    'genemail           = genemail.cli:main',
    ],
  }

classifiers = [
  'Development Status :: 4 - Beta',
  'Intended Audience :: Developers',
  'Programming Language :: Python',
  'Operating System :: OS Independent',
  'Topic :: Software Development',
  'Natural Language :: English',
  'License :: OSI Approved :: MIT License',
  'License :: Public Domain',
  ]

setup(
  name                  = 'genemail',
  version               = '0.1.6',
  description           = 'A templated email generation library',
  long_description      = read('README.rst'),
  classifiers           = classifiers,
  author                = 'Philip J Grabner, Cadit Health Inc',
  author_email          = 'oss@cadit.com',
  url                   = 'http://github.com/cadithealth/genemail',
  keywords              = 'template email generation html text smtp',
  packages              = find_packages(),
  include_package_data  = True,
  zip_safe              = True,
  install_requires      = requires,
  tests_require         = test_requires,
  test_suite            = 'genemail',
  entry_points          = entrypoints,
  license               = 'MIT (http://opensource.org/licenses/MIT)',
  )

#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
<commit_msg>bumped version<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/03
# copy: (C) Copyright 2013 Cadit Inc., see LICENSE.txt
#------------------------------------------------------------------------------

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

# require python 2.7+
if sys.hexversion < 0x02070000:
  raise RuntimeError('This package requires python 2.7 or better')

heredir = os.path.abspath(os.path.dirname(__file__))
def read(*parts, **kw):
  try:    return open(os.path.join(heredir, *parts)).read()
  except: return kw.get('default', '')

test_requires = [
  'nose                 >= 1.3.0',
  'coverage             >= 3.5.3',
  ]

requires = [
  'distribute           >= 0.6.24',
  'TemplateAlchemy      >= 0.1.20',
  'cssutils             >= 0.9.10b1',
  'cssselect            >= 0.7.1',
  'py-dom-xpath         >= 0.1',
  'html2text            >= 3.200.3',
  'dkimpy               >= 0.5.4',
  ]

entrypoints = {
  'console_scripts': [
    'genemail           = genemail.cli:main',
    ],
  }

classifiers = [
  'Development Status :: 4 - Beta',
  'Intended Audience :: Developers',
  'Programming Language :: Python',
  'Operating System :: OS Independent',
  'Topic :: Software Development',
  'Natural Language :: English',
  'License :: OSI Approved :: MIT License',
  'License :: Public Domain',
  ]

setup(
  name                  = 'genemail',
  version               = '0.1.7',
  description           = 'A templated email generation library',
  long_description      = read('README.rst'),
  classifiers           = classifiers,
  author                = 'Philip J Grabner, Cadit Health Inc',
  author_email          = 'oss@cadit.com',
  url                   = 'http://github.com/cadithealth/genemail',
  keywords              = 'template email generation html text smtp',
  packages              = find_packages(),
  include_package_data  = True,
  zip_safe              = True,
  install_requires      = requires,
  tests_require         = test_requires,
  test_suite            = 'genemail',
  entry_points          = entrypoints,
  license               = 'MIT (http://opensource.org/licenses/MIT)',
  )

#------------------------------------------------------------------------------
# end of $Id$
#------------------------------------------------------------------------------
<|endoftext|>


<commit_before>import codecs

from os import path
from setuptools import find_packages, setup

def read(*parts):
    filename = path.join(path.dirname(__file__), *parts)
    with codecs.open(filename, encoding="utf-8") as fp:
        return fp.read()

NAME = "pinax-stripe"
DESCRIPTION = "a payments Django app for Stripe"
AUTHOR = "Pinax Team"
AUTHOR_EMAIL = "team@pinaxproject.com"
URL = "https://github.com/pinax/pinax-stripe"

setup(
    name=NAME,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    description=DESCRIPTION,
    long_description=read("README.rst"),
    version="2.0.0",
    license="MIT",
    url=URL,
    packages=find_packages(),
    package_data={
        "pinax.stripe": [
            "templates/pinax/stripe/email/body_base.txt",
            "templates/pinax/stripe/email/body.txt",
            "templates/pinax/stripe/email/subject.txt",
            "templates/pinax/stripe/_cancel_form.html",
            "templates/pinax/stripe/_change_card_form.html",
            "templates/pinax/stripe/_change_plan_form.html",
            "templates/pinax/stripe/_subscribe_form.html",
            "templates/pinax/stripe/_subscription_status.html",
            "templates/pinax/stripe/base.html",
            "templates/pinax/stripe/cancel.html",
            "templates/pinax/stripe/change_card.html",
            "templates/pinax/stripe/change_plan.html",
            "templates/pinax/stripe/history.html",
            "templates/pinax/stripe/subscribe.html",
        ]
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2"
        "Programming Language :: Python :: 3",
        "Framework :: Django",
    ],
    install_requires=[
        "django-appconf>=1.0.1",
        "django-eldarion-ajax>=0.1",
        "django-jsonfield>=0.9.15",
        "stripe>=1.7.9",
        "django>=1.7",
        "pytz",
        "six",
    ],
    test_suite="runtests.runtests",
    tests_require=[
        "mock",
        "django_forms_bootstrap",
    ],
    zip_safe=False,
)
<commit_msg>Fix typo<commit_after>import codecs

from os import path
from setuptools import find_packages, setup

def read(*parts):
    filename = path.join(path.dirname(__file__), *parts)
    with codecs.open(filename, encoding="utf-8") as fp:
        return fp.read()

NAME = "pinax-stripe"
DESCRIPTION = "a payments Django app for Stripe"
AUTHOR = "Pinax Team"
AUTHOR_EMAIL = "team@pinaxproject.com"
URL = "https://github.com/pinax/pinax-stripe"

setup(
    name=NAME,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    description=DESCRIPTION,
    long_description=read("README.rst"),
    version="2.0.0",
    license="MIT",
    url=URL,
    packages=find_packages(),
    package_data={
        "pinax.stripe": [
            "templates/pinax/stripe/email/body_base.txt",
            "templates/pinax/stripe/email/body.txt",
            "templates/pinax/stripe/email/subject.txt",
            "templates/pinax/stripe/_cancel_form.html",
            "templates/pinax/stripe/_change_card_form.html",
            "templates/pinax/stripe/_change_plan_form.html",
            "templates/pinax/stripe/_subscribe_form.html",
            "templates/pinax/stripe/_subscription_status.html",
            "templates/pinax/stripe/base.html",
            "templates/pinax/stripe/cancel.html",
            "templates/pinax/stripe/change_card.html",
            "templates/pinax/stripe/change_plan.html",
            "templates/pinax/stripe/history.html",
            "templates/pinax/stripe/subscribe.html",
        ]
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
        "Framework :: Django",
    ],
    install_requires=[
        "django-appconf>=1.0.1",
        "django-eldarion-ajax>=0.1",
        "django-jsonfield>=0.9.15",
        "stripe>=1.7.9",
        "django>=1.7",
        "pytz",
        "six",
    ],
    test_suite="runtests.runtests",
    tests_require=[
        "mock",
        "django_forms_bootstrap",
    ],
    zip_safe=False,
)
<|endoftext|>


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

'''The setup and build script for the python-twitter library.'''

__author__ = 'yomguy@parisson.com'
__version__ = '0.1-beta'

# The base package metadata to be used by both distutils and setuptools
METADATA = dict(
  name = "timeside",
  version = __version__,
  py_modules = ['timeside'],
  description='Web Audio Components',
  author='Olivier Guilyardi, Paul Brossier, Guillaume Pellerin',
  author_email='yomguy@parisson.com',
  license='Gnu Public License V2',
  url='http://code.google.com/p/timeside',
  packages=['timeside','timeside.decoder','timeside.encoder','timeside.grapher',
            'timeside.analyzer','timeside.tests','timeside.tests.api'],
  keywords='audio analyze transcode graph',
  install_requires = ['setuptools',],
  include_package_data = True,
  scripts=['timeside/tools/waveform_batch'],
)

def Main():
  # Use setuptools if available, otherwise fallback and use distutils
  try:
    import setuptools
    setuptools.setup(**METADATA)
  except ImportError:
    import distutils.core
    distutils.core.setup(**METADATA)

if __name__ == '__main__':
  Main()
<commit_msg>fix new script<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''The setup and build script for the python-twitter library.'''

__author__ = 'yomguy@parisson.com'
__version__ = '0.1-beta'

# The base package metadata to be used by both distutils and setuptools
METADATA = dict(
  name = "timeside",
  version = __version__,
  py_modules = ['timeside'],
  description='Web Audio Components',
  author='Olivier Guilyardi, Paul Brossier, Guillaume Pellerin',
  author_email='yomguy@parisson.com',
  license='Gnu Public License V2',
  url='http://code.google.com/p/timeside',
  packages=['timeside','timeside.decoder','timeside.encoder','timeside.grapher',
            'timeside.analyzer','timeside.tests','timeside.tests.api'],
  keywords='audio analyze transcode graph',
  install_requires = ['setuptools',],
  include_package_data = True,
  scripts=['timeside/tools/waveform_batch.py'],
)

def Main():
  # Use setuptools if available, otherwise fallback and use distutils
  try:
    import setuptools
    setuptools.setup(**METADATA)
  except ImportError:
    import distutils.core
    distutils.core.setup(**METADATA)

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


<commit_before>#!/usr/bin/env python
"""Setup data quality framework instance."""
import argparse
from ast import literal_eval
from cryptography.fernet import Fernet
from sqlalchemy import create_engine, exc
import configparser
from datetime import datetime
import logging
import os
import socket
import sys

# Import database classes
from api.database.base import Base
from api.database.operation import Operation

# Load logging configuration
log = logging.getLogger(__name__)
logging.basicConfig(
    # filename='data_quality.log',
    stream=sys.stdout,
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

parser = argparse.ArgumentParser(description='Show transversal xml properties.')
parser.add_argument('--force', '-f', dest='force',
                    action='store_true',
                    help='Force database reset if it already exists.')

def gen_db_config_file(db_config_file):
    # Generate database default configuration
    configuration = configparser.ConfigParser()
    configuration['database'] = {}
    configuration['database']['secret_key'] = Fernet.generate_key().decode('utf-8')

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(db_config_file))
    with open(db_config_file, 'w+') as config_file:
        configuration.write(config_file)

def gen_api_config_file(api_config_file):
    # Generate default api configuration
    configuration = configparser.ConfigParser()
    configuration['api'] = {}
    configuration['api']['host'] = socket.gethostname()
    configuration['api']['port'] = '5000'  # Default port used by flask for the api
    configuration['mail'] = {}
    configuration['mail']['host'] = 'change_me'
    configuration['mail']['port'] = 'change_me'
    configuration['mail']['sender'] = 'change_me'

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(api_config_file))
    with open(api_config_file, 'w+') as config_file:
        configuration.write(config_file)

def gen_app_config_file(app_config_file):
    # Generate default web app configuration
    configuration = configparser.ConfigParser()
    configuration['api'] = {}  # Repeat api configuration for the web app to know where to send http requests
    configuration['api']['host'] = socket.gethostname()
    configuration['api']['port'] = '5000'  # Default port used by flask for the api
    configuration['app'] = {}
    configuration['app']['host'] = socket.gethostname()
    configuration['app']['port'] = '5001'  # Port must be different from the api

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(app_config_file))
    with open(app_config_file, 'w+') as config_file:
        configuration.write(config_file)

def create_db(db_name):
    db_path = os.path.join(os.path.dirname(__file__), db_name)
    db_uri = 'sqlite:///{}'.format(db_path)
    engine = create_engine(db_uri)

    # Create tables
    log.info('Create database {}'.format(db_name))
    Base.metadata.create_all(engine)

    # Insert default list of values
    with open('api/database/data.json', 'r') as data_file:
        data_dictionary = literal_eval(data_file.read())
        for object in data_dictionary['list_of_values']:
                log.info('Insert default list of values for: {}'.format(object['class']))
                for record in object['records']:
                    try:
                        Operation(object['class']).create(**record)
                    except exc.IntegrityError:
                        log.info('Record already exist: {}'.format(record))

if __name__ == '__main__':
    args = parser.parse_args()
    ts = datetime.now().strftime("%Y%m%d-%H%M%S")
    # Test if configuration file for the database exists
    db_config_file = 'api/database/database.cfg'
    if os.path.isfile(db_config_file):
        log.info('Database configuration file already exist: {}'.format(db_config_file))
        if args.force:
            log.info('Backuping and replacing database config')
            svg_path = 'api/database/database_%s.cfg' % ts
            os.rename(db_config_file, svg_path)
            gen_db_config_file(db_config_file)
        else:
            sys.exit(0)
    else:
        gen_db_config_file(db_config_file)

    # Test if configuration file for the api exists
    api_config_file = 'api/api.cfg'
    if os.path.isfile(api_config_file):
        log.info('API configuration file already exist: {}'.format(api_config_file))
        if args.force:
            log.info('Backuping and replacing api config')
            svg_path = 'api/api_%s.cfg' % ts
            os.rename(api_config_file, svg_path)
            gen_api_config_file(api_config_file)
        else:
            sys.exit(0)
    else:
        gen_api_config_file(api_config_file)

    # Test if configuration file for the web app exists
    app_config_file = 'app/app.cfg'
    if os.path.isfile(app_config_file):
        log.info('App configuration file already exist: {}'.format(app_config_file))
        if args.force:
            log.info('Backuping and replacing app config')
            svg_path = 'app/app_%s.cfg' % ts
            os.rename(app_config_file, svg_path)
            gen_app_config_file(app_config_file)
        else:
            sys.exit(0)
    else:
        gen_app_config_file(app_config_file)

    # Create database
    db_name = 'api/database/data_quality.db'  # Default database name
    if os.path.isfile(db_name):
        log.info('Database already exist: {}'.format(db_name))
        if args.force:
            log.info('Backuping and replacing current database')
            svg_path = 'api/database/data_quality_%s.db' % ts
            os.rename(db_name, svg_path)
            create_db(db_name)
        else:
            sys.exit(0)
    else:
        create_db(db_name)
<commit_msg>Restoring mandatory DB imports<commit_after>#!/usr/bin/env python
"""Setup data quality framework instance."""
import argparse
from ast import literal_eval
from cryptography.fernet import Fernet
from sqlalchemy import create_engine, exc
import configparser
from datetime import datetime
import logging
import os
import socket
import sys

# Import database classes
from api.database.base import Base
from api.database.operation import Operation

# Do not remove, required #
from api.database.model_data_source import ModelDataSourceType, ModelDataSource
from api.database.model_session import ModelSession

# Load logging configuration
log = logging.getLogger(__name__)
logging.basicConfig(
    # filename='data_quality.log',
    stream=sys.stdout,
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

parser = argparse.ArgumentParser(description='Show transversal xml properties.')
parser.add_argument('--force', '-f', dest='force',
                    action='store_true',
                    help='Force database reset if it already exists.')

def gen_db_config_file(db_config_file):
    # Generate database default configuration
    configuration = configparser.ConfigParser()
    configuration['database'] = {}
    configuration['database']['secret_key'] = Fernet.generate_key().decode('utf-8')

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(db_config_file))
    with open(db_config_file, 'w+') as config_file:
        configuration.write(config_file)

def gen_api_config_file(api_config_file):
    # Generate default api configuration
    configuration = configparser.ConfigParser()
    configuration['api'] = {}
    configuration['api']['host'] = socket.gethostname()
    configuration['api']['port'] = '5000'  # Default port used by flask for the api
    configuration['mail'] = {}
    configuration['mail']['host'] = 'change_me'
    configuration['mail']['port'] = 'change_me'
    configuration['mail']['sender'] = 'change_me'

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(api_config_file))
    with open(api_config_file, 'w+') as config_file:
        configuration.write(config_file)

def gen_app_config_file(app_config_file):
    # Generate default web app configuration
    configuration = configparser.ConfigParser()
    configuration['api'] = {}  # Repeat api configuration for the web app to know where to send http requests
    configuration['api']['host'] = socket.gethostname()
    configuration['api']['port'] = '5000'  # Default port used by flask for the api
    configuration['app'] = {}
    configuration['app']['host'] = socket.gethostname()
    configuration['app']['port'] = '5001'  # Port must be different from the api

    # Write configuration in flat file
    log.info('Create configuration file: {}'.format(app_config_file))
    with open(app_config_file, 'w+') as config_file:
        configuration.write(config_file)

def create_db(db_name):
    db_path = os.path.join(os.path.dirname(__file__), db_name)
    db_uri = 'sqlite:///{}'.format(db_path)
    engine = create_engine(db_uri)

    # Create tables
    log.info('Create database {}'.format(db_name))
    Base.metadata.create_all(engine)

    # Insert default list of values
    with open('api/database/data.json', 'r') as data_file:
        data_dictionary = literal_eval(data_file.read())
        for object in data_dictionary['list_of_values']:
                log.info('Insert default list of values for: {}'.format(object['class']))
                for record in object['records']:
                    try:
                        Operation(object['class']).create(**record)
                    except exc.IntegrityError:
                        log.info('Record already exist: {}'.format(record))

if __name__ == '__main__':
    args = parser.parse_args()
    ts = datetime.now().strftime("%Y%m%d-%H%M%S")
    # Test if configuration file for the database exists
    db_config_file = 'api/database/database.cfg'
    if os.path.isfile(db_config_file):
        log.info('Database configuration file already exist: {}'.format(db_config_file))
        if args.force:
            log.info('Backuping and replacing database config')
            svg_path = 'api/database/database_%s.cfg' % ts
            os.rename(db_config_file, svg_path)
            gen_db_config_file(db_config_file)
        else:
            sys.exit(0)
    else:
        gen_db_config_file(db_config_file)

    # Test if configuration file for the api exists
    api_config_file = 'api/api.cfg'
    if os.path.isfile(api_config_file):
        log.info('API configuration file already exist: {}'.format(api_config_file))
        if args.force:
            log.info('Backuping and replacing api config')
            svg_path = 'api/api_%s.cfg' % ts
            os.rename(api_config_file, svg_path)
            gen_api_config_file(api_config_file)
        else:
            sys.exit(0)
    else:
        gen_api_config_file(api_config_file)

    # Test if configuration file for the web app exists
    app_config_file = 'app/app.cfg'
    if os.path.isfile(app_config_file):
        log.info('App configuration file already exist: {}'.format(app_config_file))
        if args.force:
            log.info('Backuping and replacing app config')
            svg_path = 'app/app_%s.cfg' % ts
            os.rename(app_config_file, svg_path)
            gen_app_config_file(app_config_file)
        else:
            sys.exit(0)
    else:
        gen_app_config_file(app_config_file)

    # Create database
    db_name = 'api/database/data_quality.db'  # Default database name
    if os.path.isfile(db_name):
        log.info('Database already exist: {}'.format(db_name))
        if args.force:
            log.info('Backuping and replacing current database')
            svg_path = 'api/database/data_quality_%s.db' % ts
            os.rename(db_name, svg_path)
            create_db(db_name)
        else:
            sys.exit(0)
    else:
        create_db(db_name)
<|endoftext|>


<commit_before>import os
from setuptools import find_packages, setup
from setuptools.command.install_lib import install_lib as _install_lib
from distutils.command.build import build as _build
from distutils.cmd import Command

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

class compile_translations(Command):

    """
        The custom command to compile po files to mo binaries for i18n
        when the app is installed.
    """

    description = 'compile message catalogs to MO files via django compilemessages'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        import os
        from django.core import management

        curdir = os.getcwd()
        os.chdir(os.path.realpath('build/lib/pyBuchaktion'))
        management.call_command('compilemessages')
        os.chdir(curdir)

class build(_build):
    sub_commands = _build.sub_commands + [('compile_translations', None)]

class install_lib(_install_lib):
    def run(self):
        _install_lib.run(self)
        self.run_command('compile_translations')

setup(
    name='pyBuchaktion',
    version='0.1',
    packages=find_packages(),
    include_package_data=True,
    license='AGPL-3.0',
    description='App for the Buchaktion',
    #long_description=README,
    url='https://d120.de/de/studierende/buchaktion/',
    author='Buchaktionsteam D120',
    author_email='buchaktion@d120.de',
    setup_requires=[
        'django>=1.10.0',
    ],
    install_requires=[
        'django>=1.10.0',
        'django-import-export',
        'pyTUID>=0.1',
    ],
    dependency_links=[
      'git+ssh://git@github.com/d120/pyTUID.git#egg=pyTUID-0.1',
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
    ],
    cmdclass={
        'build': build,
        'install_lib': install_lib,
        'compile_translations': compile_translations
    },
)
<commit_msg>use https instead of ssh for git dependencies<commit_after>import os
from setuptools import find_packages, setup
from setuptools.command.install_lib import install_lib as _install_lib
from distutils.command.build import build as _build
from distutils.cmd import Command

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

class compile_translations(Command):

    """
        The custom command to compile po files to mo binaries for i18n
        when the app is installed.
    """

    description = 'compile message catalogs to MO files via django compilemessages'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        import os
        from django.core import management

        curdir = os.getcwd()
        os.chdir(os.path.realpath('build/lib/pyBuchaktion'))
        management.call_command('compilemessages')
        os.chdir(curdir)

class build(_build):
    sub_commands = _build.sub_commands + [('compile_translations', None)]

class install_lib(_install_lib):
    def run(self):
        _install_lib.run(self)
        self.run_command('compile_translations')

setup(
    name='pyBuchaktion',
    version='0.2',
    packages=find_packages(),
    include_package_data=True,
    license='AGPL-3.0',
    description='App for the Buchaktion',
    #long_description=README,
    url='https://d120.de/de/studierende/buchaktion/',
    author='Buchaktionsteam D120',
    author_email='buchaktion@d120.de',
    setup_requires=[
        'django>=1.10.0',
    ],
    install_requires=[
        'django>=1.10.0',
        'django-import-export',
        'pyTUID>=0.1',
    ],
    dependency_links=[
      'git+https://github.com/d120/pyTUID#egg=pyTUID-0.1',
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
    ],
    cmdclass={
        'build': build,
        'install_lib': install_lib,
        'compile_translations': compile_translations
    },
)
<|endoftext|>


<commit_before># -*- coding: UTF-8 -*-
"""
setup module for ihiji_schemas
"""

from os.path import dirname, join, realpath
from setuptools import setup, find_packages

fdir = dirname(realpath(__file__))

NAME = 'pydecor'
URL = 'https://github.com/mplanchard/pydecor'
AUTHOR = 'Matthew Planchard'
EMAIL = 'msplanchard@gmail.com'

SHORT_DESC = 'Easy peasy Python decorators'

with open(join(fdir, 'README.rst'), encoding='utf-8') as readmefile:
    LONG_DESC = readmefile.read()

KEYWORDS = [
    'decorators',
    'python2',
    'python3',
]

PACKAGE_DEPENDENCIES = []
SETUP_DEPENDENCIES = []
TEST_DEPENDENCIES = []
EXTRAS_DEPENDENCIES = {}

ENTRY_POINTS = {}

with open(join(fdir, 'requirements.txt')) as reqfile:
    for ln in reqfile:
        if not ln.startswith('#'):
            PACKAGE_DEPENDENCIES.append(ln.strip())

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for all
# available setup classifiers
CLASSIFIERS = [
    # 'Development Status :: 1 - Planning',
    # 'Development Status :: 2 - Pre-Alpha',
    # 'Development Status :: 3 - Alpha',
    # 'Development Status :: 4 - Beta',
    'Development Status :: 5 - Production/Stable',
    # 'Development Status :: 6 - Mature',
    # 'Framework :: AsyncIO',
    # 'Framework :: Flask',
    # 'Framework :: Sphinx',
    # 'Environment :: Web Environment',
    'Intended Audience :: Developers',
    # 'Intended Audience :: End Users/Desktop',
    # 'Intended Audience :: Science/Research',
    # 'Intended Audience :: System Administrators',
    # 'License :: Other/Proprietary License',
    # 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
    'License :: OSI Approved :: MIT License',
    'Natural Language :: English',
    # 'Operating System :: MacOS :: MacOS X
    'Operating System :: POSIX :: Linux',
    'Programming Language :: Python',
    # 'Programming Language :: Python :: 3 :: Only',
    # 'Programming Language :: Python :: Implementation :: PyPy',
]

__version__ = '0.0.0'

with open(join(fdir, '{0}/_version.py'.format(NAME))) as version_file:
    for line in version_file:
        # This will populate the __version__ and __version_info__ variables
        if line.startswith('__'):
            exec(line)

setup(
    name=NAME,
    version=__version__,
    description=SHORT_DESC,
    long_description=LONG_DESC,
    url=URL,
    author=AUTHOR,
    author_email=EMAIL,
    classifiers=CLASSIFIERS,
    keywords=KEYWORDS,
    packages=find_packages(exclude=['*.tests', '*.tests.*']),
    install_requires=PACKAGE_DEPENDENCIES,
    setup_requires=SETUP_DEPENDENCIES,
    tests_require=TEST_DEPENDENCIES,
    extras_require=EXTRAS_DEPENDENCIES,
)
<commit_msg>more python 2 issues<commit_after># -*- coding: UTF-8 -*-
"""
setup module for ihiji_schemas
"""

from os.path import dirname, join, realpath
from setuptools import setup, find_packages
from textwrap import dedent

fdir = dirname(realpath(__file__))

NAME = 'pydecor'
URL = 'https://github.com/mplanchard/pydecor'
AUTHOR = 'Matthew Planchard'
EMAIL = 'msplanchard@gmail.com'

SHORT_DESC = 'Easy peasy Python decorators'

LONG_DESC = dedent(
    '''
    Decorators are great, but they're hard to write, especially if you want
    to include arguments to your decorators, or use your decorators on
    class methods as well as functions. I know that, no matter how many I
    write, I still find myself looking up the syntax every time. And that's
    just for simple function decorators. Getting decorators to work
    consistently at the class and method level is a whole 'nother barrel
    of worms.

    PyDecor aims to make function decoration easy and straightforward, so that
    developers can stop worrying about closures and syntax in triply nested
    functions and instead get down to decorating!
    '''
)

KEYWORDS = [
    'decorators',
    'python2',
    'python3',
]

PACKAGE_DEPENDENCIES = []
SETUP_DEPENDENCIES = []
TEST_DEPENDENCIES = []
EXTRAS_DEPENDENCIES = {}

ENTRY_POINTS = {}

with open(join(fdir, 'requirements.txt')) as reqfile:
    for ln in reqfile:
        if not ln.startswith('#'):
            PACKAGE_DEPENDENCIES.append(ln.strip())

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for all
# available setup classifiers
CLASSIFIERS = [
    # 'Development Status :: 1 - Planning',
    # 'Development Status :: 2 - Pre-Alpha',
    # 'Development Status :: 3 - Alpha',
    # 'Development Status :: 4 - Beta',
    'Development Status :: 5 - Production/Stable',
    # 'Development Status :: 6 - Mature',
    # 'Framework :: AsyncIO',
    # 'Framework :: Flask',
    # 'Framework :: Sphinx',
    # 'Environment :: Web Environment',
    'Intended Audience :: Developers',
    # 'Intended Audience :: End Users/Desktop',
    # 'Intended Audience :: Science/Research',
    # 'Intended Audience :: System Administrators',
    # 'License :: Other/Proprietary License',
    # 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
    'License :: OSI Approved :: MIT License',
    'Natural Language :: English',
    # 'Operating System :: MacOS :: MacOS X
    'Operating System :: POSIX :: Linux',
    'Programming Language :: Python',
    # 'Programming Language :: Python :: 3 :: Only',
    # 'Programming Language :: Python :: Implementation :: PyPy',
]

__version__ = '0.0.0'

with open(join(fdir, '{0}/_version.py'.format(NAME))) as version_file:
    for line in version_file:
        # This will populate the __version__ and __version_info__ variables
        if line.startswith('__'):
            exec(line)

setup(
    name=NAME,
    version=__version__,
    description=SHORT_DESC,
    long_description=LONG_DESC,
    url=URL,
    author=AUTHOR,
    author_email=EMAIL,
    classifiers=CLASSIFIERS,
    keywords=KEYWORDS,
    packages=find_packages(exclude=['*.tests', '*.tests.*']),
    install_requires=PACKAGE_DEPENDENCIES,
    setup_requires=SETUP_DEPENDENCIES,
    tests_require=TEST_DEPENDENCIES,
    extras_require=EXTRAS_DEPENDENCIES,
)
<|endoftext|>


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

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

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

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

requirements = [
    # TODO: put package requirements here
]

test_requirements = [
    # TODO: put package test requirements here
]

setup(
    name='xyvio',
    version='0.1.4',
    description="Basic Url Shortener",
    long_description=readme + '\n\n' + history,
    author="Marcos Hernández",
    author_email='marcoslhc@gmail.com',
    url='https://github.com/marcoslhc/xyvio',
    packages=[
        'xyvio',
    ],
    package_dir={'xyvio':
                 'xyvio'},
    include_package_data=True,
    install_requires=requirements,
    license="ISCL",
    zip_safe=False,
    keywords='xyvio',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<commit_msg>REmove python 3 (not ready yet)<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

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

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

requirements = [
    # TODO: put package requirements here
]

test_requirements = [
    # TODO: put package test requirements here
]

setup(
    name='xyvio',
    version='0.1.4',
    description="Basic Url Shortener",
    long_description=readme + '\n\n' + history,
    author="Marcos Hernández",
    author_email='marcoslhc@gmail.com',
    url='https://github.com/marcoslhc/xyvio',
    packages=[
        'xyvio',
    ],
    package_dir={'xyvio':
                 'xyvio'},
    include_package_data=True,
    install_requires=requirements,
    license="ISCL",
    zip_safe=False,
    keywords='xyvio',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
import sys
import os

if "publish" in sys.argv[-1]:
    os.system("python setup.py sdist upload")
    sys.exit()

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

setup(name='K2fov',
      version='1.4.2',
      description='Find which targets are in the field of view of K2',
      author='Tom Barclay',
      author_email='tom@tombarclay.com',
      url='https://github.com/mrtommyb/K2fov',
      packages=['K2fov'],
      install_requires=["numpy"],)

<commit_msg>bumping version<commit_after>#!/usr/bin/env python
import sys
import os

if "publish" in sys.argv[-1]:
    os.system("python setup.py sdist upload")
    sys.exit()

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

setup(name='K2fov',
      version='1.5.0',
      description='Find which targets are in the field of view of K2',
      author='Tom Barclay',
      author_email='tom@tombarclay.com',
      url='https://github.com/mrtommyb/K2fov',
      packages=['K2fov'],
      install_requires=["numpy"],)

<|endoftext|>


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

import sys

from setuptools import setup, find_packages

install_requires = [
    "datapipelines",
    "merakicommons",
    "Pillow",
    "pycurl"
]

# Require python 3.6
if sys.version_info.major != 3 and sys.version_info.minor != 6:
    sys.exit("Cassiopeia requires Python 3.6.")

setup(
    name="cassiopeia",
    version="3.0.3-rc1",
    author="Jason Maldonis; Rob Rua",
    author_email="team@merakianalytics.com",
    url="https://github.com/meraki-analytics/cassiopeia",
    description="Riot Games Developer API Wrapper (3rd Party)",
    keywords=["LoL", "League of Legends", "Riot Games", "API", "REST"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Programming Language :: Python :: 3",
        "Environment :: Web Environment",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Topic :: Games/Entertainment",
        "Topic :: Games/Entertainment :: Real Time Strategy",
        "Topic :: Games/Entertainment :: Role-Playing",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    license="MIT",
    packages=find_packages(),
    zip_safe=True,
    install_requires=install_requires,
    include_package_data=True
)<commit_msg>forgot to increment version #<commit_after>#!/usr/bin/env python

import sys

from setuptools import setup, find_packages

install_requires = [
    "datapipelines",
    "merakicommons",
    "Pillow",
    "pycurl"
]

# Require python 3.6
if sys.version_info.major != 3 and sys.version_info.minor != 6:
    sys.exit("Cassiopeia requires Python 3.6.")

setup(
    name="cassiopeia",
    version="3.0.4-rc1",
    author="Jason Maldonis; Rob Rua",
    author_email="team@merakianalytics.com",
    url="https://github.com/meraki-analytics/cassiopeia",
    description="Riot Games Developer API Wrapper (3rd Party)",
    keywords=["LoL", "League of Legends", "Riot Games", "API", "REST"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Programming Language :: Python :: 3",
        "Environment :: Web Environment",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Topic :: Games/Entertainment",
        "Topic :: Games/Entertainment :: Real Time Strategy",
        "Topic :: Games/Entertainment :: Role-Playing",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    license="MIT",
    packages=find_packages(),
    zip_safe=True,
    install_requires=install_requires,
    include_package_data=True
)<|endoftext|>


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

from setuptools import setup

setup(
    name='pyowm',
    version='2.2.0',
    description='A Python wrapper around the OpenWeatherMap web API',
    author='Claudio Sparpaglione (@csparpa)',
    author_email='csparpa@gmail.com',
    url='http://github.com/csparpa/pyowm',
    packages=['pyowm', 'pyowm.abstractions', 'pyowm.caches', 'pyowm.commons',
              'pyowm.exceptions', 'pyowm.utils', 'pyowm.webapi25',
              'pyowm.webapi25.cityids', 'pyowm.webapi25.xsd',
              'tests.unit', 'tests.functional'],
      long_description="""\
      PyOWM is a client Python wrapper library for the OpenWeatherMap web API.
      It allows quick and easy consumption of OWM weather data from Python
      applications via a simple object model and in a human-friendly fashion.
      """,
      classifiers=[
          "License :: OSI Approved :: MIT License",
          "Programming Language :: Python",
          "Natural Language :: English",
          "Operating System :: OS Independent",
          "Development Status :: 5 - Production/Stable",
          "Intended Audience :: Developers",
          "Topic :: Software Development :: Libraries",
    ],
    package_data = {
        '': ['*.txt', '*.xsd']
    },
    keywords='openweathermap web api client wrapper weather forecast data OWM',
    license='MIT',
    test_suite='tests'
)
<commit_msg>Refactoring of library version<commit_after>#!/usr/bin/env python

from setuptools import setup
from pyowm import constants

setup(
    name='pyowm',
    version=constants.PYOWM_VERSION,
    description='A Python wrapper around the OpenWeatherMap web API',
    author='Claudio Sparpaglione (@csparpa)',
    author_email='csparpa@gmail.com',
    url='http://github.com/csparpa/pyowm',
    packages=['pyowm', 'pyowm.abstractions', 'pyowm.caches', 'pyowm.commons',
              'pyowm.exceptions', 'pyowm.utils', 'pyowm.webapi25',
              'pyowm.webapi25.cityids', 'pyowm.webapi25.xsd',
              'tests.unit', 'tests.functional'],
      long_description="""\
      PyOWM is a client Python wrapper library for the OpenWeatherMap web API.
      It allows quick and easy consumption of OWM weather data from Python
      applications via a simple object model and in a human-friendly fashion.
      """,
      classifiers=[
          "License :: OSI Approved :: MIT License",
          "Programming Language :: Python",
          "Natural Language :: English",
          "Operating System :: OS Independent",
          "Development Status :: 5 - Production/Stable",
          "Intended Audience :: Developers",
          "Topic :: Software Development :: Libraries",
    ],
    package_data = {
        '': ['*.txt', '*.xsd']
    },
    keywords='openweathermap web api client wrapper weather forecast data OWM',
    license='MIT',
    test_suite='tests'
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='braubuddy',
    version='0.2.0',
    author='James Stewart',
    author_email='jstewart101@gmail.com',
    packages=['braubuddy'],
    scripts=[],
    url='http://pypi.python.org/pypi/Braubuddy/',
    license='LICENSE.txt',
    description='An extensile thermostat framework',
    long_description=open('README.md').read(),
    entry_points = {
        'console_scripts': [
            'braubuddy = braubuddy.runserver:main',
        ]
    },
    install_requires=[
        'pyserial>=2.0',
        'tosr0x>=0.2.0',
        'temperusb>=1.2.0',
        'ds18b20>=0.01.03',
        'cherrypy>=3.2.2',
        'pyxdg>=0.25',
        'jinja2>=2.7.0',
    ],
)
<commit_msg>Use .rst README file.<commit_after>from setuptools import setup

setup(
    name='braubuddy',
    version='0.2.0',
    author='James Stewart',
    author_email='jstewart101@gmail.com',
    packages=['braubuddy'],
    scripts=[],
    url='http://pypi.python.org/pypi/Braubuddy/',
    license='LICENSE.txt',
    description='An extensile thermostat framework',
    long_description=open('README.rst').read(),
    entry_points = {
        'console_scripts': [
            'braubuddy = braubuddy.runserver:main',
        ]
    },
    install_requires=[
        'pyserial>=2.0',
        'tosr0x>=0.2.0',
        'temperusb>=1.2.0',
        'ds18b20>=0.01.03',
        'cherrypy>=3.2.2',
        'pyxdg>=0.25',
        'jinja2>=2.7.0',
    ],
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name='responsys_client',
    packages=['responsys_client'],  # this must be the same as the name above
    version='0.1.8',
    install_requires=[
        'pytz==2016.7',
        'requests==2.12.0',
    ],
    description='This is an Oracle Responsys REST API client written in Python 2.7.',
    author='Nicholas Kincaid',
    author_email='nbkincaid@gmail.com',
    url='https://github.com/spothero/py-responsys',
    download_url='https://github.com/spothero/py-responsys/tarball/0.1.8',
    keywords=['testing'],
    classifiers=["Programming Language :: Python :: 2.7",
                 "Topic :: Software Development :: Libraries :: Python Modules"]
)
<commit_msg>Added "mock" to the dependency list<commit_after>from distutils.core import setup

setup(
    name='responsys_client',
    packages=['responsys_client'],  # this must be the same as the name above
    version='0.1.8',
    install_requires=[
        'pytz==2016.7',
        'requests==2.12.0',
        'mock==2.0.0',
    ],
    description='This is an Oracle Responsys REST API client written in Python 2.7.',
    author='Nicholas Kincaid',
    author_email='nbkincaid@gmail.com',
    url='https://github.com/spothero/py-responsys',
    download_url='https://github.com/spothero/py-responsys/tarball/0.1.8',
    keywords=['testing'],
    classifiers=["Programming Language :: Python :: 2.7",
                 "Topic :: Software Development :: Libraries :: Python Modules"]
)
<|endoftext|>


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

version = '0.0.5.dev0'

setup(
    name='pysendy',
    version=version,
    description='Sendy API v1.1.7 for Python.',
    long_description=open('README.md').read(),
    author='Thiago Faria de Andrade',
    author_email='thiagofa@gmail.com',
    url='https://github.com/thiagofa/pysendy',
    packages=find_packages(),
    download_url='http://pypi.python.org/pypi/pysendy/',
    keywords='pysendy sendy sendy.co wrapper api',
    zip_safe=True,
    install_requires=['requests'],
    py_modules=[],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)<commit_msg>Release 0.0.5<commit_after>#!/usr/bin/env python
from setuptools import setup, find_packages

version = '0.0.5'

setup(
    name='pysendy',
    version=version,
    description='Sendy API v1.1.7 for Python.',
    long_description=open('README.md').read(),
    author='Thiago Faria de Andrade',
    author_email='thiagofa@gmail.com',
    url='https://github.com/thiagofa/pysendy',
    packages=find_packages(),
    download_url='http://pypi.python.org/pypi/pysendy/',
    keywords='pysendy sendy sendy.co wrapper api',
    zip_safe=True,
    install_requires=['requests'],
    py_modules=[],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)<|endoftext|>


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

import os
from setuptools import setup

VERSION = '2.0.dev6'

def read(fname):
    """ Return content of specified file """
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name='squery-lite',
    version=VERSION,
    author='Outernet Inc',
    author_email='apps@outernet.is',
    url='https://github.com/Outernet-Project/squery-lite',
    license='BSD',
    packages=['squery_lite'],
    include_package_data=True,
    long_description=read('README.rst'),
    install_requires=[
        'pytz',
        'sqlize>=1.0.dev1',
    ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Topic :: Software Development :: Libraries',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
    ],
)
<commit_msg>Release version bump<commit_after>#!/usr/bin/env python

import os
from setuptools import setup

VERSION = '2.0'

def read(fname):
    """ Return content of specified file """
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name='squery-lite',
    version=VERSION,
    author='Outernet Inc',
    author_email='apps@outernet.is',
    url='https://github.com/Outernet-Project/squery-lite',
    license='BSD',
    packages=['squery_lite'],
    include_package_data=True,
    long_description=read('README.rst'),
    install_requires=[
        'pytz',
        'sqlize>=1.0.dev1',
    ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Topic :: Software Development :: Libraries',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
    ],
)
<|endoftext|>


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

import os.path
import sys

version = "1.99.0-git"

if (not os.path.exists(os.path.join("pyxmpp","version.py"))
                                    or "make_version" in sys.argv):
    with open("pyxmpp/version.py", "w") as version_py:
        version_py.write("# pylint: disable=C0111,C0103\n")
        version_py.write("version = {0!r}\n".format(version))
    if "make_version" in sys.argv:
        sys.exit(0)
else:
    execfile(os.path.join("pyxmpp", "version.py"))

if version.endswith("-git"):
    download_url = None
else:
    download_url = 'http://github.com/downloads/Jajcus/pyxmpp2/pyxmpp-{0}.tar.gz'.format(version),

from distutils.core import setup

setup(
    name =      'pyxmpp2',
    version =   version,
    description =   'XMPP/Jabber implementation for Python',
    author =    'Jacek Konieczny',
    author_email =  'jajcus@jajcus.net',
    download_url = download_url,
    url =       'https://github.com/Jajcus/pyxmpp2',
    classifiers = [
            "Development Status :: 3 - Alpha",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
            "Operating System :: POSIX",
            "Programming Language :: Python",
            "Programming Language :: Python :: 2.7",
            "Topic :: Communications",
            "Topic :: Communications :: Chat",
            "Topic :: Internet",
            "Topic :: Software Development :: Libraries :: Python Modules",
        ],
    license =   'LGPL',
    requires = ['dnspython(>= 1.6.0)'],
    package_dir = {'pyxmpp2': 'pyxmpp'},
    packages = [
        'pyxmpp2',
        'pyxmpp2.mainloop',
        'pyxmpp2.sasl',
    #   'pyxmpp2.ext',
    ],
)
<commit_msg>Download URL fix<commit_after>#! /usr/bin/env python

import os.path
import sys

version = "1.99.0-git"

if (not os.path.exists(os.path.join("pyxmpp","version.py"))
                                    or "make_version" in sys.argv):
    with open("pyxmpp/version.py", "w") as version_py:
        version_py.write("# pylint: disable=C0111,C0103\n")
        version_py.write("version = {0!r}\n".format(version))
    if "make_version" in sys.argv:
        sys.exit(0)
else:
    execfile(os.path.join("pyxmpp", "version.py"))

if version.endswith("-git"):
    download_url = None
else:
    download_url = 'http://github.com/downloads/Jajcus/pyxmpp2/pyxmpp2-{0}.tar.gz'.format(version),

from distutils.core import setup

setup(
    name =      'pyxmpp2',
    version =   version,
    description =   'XMPP/Jabber implementation for Python',
    author =    'Jacek Konieczny',
    author_email =  'jajcus@jajcus.net',
    download_url = download_url,
    url =       'https://github.com/Jajcus/pyxmpp2',
    classifiers = [
            "Development Status :: 3 - Alpha",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
            "Operating System :: POSIX",
            "Programming Language :: Python",
            "Programming Language :: Python :: 2.7",
            "Topic :: Communications",
            "Topic :: Communications :: Chat",
            "Topic :: Internet",
            "Topic :: Software Development :: Libraries :: Python Modules",
        ],
    license =   'LGPL',
    requires = ['dnspython(>= 1.6.0)'],
    package_dir = {'pyxmpp2': 'pyxmpp'},
    packages = [
        'pyxmpp2',
        'pyxmpp2.mainloop',
        'pyxmpp2.sasl',
    #   'pyxmpp2.ext',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(
    name='wsgi-ua-mapper',
    version='0.0.1',
    description='WSGI app mapping requesting User Agent to arbitrary value through user defined module. Utilizes Wurfl to deliver requesting device info.',
    long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
    author='Praekelt Foundation',
    author_email='dev@praekelt.com',
    license='BSD',
    url='http://github.com/praekelt/wsgi-ua-mapper',
    packages = find_packages(),
    include_package_data=True,
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: BSD License",
        "Development Status :: 4 - Beta",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
    ],
    install_requires = [
        'pywurfl',
        'python-memcached',
    ],
    zip_safe=False,
)
<commit_msg>version bump<commit_after>from setuptools import setup, find_packages

setup(
    name='wsgi-ua-mapper',
    version='0.0.2',
    description='WSGI app mapping requesting User Agent to arbitrary value through user defined module. Utilizes Wurfl to deliver requesting device info.',
    long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
    author='Praekelt Foundation',
    author_email='dev@praekelt.com',
    license='BSD',
    url='http://github.com/praekelt/wsgi-ua-mapper',
    packages = find_packages(),
    include_package_data=True,
    classifiers = [
        "Programming Language :: Python",
        "License :: OSI Approved :: BSD License",
        "Development Status :: 4 - Beta",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
    ],
    install_requires = [
        'pywurfl',
        'python-memcached',
    ],
    zip_safe=False,
)
<|endoftext|>


<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
FIQL Parser
"""
from __future__ import unicode_literals
from __future__ import absolute_import

import io
import re
from setuptools import setup

with io.open('requirements-testing.txt') as fd:
    test_reqs = fd.readlines()
    tests_require = [line for line in test_reqs if not line.startswith('#')]

with io.open('README.rst') as fd:
    long_desc = fd.read()

# Caculate the version number.
with io.open('fiql_parser/__init__.py') as fd:
    for line in fd:
        version_match = re.match("__version__ = ['\"]([^'\"]*)['\"]", line)
        if version_match:
            version = version_match.group(1)
            break
    else:
        raise RuntimeError("Unable to find version string.")

setup(
    name = 'fiql-parser',
    version = version,
    description = 'Python parser for the Feed Item Query Language (FIQL).',
    long_description = long_desc,
    author = 'Serge Domkowski',
    author_email = 'sergedomk@gmail.com',
    url = 'https://github.com/sergedomk/fiql_parser',
    license = 'BSD',
    include_package_data = True,
    packages=['fiql_parser'],
    install_requires = [],
    tests_require = tests_require,
    platforms = ['any'],
    classifiers = [
        'Development Status :: 3 - Alpha',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        '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',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Software Development :: Libraries',
    ],
)
<commit_msg>Get rid of pkg_resources for fiql_parser version.<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
FIQL Parser
"""

import io
import re
from setuptools import setup

with io.open('requirements-testing.txt') as fd:
    test_reqs = fd.readlines()
    tests_require = [line for line in test_reqs if not line.startswith('#')]

with io.open('README.rst') as fd:
    long_desc = fd.read()

# Caculate the version number.
with io.open('fiql_parser/__init__.py', encoding='utf-8') as fd:
    for line in fd:
        version_match = re.match("__version__ = ['\"]([^'\"]*)['\"]", line)
        if version_match:
            version = version_match.group(1)
            break
    else:
        raise RuntimeError("Unable to find version string.")

setup(
    name = 'fiql-parser',
    version = version,
    description = 'Python parser for the Feed Item Query Language (FIQL).',
    long_description = long_desc,
    author = 'Serge Domkowski',
    author_email = 'sergedomk@gmail.com',
    url = 'https://github.com/sergedomk/fiql_parser',
    license = 'BSD',
    include_package_data = True,
    packages=['fiql_parser'],
    install_requires = [],
    tests_require = tests_require,
    platforms = ['any'],
    classifiers = [
        'Development Status :: 3 - Alpha',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        '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',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Software Development :: Libraries',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys

class Tox(TestCommand):
    user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.tox_args = None
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True
    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import tox
        import shlex
        errno = tox.cmdline(args=shlex.split(self.tox_args))
        sys.exit(errno)

setup(
    name = "adbpy",
    version = "0.0.1",
    url = "https://github.com/noahgoldman/adbpy",
    license = "MIT",
    author = "Noah Goldman",
    author_email = "noah@phaaze.com",
    description = "A library to communicate with ADB through it's "
                  "internal socket interface, rather than the command"
                  "line.",
    platforms = "any",
    packages = ["adbpy"],
    tests_require = ['tox'],
    cmdclass = {'test': Tox},
)
<commit_msg>bumped pypi version number<commit_after>from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys

class Tox(TestCommand):
    user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.tox_args = None
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True
    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import tox
        import shlex
        errno = tox.cmdline(args=shlex.split(self.tox_args))
        sys.exit(errno)

setup(
    name = "adbpy",
    version = "0.0.2",
    url = "https://github.com/noahgoldman/adbpy",
    license = "MIT",
    author = "Noah Goldman",
    author_email = "noah@phaaze.com",
    description = "A library to communicate with ADB through it's "
                  "internal socket interface, rather than the command"
                  "line.",
    platforms = "any",
    packages = ["adbpy"],
    tests_require = ['tox'],
    cmdclass = {'test': Tox},
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""ctypes code generator
"""
import os, sys
from distutils.core import setup, Command

class test(Command):
    # Original version of this class posted
    # by Berthold Hoellmann to distutils-sig@python.org
    description = "run tests"

    user_options = [
        ('tests=', 't',
         "comma-separated list of packages that contain test modules"),
        ('use-resources=', 'u',
         "resources to use - resource names are defined by tests"),
        ('refcounts', 'r',
         "repeat tests to search for refcount leaks (requires 'sys.gettotalrefcount')"),
        ]

    boolean_options = ["refcounts"]

    def initialize_options(self):
        self.build_base = 'build'
        self.use_resources = ""
        self.refcounts = False
        self.tests = "ctypeslib.test"

    # initialize_options()

    def finalize_options(self):
        if self.refcounts and not hasattr(sys, "gettotalrefcount"):
            raise DistutilsOptionError("refcount option requires Python debug build")
        self.tests = self.tests.split(",")
        self.use_resources = self.use_resources.split(",")

    # finalize_options()

    def run(self):
        self.run_command('build')

        import ctypes.test
        ctypes.test.use_resources.extend(self.use_resources)

        for name in self.tests:
            package = __import__(name, globals(), locals(), ['*'])
            print "Testing package", name, (sys.version, sys.platform, os.name)
            ctypes.test.run_tests(package,
                                  "test_*.py",
                                  self.verbose,
                                  self.refcounts)

    # run()

# class test

setup(name="ctypeslib",
      packages = ['ctypeslib', 'ctypeslib.codegen'],
      scripts = ['scripts/h2xml.py', 'scripts/xml2py.py'],
      description="ctypes code generator",
      long_description = __doc__,
      author="Thomas Heller",
      author_email="theller@ctypes.org",
      license="MIT License",
      version = "0.5.1",

##          url="http://starship.python.net/crew/theller/ctypes.html",
##          platforms=["windows", "Linux", "MacOS X", "Solaris", "FreeBSD"],

      cmdclass = {'test': test},

      )
<commit_msg>Change the version number again in the setup script (only to experiment with easy_install).<commit_after>#!/usr/bin/env python
"""ctypes code generator
"""
import os, sys
from distutils.core import setup, Command

class test(Command):
    # Original version of this class posted
    # by Berthold Hoellmann to distutils-sig@python.org
    description = "run tests"

    user_options = [
        ('tests=', 't',
         "comma-separated list of packages that contain test modules"),
        ('use-resources=', 'u',
         "resources to use - resource names are defined by tests"),
        ('refcounts', 'r',
         "repeat tests to search for refcount leaks (requires 'sys.gettotalrefcount')"),
        ]

    boolean_options = ["refcounts"]

    def initialize_options(self):
        self.build_base = 'build'
        self.use_resources = ""
        self.refcounts = False
        self.tests = "ctypeslib.test"

    # initialize_options()

    def finalize_options(self):
        if self.refcounts and not hasattr(sys, "gettotalrefcount"):
            raise DistutilsOptionError("refcount option requires Python debug build")
        self.tests = self.tests.split(",")
        self.use_resources = self.use_resources.split(",")

    # finalize_options()

    def run(self):
        self.run_command('build')

        import ctypes.test
        ctypes.test.use_resources.extend(self.use_resources)

        for name in self.tests:
            package = __import__(name, globals(), locals(), ['*'])
            print "Testing package", name, (sys.version, sys.platform, os.name)
            ctypes.test.run_tests(package,
                                  "test_*.py",
                                  self.verbose,
                                  self.refcounts)

    # run()

# class test

setup(name="ctypeslib",
      packages = ['ctypeslib', 'ctypeslib.codegen'],
      scripts = ['scripts/h2xml.py', 'scripts/xml2py.py'],
      description="ctypes code generator",
      long_description = __doc__,
      author="Thomas Heller",
      author_email="theller@ctypes.org",
      license="MIT License",
      version = "0.5.3",

      url="http://starship.python.net/crew/theller/ctypeswiki.cgi",
      download_url="http://svn.python.org/projects/ctypes/trunk/ctypeslib",

      cmdclass = {'test': test},

      )
<|endoftext|>


<commit_before>import setuptools
import distutils.cmd
import distutils.log
from setuptools import setup
from setuptools.command.install import install
import subprocess
import os

class CudaCommand(distutils.cmd.Command):
    description = "Compile CUDA sources"
    user_options = [
        ("gcc=", None, "Path to the gcc compiler."),
        ("nvcc=", None, "Path to the Nvidia nvcc compiler."),
    ]

    def run(self):
        srcPath = os.path.abspath("./phi/solver/cuda/src")
        buildPath = os.path.abspath("./phi/solver/cuda/build")
        print("Source Path:\t" + srcPath)
        print("Build Path:\t" + buildPath)

        # Get TF Compile/Link Flags and write to env
        import tensorflow as tf
        TF_CFLAGS = tf.sysconfig.get_compile_flags()
        TF_LFLAGS = tf.sysconfig.get_link_flags()

        # Remove old build files
        if os.path.isdir(buildPath):
            print("Removing old build files from %s" % buildPath)
            for f in os.listdir(buildPath):
                os.remove(os.path.join(buildPath, f))
        else:
            print("Creating build directory at %s" % buildPath)
            os.mkdir(buildPath)

        print("Compiling CUDA code...")
        # Build the Laplace Matrix Generation CUDA Kernels
        subprocess.check_call([self.nvcc,
                               "-std=c++11",
                               "-c",
                               "-o",
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               os.path.join(srcPath, "laplace_op.cu.cc"),
                               "-x",
                               "cu",
                               "-Xcompiler",
                               "-fPIC"]
                               + TF_CFLAGS)

        # Build the Laplace Matrix Generation Custom Op
        # This is only needed for the Laplace Matrix Generation Benchmark
        subprocess.check_call([self.gcc,
                               "-std=c++11",
                               "-shared",
                               "-o",
                               os.path.join(buildPath, "laplace_op.so"),
                               os.path.join(srcPath, "laplace_op.cc"),
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               "-fPIC"]
                               + TF_CFLAGS + TF_LFLAGS)

        # Build the Pressure Solver CUDA Kernels
        subprocess.check_call([self.nvcc,
                               "-std=c++11",
                               "-c",
                               "-lcublas",
                               "-o",
                               os.path.join(buildPath, "pressure_solve_op.cu.o"),
                               os.path.join(srcPath, "pressure_solve_op.cu.cc"),
                               "-x", "cu",
                               "-Xcompiler",
                               "-fPIC"]
                               + TF_CFLAGS)

        # Build the Pressure Solver Custom Op
        subprocess.check_call([self.gcc,
                               "-std=c++11",
                               "-shared",
                               "-o",
                               os.path.join(buildPath, "pressure_solve_op.so"),
                               os.path.join(srcPath, "pressure_solve_op.cc"),
                               os.path.join(buildPath, "pressure_solve_op.cu.o"),
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               "-fPIC"]
                               + TF_CFLAGS + TF_LFLAGS)

    def initialize_options(self):
        self.gcc = "gcc"
        self.nvcc = "nvcc"

    def finalize_options(self):
        assert os.path.isfile(self.gcc) or self.gcc == "gcc"
        assert os.path.isfile(self.nvcc) or self.nvcc == "nvcc"

extras = {
    'gui': ["dash", "dash-renderer", "dash-html-components", "dash-core-components", "plotly"],
}

setup(
    name='phiflow',
    version='0.3.1',
    packages=['phi', 'phi.data', 'phi.local', 'phi.math', 'phi.physics', 'phi.solver', 'phi.tf', 'phi.viz'],
    cmdclass={
        "cuda": CudaCommand,
    },
    include_package_data=True,
    url='https://bitbucket.org/thunil/mantaflowgit/src/PhiFlow/',
    license='Apache License, Version 2.0',
    author='Philipp Holl',
    author_email='philipp.holl@tum.de',
    description='Fully Differentiable Grid-based Fluid Simulations on the GPU',
    install_requires=['six'],
    extras_require=extras
)
<commit_msg>Change version to 0.3.2<commit_after>import setuptools
import distutils.cmd
import distutils.log
from setuptools import setup
from setuptools.command.install import install
import subprocess
import os

class CudaCommand(distutils.cmd.Command):
    description = "Compile CUDA sources"
    user_options = [
        ("gcc=", None, "Path to the gcc compiler."),
        ("nvcc=", None, "Path to the Nvidia nvcc compiler."),
    ]

    def run(self):
        srcPath = os.path.abspath("./phi/solver/cuda/src")
        buildPath = os.path.abspath("./phi/solver/cuda/build")
        print("Source Path:\t" + srcPath)
        print("Build Path:\t" + buildPath)

        # Get TF Compile/Link Flags and write to env
        import tensorflow as tf
        TF_CFLAGS = tf.sysconfig.get_compile_flags()
        TF_LFLAGS = tf.sysconfig.get_link_flags()

        # Remove old build files
        if os.path.isdir(buildPath):
            print("Removing old build files from %s" % buildPath)
            for f in os.listdir(buildPath):
                os.remove(os.path.join(buildPath, f))
        else:
            print("Creating build directory at %s" % buildPath)
            os.mkdir(buildPath)

        print("Compiling CUDA code...")
        # Build the Laplace Matrix Generation CUDA Kernels
        subprocess.check_call([self.nvcc,
                               "-std=c++11",
                               "-c",
                               "-o",
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               os.path.join(srcPath, "laplace_op.cu.cc"),
                               "-x",
                               "cu",
                               "-Xcompiler",
                               "-fPIC"]
                               + TF_CFLAGS)

        # Build the Laplace Matrix Generation Custom Op
        # This is only needed for the Laplace Matrix Generation Benchmark
        subprocess.check_call([self.gcc,
                               "-std=c++11",
                               "-shared",
                               "-o",
                               os.path.join(buildPath, "laplace_op.so"),
                               os.path.join(srcPath, "laplace_op.cc"),
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               "-fPIC"]
                               + TF_CFLAGS + TF_LFLAGS)

        # Build the Pressure Solver CUDA Kernels
        subprocess.check_call([self.nvcc,
                               "-std=c++11",
                               "-c",
                               "-lcublas",
                               "-o",
                               os.path.join(buildPath, "pressure_solve_op.cu.o"),
                               os.path.join(srcPath, "pressure_solve_op.cu.cc"),
                               "-x", "cu",
                               "-Xcompiler",
                               "-fPIC"]
                               + TF_CFLAGS)

        # Build the Pressure Solver Custom Op
        subprocess.check_call([self.gcc,
                               "-std=c++11",
                               "-shared",
                               "-o",
                               os.path.join(buildPath, "pressure_solve_op.so"),
                               os.path.join(srcPath, "pressure_solve_op.cc"),
                               os.path.join(buildPath, "pressure_solve_op.cu.o"),
                               os.path.join(buildPath, "laplace_op.cu.o"),
                               "-fPIC"]
                               + TF_CFLAGS + TF_LFLAGS)

    def initialize_options(self):
        self.gcc = "gcc"
        self.nvcc = "nvcc"

    def finalize_options(self):
        assert os.path.isfile(self.gcc) or self.gcc == "gcc"
        assert os.path.isfile(self.nvcc) or self.nvcc == "nvcc"

extras = {
    'gui': ["dash", "dash-renderer", "dash-html-components", "dash-core-components", "plotly"],
}

setup(
    name='phiflow',
    version='0.3.2',
    packages=['phi', 'phi.data', 'phi.local', 'phi.math', 'phi.physics', 'phi.solver', 'phi.tf', 'phi.viz'],
    cmdclass={
        "cuda": CudaCommand,
    },
    include_package_data=True,
    url='https://bitbucket.org/thunil/mantaflowgit/src/PhiFlow/',
    license='Apache License, Version 2.0',
    author='Philipp Holl',
    author_email='philipp.holl@tum.de',
    description='Fully Differentiable Grid-based Fluid Simulations on the GPU',
    install_requires=['six'],
    extras_require=extras
)
<|endoftext|>


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

from setuptools import setup

import fandjango

setup(
    name = 'fandjango',
    version = fandjango.__version__,
    description = "Fandjango makes it easy to create Facebook applications powered by Django",
    author = "Johannes Gorset",
    author_email = "jgorset@gmail.com",
    url = "http://github.com/jgorset/fandjango",
    packages = ['fandjango', 'fandjango.migrations', 'fandjango.templatetags'],
    package_data = {
        'fandjango': ['templates/*']
    },
    install_requires = ['facepy>=0.4.2', 'requests==0.7.6']
)
<commit_msg>Edit setup description<commit_after>#!/usr/bin/env python

from setuptools import setup

import fandjango

setup(
    name = 'fandjango',
    version = fandjango.__version__,
    description = "Fandjango makes it easy to create Facebook applications with Django.",
    author = "Johannes Gorset",
    author_email = "jgorset@gmail.com",
    url = "http://github.com/jgorset/fandjango",
    packages = ['fandjango', 'fandjango.migrations', 'fandjango.templatetags'],
    package_data = {
        'fandjango': ['templates/*']
    },
    install_requires = ['facepy>=0.4.2', 'requests==0.7.6']
)
<|endoftext|>


<commit_before># Copyright (c) 2011 Mathieu Turcotte
# Licensed under the MIT license.

from distutils.core import setup

def read(path):
    return open(path).read()

setup(
    name="msparser",
    py_modules=["msparser"],
    version="1.2",
    license="MIT",
    description="Valgrind massif.out parser",
    long_description=read("README.rst"),
    author="Mathieu Turcotte",
    author_email="turcotte.mat@gmail.com",
    url="https://github.com/MathieuTurcotte/msparser",
    keywords=["valgrind", "massif", "parser"],
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Environment :: Other Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Text Processing :: General",
    ]
)
<commit_msg>Bump version number to 1.3.<commit_after># Copyright (c) 2011 Mathieu Turcotte
# Licensed under the MIT license.

from distutils.core import setup

def read(path):
    return open(path).read()

setup(
    name="msparser",
    py_modules=["msparser"],
    version="1.3",
    license="MIT",
    description="Valgrind massif.out parser",
    long_description=read("README.rst"),
    author="Mathieu Turcotte",
    author_email="turcotte.mat@gmail.com",
    url="https://github.com/MathieuTurcotte/msparser",
    keywords=["valgrind", "massif", "parser"],
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Environment :: Other Environment",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Text Processing :: General",
    ]
)
<|endoftext|>