<commit_before>from distutils.core import setup
setup(
    name="quepy",
    version="0.1",
    description="A framework to convert natural language to database queries.",
    long_description=open('README.rst').read(),
    author="Rafael Carrascosa, Gonzalo Garcia Berrotaran",
    author_email="rafacarrascosa@gmail.com",
    url="https://github.com/machinalis/quepy",
    keywords=["regular expressions", "regexp", "re", "NLP",
              "natural language processing",
              "natural language interface to database", "sparql", "database",
              "interface", "quepy"],
    classifiers=[
        "Programming Language :: Python",
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Topic :: Database",
        "Topic :: Scientific/Engineering :: Human Machine Interfaces",
        "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
        "Topic :: Software Development :: Libraries :: Application Frameworks",
        "Topic :: Text Processing :: Linguistic",
        "Topic :: Text Processing",
        "Topic :: Utilities",
        ],
    packages=["quepy"],
    install_requires=["refo", "nltk", "SPARQLWrapper"],
    scripts=["scripts/quepy"]
)
<commit_msg>try to use setuptools and fallback to distutils<commit_after>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
    name="quepy",
    version="0.1",
    description="A framework to convert natural language to database queries.",
    long_description=open('README.rst').read(),
    author="Rafael Carrascosa, Gonzalo Garcia Berrotaran",
    author_email="rafacarrascosa@gmail.com",
    url="https://github.com/machinalis/quepy",
    keywords=["regular expressions", "regexp", "re", "NLP",
              "natural language processing",
              "natural language interface to database", "sparql", "database",
              "interface", "quepy"],
    classifiers=[
        "Programming Language :: Python",
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Topic :: Database",
        "Topic :: Scientific/Engineering :: Human Machine Interfaces",
        "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
        "Topic :: Software Development :: Libraries :: Application Frameworks",
        "Topic :: Text Processing :: Linguistic",
        "Topic :: Text Processing",
        "Topic :: Utilities",
        ],
    packages=["quepy"],
    install_requires=["refo", "nltk", "SPARQLWrapper"],
    scripts=["scripts/quepy"]
)
<|endoftext|>


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

"""Install script for setuptools."""

from distutils import cmd
from distutils import log
import fnmatch
import os
import platform
import subprocess
import sys

from setuptools import find_packages
from setuptools import setup
from setuptools.command import install
from setuptools.command import test

PLATFORM_SUFFIXES = {
    'Linux': 'linux',
    'Windows': 'win64',
    'Darwin': 'macos',
}
DEFAULT_HEADERS_DIR = '~/.mujoco/mujoco200_{}/include'.format(
    PLATFORM_SUFFIXES[platform.system()])

# Relative paths to the binding generator script and the output directory.
AUTOWRAP_PATH = 'dm_control/autowrap/autowrap.py'
MJBINDINGS_DIR = 'dm_control/mujoco/wrapper/mjbindings'

# We specify the header filenames explicitly rather than listing the contents
# of the `HEADERS_DIR` at runtime, since it will probably contain other stuff
# (e.g. `glfw.h`).
HEADER_FILENAMES = [
    'mjdata.h',
    'mjmodel.h',
    'mjrender.h',
    'mjui.h',
    'mjvisualize.h',
    'mjxmacro.h',
    'mujoco.h',
]

def _initialize_mjbindings_options(cmd_instance):
  """Set default values for options relating to `build_mjbindings`."""
  # A default value must be assigned to each user option here.
  cmd_instance.inplace = 0
  cmd_instance.headers_dir = DEFAULT_HEADERS_DIR

def _finalize_mjbindings_options(cmd_instance):
  """Post-process options relating to `build_mjbindings`."""
  headers_dir = os.path.expanduser(cmd_instance.headers_dir)
  header_paths = []
  for filename in HEADER_FILENAMES:
    full_path = os.path.join(headers_dir, filename)
    if not os.path.exists(full_path):
      raise IOError('Header file {!r} does not exist.'.format(full_path))
    header_paths.append(full_path)
  cmd_instance.header_paths = ' '.join(header_paths)

class BuildMJBindingsCommand(cmd.Command):
  """Runs `autowrap.py` to generate the low-level ctypes bindings for MuJoCo."""
  description = __doc__
  user_options = [
      # The format is (long option, short option, description).
      ('headers-dir=', None,
       'Path to directory containing MuJoCo headers.'),
      ('inplace=', None,
       'Place generated files in source directory rather than `build-lib`.'),
  ]
  boolean_options = ['inplace']

  def initialize_options(self):
    _initialize_mjbindings_options(self)

  def finalize_options(self):
    _finalize_mjbindings_options(self)

  def run(self):
    cwd = os.path.realpath(os.curdir)
    if self.inplace:
      dist_root = cwd
    else:
      build_cmd = self.get_finalized_command('build')
      dist_root = os.path.realpath(build_cmd.build_lib)
    output_dir = os.path.join(dist_root, MJBINDINGS_DIR)
    command = [
        sys.executable or 'python',
        AUTOWRAP_PATH,
        '--header_paths={}'.format(self.header_paths),
        '--output_dir={}'.format(output_dir)
    ]
    self.announce('Running command: {}'.format(command), level=log.DEBUG)
    try:
      # Prepend the current directory to $PYTHONPATH so that internal imports
      # in `autowrap` can succeed before we've installed anything.
      old_environ = os.environ.copy()
      new_pythonpath = [cwd]
      if 'PYTHONPATH' in old_environ:
        new_pythonpath.append(old_environ['PYTHONPATH'])
      os.environ['PYTHONPATH'] = ':'.join(new_pythonpath)
      subprocess.check_call(command)
    finally:
      os.environ = old_environ

class InstallCommand(install.install):
  """Runs 'build_mjbindings' before installation."""

  user_options = (
      install.install.user_options + BuildMJBindingsCommand.user_options)
  boolean_options = (
      install.install.boolean_options + BuildMJBindingsCommand.boolean_options)

  def initialize_options(self):
    install.install.initialize_options(self)
    _initialize_mjbindings_options(self)

  def finalize_options(self):
    install.install.finalize_options(self)
    _finalize_mjbindings_options(self)

  def run(self):
    self.reinitialize_command('build_mjbindings',
                              inplace=self.inplace,
                              headers_dir=self.headers_dir)
    self.run_command('build_mjbindings')
    install.install.run(self)

class TestCommand(test.test):
  """Prepends path to generated sources before running unit tests."""

  def run(self):
    # Generate ctypes bindings in-place so that they can be imported in tests.
    self.reinitialize_command('build_mjbindings', inplace=1)
    self.run_command('build_mjbindings')
    test.test.run(self)

def find_data_files(package_dir, patterns, excludes=()):
  """Recursively finds files whose names match the given shell patterns."""
  paths = set()

  def is_excluded(s):
    for exclude in excludes:
      if fnmatch.fnmatch(s, exclude):
        return True
    return False

  for directory, _, filenames in os.walk(package_dir):
    if is_excluded(directory):
      continue
    for pattern in patterns:
      for filename in fnmatch.filter(filenames, pattern):
        # NB: paths must be relative to the package directory.
        relative_dirpath = os.path.relpath(directory, package_dir)
        full_path = os.path.join(relative_dirpath, filename)
        if not is_excluded(full_path):
          paths.add(full_path)
  return list(paths)

setup(
    name='dm_control',
    version='0.0.319497192',
    description='Continuous control environments and MuJoCo Python bindings.',
    author='DeepMind',
    license='Apache License, Version 2.0',
    keywords='machine learning control physics MuJoCo AI',
    install_requires=[
        'absl-py>=0.7.0',
        'enum34; python_version < "3.4"',
        'dm-env',
        'dm-tree != 0.1.2',
        'future',
        'futures; python_version == "2.7"',
        'glfw',
        'lxml',
        'numpy',
        'pyopengl >= 3.1.4',
        'pyparsing',
        'setuptools',
        'scipy',
        'six',
    ],
    extras_require={
        'locomotion_mazes': ['labmaze'],
    },
    tests_require=[
        'mock',
        'nose',
        'pillow',
    ],
    test_suite='nose.collector',
    packages=find_packages(),
    package_data={
        'dm_control':
            find_data_files(
                package_dir='dm_control',
                patterns=['*.amc', '*.msh', '*.png', '*.skn', '*.stl', '*.xml'],
                excludes=[
                    '*/dog_assets/extras/*',
                    '*/kinova/meshes/*',  # Exclude non-decimated meshes.
                ]),
    },
    cmdclass={
        'build_mjbindings': BuildMJBindingsCommand,
        'install': InstallCommand,
        'test': TestCommand,
    },
    entry_points={},
)
<commit_msg>Internal change.<commit_after># Copyright 2017-2018 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================

"""Install script for setuptools."""

from distutils import cmd
from distutils import log
import fnmatch
import os
import platform
import subprocess
import sys

from setuptools import find_packages
from setuptools import setup
from setuptools.command import install
from setuptools.command import test

PLATFORM_SUFFIXES = {
    'Linux': 'linux',
    'Windows': 'win64',
    'Darwin': 'macos',
}
DEFAULT_HEADERS_DIR = '~/.mujoco/mujoco200_{}/include'.format(
    PLATFORM_SUFFIXES[platform.system()])

# Relative paths to the binding generator script and the output directory.
AUTOWRAP_PATH = 'dm_control/autowrap/autowrap.py'
MJBINDINGS_DIR = 'dm_control/mujoco/wrapper/mjbindings'

# We specify the header filenames explicitly rather than listing the contents
# of the `HEADERS_DIR` at runtime, since it will probably contain other stuff
# (e.g. `glfw.h`).
HEADER_FILENAMES = [
    'mjdata.h',
    'mjmodel.h',
    'mjrender.h',
    'mjui.h',
    'mjvisualize.h',
    'mjxmacro.h',
    'mujoco.h',
]

def _initialize_mjbindings_options(cmd_instance):
  """Set default values for options relating to `build_mjbindings`."""
  # A default value must be assigned to each user option here.
  cmd_instance.inplace = 0
  cmd_instance.headers_dir = DEFAULT_HEADERS_DIR

def _finalize_mjbindings_options(cmd_instance):
  """Post-process options relating to `build_mjbindings`."""
  headers_dir = os.path.expanduser(cmd_instance.headers_dir)
  header_paths = []
  for filename in HEADER_FILENAMES:
    full_path = os.path.join(headers_dir, filename)
    if not os.path.exists(full_path):
      raise IOError('Header file {!r} does not exist.'.format(full_path))
    header_paths.append(full_path)
  cmd_instance.header_paths = ' '.join(header_paths)

class BuildMJBindingsCommand(cmd.Command):
  """Runs `autowrap.py` to generate the low-level ctypes bindings for MuJoCo."""
  description = __doc__
  user_options = [
      # The format is (long option, short option, description).
      ('headers-dir=', None,
       'Path to directory containing MuJoCo headers.'),
      ('inplace=', None,
       'Place generated files in source directory rather than `build-lib`.'),
  ]
  boolean_options = ['inplace']

  def initialize_options(self):
    _initialize_mjbindings_options(self)

  def finalize_options(self):
    _finalize_mjbindings_options(self)

  def run(self):
    cwd = os.path.realpath(os.curdir)
    if self.inplace:
      dist_root = cwd
    else:
      build_cmd = self.get_finalized_command('build')
      dist_root = os.path.realpath(build_cmd.build_lib)
    output_dir = os.path.join(dist_root, MJBINDINGS_DIR)
    command = [
        sys.executable or 'python',
        AUTOWRAP_PATH,
        '--header_paths={}'.format(self.header_paths),
        '--output_dir={}'.format(output_dir)
    ]
    self.announce('Running command: {}'.format(command), level=log.DEBUG)
    try:
      # Prepend the current directory to $PYTHONPATH so that internal imports
      # in `autowrap` can succeed before we've installed anything.
      old_environ = os.environ.copy()
      new_pythonpath = [cwd]
      if 'PYTHONPATH' in old_environ:
        new_pythonpath.append(old_environ['PYTHONPATH'])
      os.environ['PYTHONPATH'] = ':'.join(new_pythonpath)
      subprocess.check_call(command)
    finally:
      os.environ = old_environ

class InstallCommand(install.install):
  """Runs 'build_mjbindings' before installation."""

  user_options = (
      install.install.user_options + BuildMJBindingsCommand.user_options)
  boolean_options = (
      install.install.boolean_options + BuildMJBindingsCommand.boolean_options)

  def initialize_options(self):
    install.install.initialize_options(self)
    _initialize_mjbindings_options(self)

  def finalize_options(self):
    install.install.finalize_options(self)
    _finalize_mjbindings_options(self)

  def run(self):
    self.reinitialize_command('build_mjbindings',
                              inplace=self.inplace,
                              headers_dir=self.headers_dir)
    self.run_command('build_mjbindings')
    install.install.run(self)

class TestCommand(test.test):
  """Prepends path to generated sources before running unit tests."""

  def run(self):
    # Generate ctypes bindings in-place so that they can be imported in tests.
    self.reinitialize_command('build_mjbindings', inplace=1)
    self.run_command('build_mjbindings')
    test.test.run(self)

def find_data_files(package_dir, patterns, excludes=()):
  """Recursively finds files whose names match the given shell patterns."""
  paths = set()

  def is_excluded(s):
    for exclude in excludes:
      if fnmatch.fnmatch(s, exclude):
        return True
    return False

  for directory, _, filenames in os.walk(package_dir):
    if is_excluded(directory):
      continue
    for pattern in patterns:
      for filename in fnmatch.filter(filenames, pattern):
        # NB: paths must be relative to the package directory.
        relative_dirpath = os.path.relpath(directory, package_dir)
        full_path = os.path.join(relative_dirpath, filename)
        if not is_excluded(full_path):
          paths.add(full_path)
  return list(paths)

setup(
    name='dm_control',
    version='0.0.320659787',
    description='Continuous control environments and MuJoCo Python bindings.',
    author='DeepMind',
    license='Apache License, Version 2.0',
    keywords='machine learning control physics MuJoCo AI',
    install_requires=[
        'absl-py>=0.7.0',
        'enum34; python_version < "3.4"',
        'dm-env',
        'dm-tree != 0.1.2',
        'future',
        'futures; python_version == "2.7"',
        'glfw',
        'lxml',
        'numpy',
        'pyopengl >= 3.1.4',
        'pyparsing',
        'setuptools',
        'scipy',
        'six',
    ],
    extras_require={
        'locomotion_mazes': ['labmaze'],
    },
    tests_require=[
        'mock',
        'nose',
        'pillow',
    ],
    test_suite='nose.collector',
    packages=find_packages(),
    package_data={
        'dm_control':
            find_data_files(
                package_dir='dm_control',
                patterns=['*.amc', '*.msh', '*.png', '*.skn', '*.stl', '*.xml'],
                excludes=[
                    '*/dog_assets/extras/*',
                    '*/kinova/meshes/*',  # Exclude non-decimated meshes.
                ]),
    },
    cmdclass={
        'build_mjbindings': BuildMJBindingsCommand,
        'install': InstallCommand,
        'test': TestCommand,
    },
    entry_points={},
)
<|endoftext|>


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

import sys
import os
try:
    from setuptools import setup, Extension
except ImportError:
    from distutils.core import setup, Extension

__ver__ = "0.3.0"

# Hack for Python 3 to tell distutils to run 2to3 against the files
# copied in the build directory before installing.
# Reference: http://osdir.com/ml/python.python-3000.cvs/2008-03/msg00127.html
try:
    from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
    from distutils.command.build_py import build_py

if os.name == 'posix':
    posix_extension = Extension('_psutil_posix',
                                sources = ['psutil/_psutil_posix.c'])

# Windows
if sys.platform.lower().startswith("win"):

    def get_winver():
        maj,min = sys.getwindowsversion()[0:2]
        return '0x0%s' % ((maj * 100) + min)

    extensions = [Extension('_psutil_mswindows',
                            sources=['psutil/_psutil_mswindows.c',
                                     'psutil/_psutil_common.c',
                                     'psutil/arch/mswindows/process_info.c',
                                     'psutil/arch/mswindows/process_handles.c',
                                     'psutil/arch/mswindows/security.c'],
                            define_macros=[('_WIN32_WINNT', get_winver()),
                                           ('_AVAIL_WINVER_', get_winver())],
                            libraries=["psapi", "kernel32", "advapi32", "shell32",
                                       "netapi32"]
                            )]
# OS X
elif sys.platform.lower().startswith("darwin"):
    extensions = [Extension('_psutil_osx',
                            sources = ['psutil/_psutil_osx.c',
                                       'psutil/_psutil_common.c',
                                       'psutil/arch/osx/process_info.c']
                            ),
                  posix_extension]
# FreeBSD
elif sys.platform.lower().startswith("freebsd"):
    extensions = [Extension('_psutil_bsd',
                            sources = ['psutil/_psutil_bsd.c',
                                       'psutil/_psutil_common.c',
                                       'psutil/arch/bsd/process_info.c']
                            ),
                  posix_extension]
# Linux
elif sys.platform.lower().startswith("linux"):
    extensions = [Extension('_psutil_linux',
                            sources=['psutil/_psutil_linux.c'],
                            ),
                  posix_extension]

else:
    raise NotImplementedError('platform %s is not supported' % sys.platform)

def main():
    setup_args = dict(
        name='psutil',
        version=__ver__,
        download_url="http://psutil.googlecode.com/files/psutil-%s.tar.gz" % __ver__,
        description='A process utilities module for Python',
        long_description="""\
psutil is a module providing convenience functions for monitoring
system and processes in a portable way by using Python.""",
        keywords=['ps', 'top', 'kill', 'free', 'lsof', 'netstat', 'nice',
                  'tty', 'ionice', 'uptime', 'taskmgr', 'process'],
        author='Giampaolo Rodola, Dave Daeschler, Jay Loden',
        author_email='psutil-dev@googlegroups.com',
        url='http://code.google.com/p/psutil/',
        platforms='Platform Independent',
        license='License :: OSI Approved :: BSD License',
        packages=['psutil'],
        cmdclass={'build_py':build_py},  # Python 3.X
        classifiers=[
              'Development Status :: 5 - Production/Stable',
              'Environment :: Console',
              'Operating System :: MacOS :: MacOS X',
              'Operating System :: Microsoft :: Windows :: Windows NT/2000',
              'Operating System :: POSIX :: Linux',
              'Operating System :: POSIX :: BSD :: FreeBSD',
              'Operating System :: OS Independent',
              'Programming Language :: C',
              'Programming Language :: Python',
              'Programming Language :: Python :: 2',
              'Programming Language :: Python :: 2.4',
              'Programming Language :: Python :: 2.5',
              'Programming Language :: Python :: 2.6',
              'Programming Language :: Python :: 2.7',
              'Programming Language :: Python :: 3',
              'Programming Language :: Python :: 3.0',
              'Programming Language :: Python :: 3.1',
              'Programming Language :: Python :: 3.2',
              'Topic :: System :: Monitoring',
              'Topic :: System :: Networking',
              'Topic :: System :: Benchmark',
              'Topic :: System :: Systems Administration',
              'Topic :: Utilities',
              'Topic :: Software Development :: Libraries :: Python Modules',
              'Intended Audience :: Developers',
              'Intended Audience :: System Administrators',
              'License :: OSI Approved :: MIT License',
              ],
        )
    if extensions is not None:
        setup_args["ext_modules"] = extensions

    setup(**setup_args)

if __name__ == '__main__':
    main()

<commit_msg>update setup.py metadata<commit_after>#!/usr/bin/env python
#
# $Id$
#

import sys
import os
try:
    from setuptools import setup, Extension
except ImportError:
    from distutils.core import setup, Extension

__ver__ = "0.3.0"

# Hack for Python 3 to tell distutils to run 2to3 against the files
# copied in the build directory before installing.
# Reference: http://osdir.com/ml/python.python-3000.cvs/2008-03/msg00127.html
try:
    from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
    from distutils.command.build_py import build_py

if os.name == 'posix':
    posix_extension = Extension('_psutil_posix',
                                sources = ['psutil/_psutil_posix.c'])

# Windows
if sys.platform.lower().startswith("win"):

    def get_winver():
        maj,min = sys.getwindowsversion()[0:2]
        return '0x0%s' % ((maj * 100) + min)

    extensions = [Extension('_psutil_mswindows',
                            sources=['psutil/_psutil_mswindows.c',
                                     'psutil/_psutil_common.c',
                                     'psutil/arch/mswindows/process_info.c',
                                     'psutil/arch/mswindows/process_handles.c',
                                     'psutil/arch/mswindows/security.c'],
                            define_macros=[('_WIN32_WINNT', get_winver()),
                                           ('_AVAIL_WINVER_', get_winver())],
                            libraries=["psapi", "kernel32", "advapi32", "shell32",
                                       "netapi32"]
                            )]
# OS X
elif sys.platform.lower().startswith("darwin"):
    extensions = [Extension('_psutil_osx',
                            sources = ['psutil/_psutil_osx.c',
                                       'psutil/_psutil_common.c',
                                       'psutil/arch/osx/process_info.c']
                            ),
                  posix_extension]
# FreeBSD
elif sys.platform.lower().startswith("freebsd"):
    extensions = [Extension('_psutil_bsd',
                            sources = ['psutil/_psutil_bsd.c',
                                       'psutil/_psutil_common.c',
                                       'psutil/arch/bsd/process_info.c']
                            ),
                  posix_extension]
# Linux
elif sys.platform.lower().startswith("linux"):
    extensions = [Extension('_psutil_linux',
                            sources=['psutil/_psutil_linux.c'],
                            ),
                  posix_extension]

else:
    raise NotImplementedError('platform %s is not supported' % sys.platform)

def main():
    setup_args = dict(
        name='psutil',
        version=__ver__,
        download_url="http://psutil.googlecode.com/files/psutil-%s.tar.gz" % __ver__,
        description='A process utilities module for Python',
        long_description="""\
psutil is a module providing convenience functions for monitoring
system and processes in a portable way by using Python.""",
        keywords=['ps', 'top', 'kill', 'free', 'lsof', 'netstat', 'nice',
                  'tty', 'ionice', 'uptime', 'taskmgr', 'process', 'df',
                  'monitoring'],
        author='Giampaolo Rodola, Dave Daeschler, Jay Loden',
        author_email='psutil-dev@googlegroups.com',
        url='http://code.google.com/p/psutil/',
        platforms='Platform Independent',
        license='License :: OSI Approved :: BSD License',
        packages=['psutil'],
        cmdclass={'build_py':build_py},  # Python 3.X
        classifiers=[
              'Development Status :: 5 - Production/Stable',
              'Environment :: Console',
              'Operating System :: MacOS :: MacOS X',
              'Operating System :: Microsoft :: Windows :: Windows NT/2000',
              'Operating System :: POSIX :: Linux',
              'Operating System :: POSIX :: BSD :: FreeBSD',
              'Operating System :: OS Independent',
              'Programming Language :: C',
              'Programming Language :: Python',
              'Programming Language :: Python :: 2',
              'Programming Language :: Python :: 2.4',
              'Programming Language :: Python :: 2.5',
              'Programming Language :: Python :: 2.6',
              'Programming Language :: Python :: 2.7',
              'Programming Language :: Python :: 3',
              'Programming Language :: Python :: 3.0',
              'Programming Language :: Python :: 3.1',
              'Programming Language :: Python :: 3.2',
              'Topic :: System :: Monitoring',
              'Topic :: System :: Networking',
              'Topic :: System :: Benchmark',
              'Topic :: System :: Systems Administration',
              'Topic :: Utilities',
              'Topic :: Software Development :: Libraries :: Python Modules',
              'Intended Audience :: Developers',
              'Intended Audience :: System Administrators',
              'License :: OSI Approved :: MIT License',
              ],
        )
    if extensions is not None:
        setup_args["ext_modules"] = extensions

    setup(**setup_args)

if __name__ == '__main__':
    main()

<|endoftext|>


<commit_before>from setuptools import setup

setup(
	version = '1.2.5',
	name = 'dotmap',
	packages = ['dotmap'], # this must be the same as the name above
	description = 'ordered, dynamically-expandable dot-access dictionary',
	author = 'Chris Redford',
	author_email = 'credford@gmail.com',
	url = 'https://github.com/drgrib/dotmap', # use the URL to the github repo
	download_url = 'https://github.com/drgrib/dotmap/tarball/1.0',
	keywords = ['dict', 'dot', 'map', 'order', 'ordered', 'ordereddict', 'access', 'dynamic'], # arbitrary keywords
	classifiers = [],
)<commit_msg>update version<commit_after>from setuptools import setup

setup(
	version = '1.2.6',
	name = 'dotmap',
	packages = ['dotmap'], # this must be the same as the name above
	description = 'ordered, dynamically-expandable dot-access dictionary',
	author = 'Chris Redford',
	author_email = 'credford@gmail.com',
	url = 'https://github.com/drgrib/dotmap', # use the URL to the github repo
	download_url = 'https://github.com/drgrib/dotmap/tarball/1.0',
	keywords = ['dict', 'dot', 'map', 'order', 'ordered', 'ordereddict', 'access', 'dynamic'], # arbitrary keywords
	classifiers = [],
)<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from packaging import version
import re
from niftynet.utilities.versioning import get_niftynet_version
from .versioneer import get_cmdclass

niftynet_version = get_niftynet_version()

# Regex for checking PEP 440 conformity
# https://www.python.org/dev/peps/pep-0440/#id79
pep440_regex = re.compile(
    r"^\s*" + version.VERSION_PATTERN + r"\s*$",
    re.VERBOSE | re.IGNORECASE,
)

# Check PEP 440 conformity
if pep440_regex.match(niftynet_version) is None:
    raise ValueError('The version string {} does not conform to'
                     ' PEP 440'.format(niftynet_version))

# Get the summary
description = 'An open-source convolutional neural networks platform' +\
              ' for research in medical image analysis and' +\
              ' image-guided therapy'

# Get the long description
with open('pip/long_description.rst') as f:
    long_description = f.read()

setup(
    name='NiftyNet',

    version=niftynet_version,
    cmdclass=get_cmdclass(),

    description=description,
    long_description=long_description,

    url='http://niftynet.io/',

    author='NiftyNet Consortium',
    author_email='nifty-net@live.ucl.ac.uk',

    license='Apache 2.0',

    classifiers=[
        'Development Status :: 3 - Alpha',

        'Intended Audience :: Developers',
        'Intended Audience :: Healthcare Industry',
        'Intended Audience :: Science/Research',

        'License :: OSI Approved :: Apache Software License',

        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',

        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Topic :: Scientific/Engineering :: Image Recognition',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',
    ],

    packages=find_packages(
        exclude=[
            'pip',
            'config',
            'data',
            'demos',
            'tests',
        ]
    ),

    install_requires=[
        'six>=1.10',
        'nibabel>=2.1.0',
        'numpy>=1.12',
        'scipy>=0.18',
        'configparser',
        'pandas',
        'pillow',
        'blinker'
    ],

    entry_points={
        'console_scripts': [
            'net_segment=niftynet:main',
            'net_download=niftynet.utilities.download:main',
            'net_run=niftynet:main',
            'net_regress=niftynet:main',
            'net_gan=niftynet:main',
            'net_autoencoder=niftynet:main',
            'net_classify=niftynet:main',
        ],
    },
)

<commit_msg>Issue #212: using full path for calling versioneer functions due to https://github.com/warner/python-versioneer/issues/101\#issuecomment-152695813<commit_after># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from packaging import version
import re
from niftynet.utilities.versioning import get_niftynet_version
import versioneer

niftynet_version = get_niftynet_version()

# Regex for checking PEP 440 conformity
# https://www.python.org/dev/peps/pep-0440/#id79
pep440_regex = re.compile(
    r"^\s*" + version.VERSION_PATTERN + r"\s*$",
    re.VERBOSE | re.IGNORECASE,
)

# Check PEP 440 conformity
if pep440_regex.match(niftynet_version) is None:
    raise ValueError('The version string {} does not conform to'
                     ' PEP 440'.format(niftynet_version))

# Get the summary
description = 'An open-source convolutional neural networks platform' +\
              ' for research in medical image analysis and' +\
              ' image-guided therapy'

# Get the long description
with open('pip/long_description.rst') as f:
    long_description = f.read()

setup(
    name='NiftyNet',

    version=niftynet_version,
    cmdclass=versioneer.get_cmdclass(),

    description=description,
    long_description=long_description,

    url='http://niftynet.io/',

    author='NiftyNet Consortium',
    author_email='nifty-net@live.ucl.ac.uk',

    license='Apache 2.0',

    classifiers=[
        'Development Status :: 3 - Alpha',

        'Intended Audience :: Developers',
        'Intended Audience :: Healthcare Industry',
        'Intended Audience :: Science/Research',

        'License :: OSI Approved :: Apache Software License',

        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',

        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Topic :: Scientific/Engineering :: Image Recognition',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',
    ],

    packages=find_packages(
        exclude=[
            'pip',
            'config',
            'data',
            'demos',
            'tests',
        ]
    ),

    install_requires=[
        'six>=1.10',
        'nibabel>=2.1.0',
        'numpy>=1.12',
        'scipy>=0.18',
        'configparser',
        'pandas',
        'pillow',
        'blinker'
    ],

    entry_points={
        'console_scripts': [
            'net_segment=niftynet:main',
            'net_download=niftynet.utilities.download:main',
            'net_run=niftynet:main',
            'net_regress=niftynet:main',
            'net_gan=niftynet:main',
            'net_autoencoder=niftynet:main',
            'net_classify=niftynet:main',
        ],
    },
)

<|endoftext|>


<commit_before>from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import sys

ext_modules = [
    Extension(
        'pbtest',
        ['py/main.cpp'],
        include_dirs=['include'],
        language='c++',
    ),
]

class BuildExt(build_ext):
    """A custom build extension for adding compiler-specific options."""
    c_opts = {
        'msvc': ['/EHsc'],
        'unix': ['-std=c++11'],
    }

    if sys.platform == 'darwin':
        c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']

    def build_extensions(self):
        ct = self.compiler.compiler_type
        opts = self.c_opts.get(ct, [])
        for ext in self.extensions:
            ext.extra_compile_args = opts
        build_ext.build_extensions(self)

setup(
    name='pbtest',
    version='0.0.1',
    author='Sylvain Corlay',
    author_email='sylvain.corlay@gmail.com',
    url='https://github.com/pybind/pbtest',
    description='A test project using pybind11',
    long_description='',
    ext_modules=ext_modules,
    install_requires=['pybind11'],
    cmdclass={'build_ext': BuildExt},
    zip_safe=False,
)
<commit_msg>Use -std=c++14 flag when available on clang and gcc<commit_after>from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import os, sys

ext_modules = [
    Extension(
        'pbtest',
        ['py/main.cpp'],
        include_dirs=['include'],
        language='c++',
    ),
]

def has_flag(compiler, flagname):
    """Return a boolean indicating whether a flag name is supported on
    the specified compiler.
    """
    import tempfile
    fd, fname = tempfile.mkstemp('.cpp', 'main', text=True)
    f = os.fdopen(fd, 'w')
    try:
        f.write('int main (int argc, char **argv) { return 0; }')
    finally:
        f.close()
    try:
        compiler.compile([fname], extra_postargs=[flagname])
    except setuptools.distutils.errors.CompileError:
        return False
    return True

def cpp_flag(compiler):
    """Return the -std=c++[11/14] compiler flag.

    The c++14 is prefered over c++11 (when it is available).
    """
    if has_flag(compiler, '-std=c++14'):
        return '-std=c++14'
    elif has_flag(compiler, '-std=c++11'):
        return '-std=c++11'
    else:
        raise RuntimeError('Unsupported compiler -- at least C++11 support is needed!')

class BuildExt(build_ext):
    """A custom build extension for adding compiler-specific options."""
    c_opts = {
        'msvc': ['/EHsc'],
        'unix': [],
    }

    if sys.platform == 'darwin':
        c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7']

    def build_extensions(self):
        ct = self.compiler.compiler_type
        opts = self.c_opts.get(ct, [])
        if ct == 'unix':
            opts.append(cpp_flag(self.compiler))
        for ext in self.extensions:
            ext.extra_compile_args = opts
        build_ext.build_extensions(self)

setup(
    name='pbtest',
    version='0.0.1',
    author='Sylvain Corlay',
    author_email='sylvain.corlay@gmail.com',
    url='https://github.com/pybind/pbtest',
    description='A test project using pybind11',
    long_description='',
    ext_modules=ext_modules,
    install_requires=['pybind11'],
    cmdclass={'build_ext': BuildExt},
    zip_safe=False,
)
<|endoftext|>


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

from setuptools import setup, find_packages

dev_requires = [
    'Sphinx==1.2.2',
]

install_requires = [
    'nodeconductor>=0.80.0',
]

setup(
    name='nodeconductor-saltstack',
    version='0.1.1',
    author='OpenNode Team',
    author_email='info@opennodecloud.com',
    url='http://nodeconductor.com',
    description='NodeConductor SaltStack allows to manage saltstack driven infrastructure',
    long_description=open('README.rst').read(),
    package_dir={'': 'src'},
    packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
    install_requires=install_requires,
    zip_safe=False,
    extras_require={
        'dev': dev_requires,
    },
    entry_points={
        'nodeconductor_extensions': (
            'saltstack = nodeconductor_saltstack.saltstack.extension:SaltStackExtension',
            'exchange = nodeconductor_saltstack.exchange.extension:ExchangeExtension',
            'sharepoint = nodeconductor_saltstack.sharepoint.extension:SharepointExtension',
        ),
    },
    # tests_require=tests_requires,
    include_package_data=True,
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'License :: OSI Approved :: Apache Software License',
    ],
)
<commit_msg>Preparing new release: 0.1.2<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages

dev_requires = [
    'Sphinx==1.2.2',
]

install_requires = [
    'nodeconductor>=0.80.0',
]

setup(
    name='nodeconductor-saltstack',
    version='0.1.2',
    author='OpenNode Team',
    author_email='info@opennodecloud.com',
    url='http://nodeconductor.com',
    description='NodeConductor SaltStack allows to manage saltstack driven infrastructure',
    long_description=open('README.rst').read(),
    package_dir={'': 'src'},
    packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
    install_requires=install_requires,
    zip_safe=False,
    extras_require={
        'dev': dev_requires,
    },
    entry_points={
        'nodeconductor_extensions': (
            'saltstack = nodeconductor_saltstack.saltstack.extension:SaltStackExtension',
            'exchange = nodeconductor_saltstack.exchange.extension:ExchangeExtension',
            'sharepoint = nodeconductor_saltstack.sharepoint.extension:SharepointExtension',
        ),
    },
    # tests_require=tests_requires,
    include_package_data=True,
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'License :: OSI Approved :: Apache Software License',
    ],
)
<|endoftext|>


<commit_before>import os
import sys
import setuptools
if sys.version_info[0] < 3:
    from codecs import open

def local_file(name):
    return os.path.relpath(os.path.join(os.path.dirname(__file__), name))

README = local_file("README.rst")

with open(local_file("src/stratis_cli/_version.py")) as o:
        exec(o.read())

setuptools.setup(
    name='stratis-cli',
    version=__version__,
    author='Anne Mulhern',
    author_email='amulhern@redhat.com',
    description='prototype stratis cli',
    long_description=open(README, encoding='utf-8').read(),
    platforms=['Linux'],
    license='Apache 2.0',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries',
        'Topic :: System :: Filesystems',
        'Topic :: Systems Administration'
        ],
    install_requires = [
       'stratisd-client-dbus>=0.06'
    ],
    package_dir={"": "src"},
    packages=setuptools.find_packages("src"),
    scripts=['bin/stratis']
    )
<commit_msg>Update stratisd-client-dbus requirement to 0.07<commit_after>import os
import sys
import setuptools
if sys.version_info[0] < 3:
    from codecs import open

def local_file(name):
    return os.path.relpath(os.path.join(os.path.dirname(__file__), name))

README = local_file("README.rst")

with open(local_file("src/stratis_cli/_version.py")) as o:
        exec(o.read())

setuptools.setup(
    name='stratis-cli',
    version=__version__,
    author='Anne Mulhern',
    author_email='amulhern@redhat.com',
    description='prototype stratis cli',
    long_description=open(README, encoding='utf-8').read(),
    platforms=['Linux'],
    license='Apache 2.0',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries',
        'Topic :: System :: Filesystems',
        'Topic :: Systems Administration'
        ],
    install_requires = [
       'stratisd-client-dbus>=0.07'
    ],
    package_dir={"": "src"},
    packages=setuptools.find_packages("src"),
    scripts=['bin/stratis']
    )
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2009 Benoit Chesneau <benoitc@e-engura.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

try:
    from setuptools import setup, find_packages
except ImportError:
    import ez_setup
    ez_setup.use_setuptools()
    from setuptools import setup, find_packages

import os
import sys

setup(
    name = 'couchdbkit',
    version = '0.1.7.1',

    description = 'Python couchdb kit',
    long_description = \
"""CouchDB is document oriented database. Couchdbkit framework try
to keep its simplicity when you manage it in python""",
    author = 'Benoit Chesneau',
    author_email = 'benoitc@e-engura.com',
    license = 'Apache License 2',
    url = 'http://hg.e-engura.org/couchdbkit',

    classifiers = [
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
        'Topic :: Utilities',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages = find_packages(),

    zip_safe = False,

    install_requires = [
        'py-restclient>=1.3',
        'simplejson'
    ],

    test_suite='tests',

)
<commit_msg>bump release for compatibility with py25.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2009 Benoit Chesneau <benoitc@e-engura.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

try:
    from setuptools import setup, find_packages
except ImportError:
    import ez_setup
    ez_setup.use_setuptools()
    from setuptools import setup, find_packages

import os
import sys

setup(
    name = 'couchdbkit',
    version = '0.1.7.2',

    description = 'Python couchdb kit',
    long_description = \
"""CouchDB is document oriented database. Couchdbkit framework try
to keep its simplicity when you manage it in python""",
    author = 'Benoit Chesneau',
    author_email = 'benoitc@e-engura.com',
    license = 'Apache License 2',
    url = 'http://hg.e-engura.org/couchdbkit',

    classifiers = [
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
        'Topic :: Utilities',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages = find_packages(),

    zip_safe = False,

    install_requires = [
        'py-restclient>=1.3',
        'simplejson'
    ],

    test_suite='tests',

)
<|endoftext|>


<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2012 OpenStack 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
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from setuptools import find_packages
from setuptools.command.sdist import sdist
from setuptools import setup
import subprocess

from keystone.openstack.common.setup import parse_requirements
from keystone.openstack.common.setup import parse_dependency_links
from keystone.openstack.common.setup import write_requirements
from keystone.openstack.common.setup import write_git_changelog

class local_sdist(sdist):
    """Customized sdist hook - builds the ChangeLog file from VC first"""
    def run(self):
        write_git_changelog()
        sdist.run(self)
cmdclass = {'sdist': local_sdist}

try:
    from sphinx.setup_command import BuildDoc

    class local_BuildDoc(BuildDoc):
        def run(self):
            subprocess.call('sphinx-apidoc -f -o doc/source keystone',
                            shell=True)
            for builder in ['html', 'man']:
                self.builder = builder
                self.finalize_options()
                BuildDoc.run(self)
    cmdclass['build_sphinx'] = local_BuildDoc

except:
    pass

requires = parse_requirements()
depend_links = parse_dependency_links()

write_requirements()

setup(name='keystone',
      version='2012.1.2',
      description="Authentication service for OpenStack",
      license='Apache License (2.0)',
      author='OpenStack, LLC.',
      author_email='openstack@lists.launchpad.net',
      url='http://www.openstack.org',
      cmdclass=cmdclass,
      packages=find_packages(exclude=['test', 'bin']),
      include_package_data=True,
      scripts=['bin/keystone-all', 'bin/keystone-manage'],
      zip_safe=False,
      install_requires=requires,
      dependency_links=depend_links,
      test_suite='nose.collector',
      )
<commit_msg>Open 2012.1.3 development<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2012 OpenStack 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
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from setuptools import find_packages
from setuptools.command.sdist import sdist
from setuptools import setup
import subprocess

from keystone.openstack.common.setup import parse_requirements
from keystone.openstack.common.setup import parse_dependency_links
from keystone.openstack.common.setup import write_requirements
from keystone.openstack.common.setup import write_git_changelog

class local_sdist(sdist):
    """Customized sdist hook - builds the ChangeLog file from VC first"""
    def run(self):
        write_git_changelog()
        sdist.run(self)
cmdclass = {'sdist': local_sdist}

try:
    from sphinx.setup_command import BuildDoc

    class local_BuildDoc(BuildDoc):
        def run(self):
            subprocess.call('sphinx-apidoc -f -o doc/source keystone',
                            shell=True)
            for builder in ['html', 'man']:
                self.builder = builder
                self.finalize_options()
                BuildDoc.run(self)
    cmdclass['build_sphinx'] = local_BuildDoc

except:
    pass

requires = parse_requirements()
depend_links = parse_dependency_links()

write_requirements()

setup(name='keystone',
      version='2012.1.3',
      description="Authentication service for OpenStack",
      license='Apache License (2.0)',
      author='OpenStack, LLC.',
      author_email='openstack@lists.launchpad.net',
      url='http://www.openstack.org',
      cmdclass=cmdclass,
      packages=find_packages(exclude=['test', 'bin']),
      include_package_data=True,
      scripts=['bin/keystone-all', 'bin/keystone-manage'],
      zip_safe=False,
      install_requires=requires,
      dependency_links=depend_links,
      test_suite='nose.collector',
      )
<|endoftext|>


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

import os
import os.path
import re
import shutil
import subprocess
import sys
from distutils import sysconfig
from ctypes.util import find_library

from setuptools import Command, Extension, setup

PYTHON3 = sys.version_info.major == 3

# Utils
def check_output(args):
    output = subprocess.check_output(args)
    if PYTHON3:
        # check_output returns bytes in PYTHON3.
        output = output.decode()
    return output.rstrip('\n')

def clean_boost_name(name):
    name = name.split('.')[0]
    if name.startswith('lib'):
        name = name[3:]
    return name

def find_boost_library(_id):
    suffixes = [
        "",  # standard naming
        "-mt"  # former naming schema for multithreading build
    ]
    if "python" in _id:
        # Debian naming convention for versions installed in parallel
        suffixes.insert(0, "-py%d%d" % (sys.version_info.major,
                                        sys.version_info.minor))
        # standard suffix for Python3
        suffixes.insert(1, sys.version_info.major)
    for suf in suffixes:
        name = "%s%s" % (_id, suf)
        lib = find_library(name)
        if lib is not None:
            return name

def get_boost_library_names():
    wanted = ['boost_python', 'boost_system', 'boost_thread']
    found = []
    missing = []
    for _id in wanted:
        name = os.environ.get("%s_LIB" % _id.upper(), find_boost_library(_id))
        if name:
            found.append(name)
        else:
            missing.append(_id)
    if missing:
        msg = ""
        for name in missing:
            msg += ("\nMissing {} boost library, try to add its name with "
                    "{}_LIB environment var.").format(name, name.upper())
        raise EnvironmentError(msg)
    return found

class WhichBoostCommand(Command):
    description = 'Output found boost names. Useful for debug.'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        print("\n".join(get_boost_library_names()))

cflags = sysconfig.get_config_var('CFLAGS')
sysconfig._config_vars['CFLAGS'] = re.sub(
    ' +', ' ', cflags.replace('-g', '').replace('-Os', '').replace('-arch i386', ''))
opt = sysconfig.get_config_var('OPT')
sysconfig._config_vars['OPT'] = re.sub(
    ' +', ' ', opt.replace('-g', '').replace('-Os', ''))
ldshared = sysconfig.get_config_var('LDSHARED')
sysconfig._config_vars['LDSHARED'] = re.sub(
    ' +', ' ', ldshared.replace('-g', '').replace('-Os', '').replace('-arch i386', ''))
ldflags = sysconfig.get_config_var('LDFLAGS')
sysconfig._config_vars['LDFLAGS'] = re.sub(
    ' +', ' ', ldflags.replace('-g', '').replace('-Os', '').replace('-arch i386', ''))
pycflags = sysconfig.get_config_var('PY_CFLAGS')
sysconfig._config_vars['PY_CFLAGS'] = re.sub(
    ' +', ' ', pycflags.replace('-g', '').replace('-Os', '').replace('-arch i386', ''))
sysconfig._config_vars['CFLAGSFORSHARED'] = ''
os.environ['ARCHFLAGS'] = ''

if os.environ.get("MASON_BUILD", "false") == "true":
    # run bootstrap.sh to get mason builds
    subprocess.call(['./bootstrap.sh'])
    mapnik_config = 'mason_packages/.link/bin/mapnik-config'
    mason_build = True
else:
    mapnik_config = 'mapnik-config'
    mason_build = False

try:
    linkflags = check_output([mapnik_config, '--libs']).split(' ')
    lib_path = linkflags[0][2:]
    linkflags.extend(check_output([mapnik_config, '--ldflags']).split(' '))
except:
    raise Exception("Failed to find proper linking flags from mapnik config")

# Dynamically make the mapnik/paths.py file if it doesn't exist.
if os.path.isfile('mapnik/paths.py'):
    create_paths = False
else:
    create_paths = True
    f_paths = open('mapnik/paths.py', 'w')
    f_paths.write('import os\n')
    f_paths.write('\n')

if mason_build:
    try:
        if sys.platform == 'darwin':
            base_f = 'libmapnik.dylib'
        else:
            base_f = 'libmapnik.so.3.0'
        f = os.path.join(lib_path, base_f)
        shutil.copyfile(f, os.path.join('mapnik', base_f))
    except shutil.Error:
        pass
    input_plugin_path = check_output([mapnik_config, '--input-plugins'])
    input_plugin_files = os.listdir(input_plugin_path)
    input_plugin_files = [os.path.join(
        input_plugin_path, f) for f in input_plugin_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'input')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'input'))
    for f in input_plugin_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'input', os.path.basename(f)))
        except shutil.Error:
            pass
    font_path = check_output([mapnik_config, '--fonts'])
    font_files = os.listdir(font_path)
    font_files = [os.path.join(font_path, f) for f in font_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'fonts')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'fonts'))
    for f in font_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'fonts', os.path.basename(f)))
        except shutil.Error:
            pass
    if create_paths:
        f_paths.write(
            'mapniklibpath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "plugins")\n')
elif create_paths:
    if os.environ.get('LIB_DIR_NAME'):
        mapnik_lib_path = lib_path + os.environ.get('LIB_DIR_NAME')
    else:
        mapnik_lib_path = lib_path + "/mapnik"
    f_paths.write("mapniklibpath = '{path}'\n".format(path=mapnik_lib_path))
    f_paths.write('mapniklibpath = os.path.normpath(mapniklibpath)\n')

if create_paths:
    f_paths.write("inputpluginspath = os.path.join(mapniklibpath,'input')\n")
    if os.environ.get('SYSTEM_FONTS'):
        font_path = "os.path.normpath('{path}')".format(path=os.environ.get('SYSTEM_FONTS'))
    else:
        font_path = "os.path.join(mapniklibpath,'fonts')"
    f_paths.write(
        "fontscollectionpath = {path}\n".format(path=font_path))
    f_paths.write(
        "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n")
    f_paths.close()

if not mason_build:
    icu_path = check_output([mapnik_config, '--icu-data'])
else:
    icu_path = 'mason_packages/.link/share/icu/'
if icu_path:
    icu_files = os.listdir(icu_path)
    icu_files = [os.path.join(icu_path, f) for f in icu_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'icu')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'icu'))
    for f in icu_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'icu', os.path.basename(f)))
        except shutil.Error:
            pass

if not mason_build:
    gdal_path = check_output([mapnik_config, '--gdal-data'])
else:
    gdal_path = 'mason_packages/.link/share/gdal/'
    if os.path.exists('mason_packages/.link/share/gdal/gdal/'):
        gdal_path = 'mason_packages/.link/share/gdal/gdal/'
if gdal_path:
    gdal_files = os.listdir(gdal_path)
    gdal_files = [os.path.join(gdal_path, f) for f in gdal_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'gdal')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'gdal'))
    for f in gdal_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'gdal', os.path.basename(f)))
        except shutil.Error:
            pass

if not mason_build:
    proj_path = check_output([mapnik_config, '--proj-lib'])
else:
    proj_path = 'mason_packages/.link/share/proj/'
    if os.path.exists('mason_packages/.link/share/proj/proj/'):
        proj_path = 'mason_packages/.link/share/proj/proj/'
if proj_path:
    proj_files = os.listdir(proj_path)
    proj_files = [os.path.join(proj_path, f) for f in proj_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'proj')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'proj'))
    for f in proj_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'proj', os.path.basename(f)))
        except shutil.Error:
            pass

extra_comp_args = check_output([mapnik_config, '--cflags']).split(' ')

if sys.platform == 'darwin':
    extra_comp_args.append('-mmacosx-version-min=10.8')
    # silence warning coming from boost python macros which
    # would is hard to silence via pragma
    extra_comp_args.append('-Wno-parentheses-equality')
    linkflags.append('-mmacosx-version-min=10.8')
else:
    linkflags.append('-lrt')
    linkflags.append('-Wl,-z,origin')
    linkflags.append('-Wl,-rpath=$ORIGIN')

if os.environ.get("CC", False) == False:
    os.environ["CC"] = check_output([mapnik_config, '--cxx'])
if os.environ.get("CXX", False) == False:
    os.environ["CXX"] = check_output([mapnik_config, '--cxx'])

setup(
    name="mapnik",
    version="0.1",
    packages=['mapnik'],
    author="Blake Thompson",
    author_email="flippmoke@gmail.com",
    description="Python bindings for Mapnik",
    license="GNU LESSER GENERAL PUBLIC LICENSE",
    keywords="mapnik mapbox mapping carteography",
    url="http://mapnik.org/",
    tests_require=[
        'nose',
    ],
    package_data={
        'mapnik': ['libmapnik.*', 'plugins/*/*'],
    },
    test_suite='nose.collector',
    cmdclass={
        'whichboost': WhichBoostCommand,
    },
    ext_modules=[
        Extension('mapnik._mapnik', [
            'src/mapnik_color.cpp',
            'src/mapnik_coord.cpp',
            'src/mapnik_datasource.cpp',
            'src/mapnik_datasource_cache.cpp',
            'src/mapnik_envelope.cpp',
            'src/mapnik_expression.cpp',
            'src/mapnik_feature.cpp',
            'src/mapnik_featureset.cpp',
            'src/mapnik_font_engine.cpp',
            'src/mapnik_fontset.cpp',
            'src/mapnik_gamma_method.cpp',
            'src/mapnik_geometry.cpp',
            'src/mapnik_grid.cpp',
            'src/mapnik_grid_view.cpp',
            'src/mapnik_image.cpp',
            'src/mapnik_image_view.cpp',
            'src/mapnik_label_collision_detector.cpp',
            'src/mapnik_layer.cpp',
            'src/mapnik_logger.cpp',
            'src/mapnik_map.cpp',
            'src/mapnik_palette.cpp',
            'src/mapnik_parameters.cpp',
            'src/mapnik_proj_transform.cpp',
            'src/mapnik_projection.cpp',
            'src/mapnik_python.cpp',
            'src/mapnik_query.cpp',
            'src/mapnik_raster_colorizer.cpp',
            'src/mapnik_rule.cpp',
            'src/mapnik_scaling_method.cpp',
            'src/mapnik_style.cpp',
            'src/mapnik_svg_generator_grammar.cpp',
            'src/mapnik_symbolizer.cpp',
            'src/mapnik_text_placement.cpp',
            'src/mapnik_view_transform.cpp',
            'src/python_grid_utils.cpp',
        ],
            language='c++',
            libraries=[
                'mapnik',
                'mapnik-wkt',
                'mapnik-json',
            ] + get_boost_library_names(),
            extra_compile_args=extra_comp_args,
            extra_link_args=linkflags,
        )
    ]
)
<commit_msg>attept to fix #54<commit_after>#! /usr/bin/env python

import os
import os.path
import re
import shutil
import subprocess
import sys
from distutils import sysconfig
from ctypes.util import find_library

from setuptools import Command, Extension, setup

PYTHON3 = sys.version_info.major == 3

# Utils
def check_output(args):
    output = subprocess.check_output(args)
    if PYTHON3:
        # check_output returns bytes in PYTHON3.
        output = output.decode()
    return output.rstrip('\n')

def clean_boost_name(name):
    name = name.split('.')[0]
    if name.startswith('lib'):
        name = name[3:]
    return name

def find_boost_library(_id):
    suffixes = [
        "",  # standard naming
        "-mt"  # former naming schema for multithreading build
    ]
    if "python" in _id:
        # Debian naming convention for versions installed in parallel
        suffixes.insert(0, "-py%d%d" % (sys.version_info.major,
                                        sys.version_info.minor))
        # standard suffix for Python3
        suffixes.insert(1, sys.version_info.major)
    for suf in suffixes:
        name = "%s%s" % (_id, suf)
        lib = find_library(name)
        if lib is not None:
            return name

def get_boost_library_names():
    wanted = ['boost_python', 'boost_system', 'boost_thread']
    found = []
    missing = []
    for _id in wanted:
        name = os.environ.get("%s_LIB" % _id.upper(), find_boost_library(_id))
        if name:
            found.append(name)
        else:
            missing.append(_id)
    if missing:
        msg = ""
        for name in missing:
            msg += ("\nMissing {} boost library, try to add its name with "
                    "{}_LIB environment var.").format(name, name.upper())
        raise EnvironmentError(msg)
    return found

class WhichBoostCommand(Command):
    description = 'Output found boost names. Useful for debug.'
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        print("\n".join(get_boost_library_names()))

cflags = sysconfig.get_config_var('CFLAGS')
sysconfig._config_vars['CFLAGS'] = re.sub(
    ' +', ' ', cflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
opt = sysconfig.get_config_var('OPT')
sysconfig._config_vars['OPT'] = re.sub(
    ' +', ' ', opt.replace('-g ', '').replace('-Os', ''))
ldshared = sysconfig.get_config_var('LDSHARED')
sysconfig._config_vars['LDSHARED'] = re.sub(
    ' +', ' ', ldshared.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
ldflags = sysconfig.get_config_var('LDFLAGS')
sysconfig._config_vars['LDFLAGS'] = re.sub(
    ' +', ' ', ldflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
pycflags = sysconfig.get_config_var('PY_CFLAGS')
sysconfig._config_vars['PY_CFLAGS'] = re.sub(
    ' +', ' ', pycflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
sysconfig._config_vars['CFLAGSFORSHARED'] = ''
os.environ['ARCHFLAGS'] = ''

if os.environ.get("MASON_BUILD", "false") == "true":
    # run bootstrap.sh to get mason builds
    subprocess.call(['./bootstrap.sh'])
    mapnik_config = 'mason_packages/.link/bin/mapnik-config'
    mason_build = True
else:
    mapnik_config = 'mapnik-config'
    mason_build = False

try:
    linkflags = check_output([mapnik_config, '--libs']).split(' ')
    lib_path = linkflags[0][2:]
    linkflags.extend(check_output([mapnik_config, '--ldflags']).split(' '))
except:
    raise Exception("Failed to find proper linking flags from mapnik config")

# Dynamically make the mapnik/paths.py file if it doesn't exist.
if os.path.isfile('mapnik/paths.py'):
    create_paths = False
else:
    create_paths = True
    f_paths = open('mapnik/paths.py', 'w')
    f_paths.write('import os\n')
    f_paths.write('\n')

if mason_build:
    try:
        if sys.platform == 'darwin':
            base_f = 'libmapnik.dylib'
        else:
            base_f = 'libmapnik.so.3.0'
        f = os.path.join(lib_path, base_f)
        shutil.copyfile(f, os.path.join('mapnik', base_f))
    except shutil.Error:
        pass
    input_plugin_path = check_output([mapnik_config, '--input-plugins'])
    input_plugin_files = os.listdir(input_plugin_path)
    input_plugin_files = [os.path.join(
        input_plugin_path, f) for f in input_plugin_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'input')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'input'))
    for f in input_plugin_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'input', os.path.basename(f)))
        except shutil.Error:
            pass
    font_path = check_output([mapnik_config, '--fonts'])
    font_files = os.listdir(font_path)
    font_files = [os.path.join(font_path, f) for f in font_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'fonts')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'fonts'))
    for f in font_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'fonts', os.path.basename(f)))
        except shutil.Error:
            pass
    if create_paths:
        f_paths.write(
            'mapniklibpath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "plugins")\n')
elif create_paths:
    if os.environ.get('LIB_DIR_NAME'):
        mapnik_lib_path = lib_path + os.environ.get('LIB_DIR_NAME')
    else:
        mapnik_lib_path = lib_path + "/mapnik"
    f_paths.write("mapniklibpath = '{path}'\n".format(path=mapnik_lib_path))
    f_paths.write('mapniklibpath = os.path.normpath(mapniklibpath)\n')

if create_paths:
    f_paths.write("inputpluginspath = os.path.join(mapniklibpath,'input')\n")
    if os.environ.get('SYSTEM_FONTS'):
        font_path = "os.path.normpath('{path}')".format(path=os.environ.get('SYSTEM_FONTS'))
    else:
        font_path = "os.path.join(mapniklibpath,'fonts')"
    f_paths.write(
        "fontscollectionpath = {path}\n".format(path=font_path))
    f_paths.write(
        "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n")
    f_paths.close()

if not mason_build:
    icu_path = check_output([mapnik_config, '--icu-data'])
else:
    icu_path = 'mason_packages/.link/share/icu/'
if icu_path:
    icu_files = os.listdir(icu_path)
    icu_files = [os.path.join(icu_path, f) for f in icu_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'icu')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'icu'))
    for f in icu_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'icu', os.path.basename(f)))
        except shutil.Error:
            pass

if not mason_build:
    gdal_path = check_output([mapnik_config, '--gdal-data'])
else:
    gdal_path = 'mason_packages/.link/share/gdal/'
    if os.path.exists('mason_packages/.link/share/gdal/gdal/'):
        gdal_path = 'mason_packages/.link/share/gdal/gdal/'
if gdal_path:
    gdal_files = os.listdir(gdal_path)
    gdal_files = [os.path.join(gdal_path, f) for f in gdal_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'gdal')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'gdal'))
    for f in gdal_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'gdal', os.path.basename(f)))
        except shutil.Error:
            pass

if not mason_build:
    proj_path = check_output([mapnik_config, '--proj-lib'])
else:
    proj_path = 'mason_packages/.link/share/proj/'
    if os.path.exists('mason_packages/.link/share/proj/proj/'):
        proj_path = 'mason_packages/.link/share/proj/proj/'
if proj_path:
    proj_files = os.listdir(proj_path)
    proj_files = [os.path.join(proj_path, f) for f in proj_files]
    if not os.path.exists(os.path.join('mapnik', 'plugins', 'proj')):
        os.makedirs(os.path.join('mapnik', 'plugins', 'proj'))
    for f in proj_files:
        try:
            shutil.copyfile(f, os.path.join(
                'mapnik', 'plugins', 'proj', os.path.basename(f)))
        except shutil.Error:
            pass

extra_comp_args = check_output([mapnik_config, '--cflags']).split(' ')

if sys.platform == 'darwin':
    extra_comp_args.append('-mmacosx-version-min=10.8')
    # silence warning coming from boost python macros which
    # would is hard to silence via pragma
    extra_comp_args.append('-Wno-parentheses-equality')
    linkflags.append('-mmacosx-version-min=10.8')
else:
    linkflags.append('-lrt')
    linkflags.append('-Wl,-z,origin')
    linkflags.append('-Wl,-rpath=$ORIGIN')

if os.environ.get("CC", False) == False:
    os.environ["CC"] = check_output([mapnik_config, '--cxx'])
if os.environ.get("CXX", False) == False:
    os.environ["CXX"] = check_output([mapnik_config, '--cxx'])

setup(
    name="mapnik",
    version="0.1",
    packages=['mapnik'],
    author="Blake Thompson",
    author_email="flippmoke@gmail.com",
    description="Python bindings for Mapnik",
    license="GNU LESSER GENERAL PUBLIC LICENSE",
    keywords="mapnik mapbox mapping carteography",
    url="http://mapnik.org/",
    tests_require=[
        'nose',
    ],
    package_data={
        'mapnik': ['libmapnik.*', 'plugins/*/*'],
    },
    test_suite='nose.collector',
    cmdclass={
        'whichboost': WhichBoostCommand,
    },
    ext_modules=[
        Extension('mapnik._mapnik', [
            'src/mapnik_color.cpp',
            'src/mapnik_coord.cpp',
            'src/mapnik_datasource.cpp',
            'src/mapnik_datasource_cache.cpp',
            'src/mapnik_envelope.cpp',
            'src/mapnik_expression.cpp',
            'src/mapnik_feature.cpp',
            'src/mapnik_featureset.cpp',
            'src/mapnik_font_engine.cpp',
            'src/mapnik_fontset.cpp',
            'src/mapnik_gamma_method.cpp',
            'src/mapnik_geometry.cpp',
            'src/mapnik_grid.cpp',
            'src/mapnik_grid_view.cpp',
            'src/mapnik_image.cpp',
            'src/mapnik_image_view.cpp',
            'src/mapnik_label_collision_detector.cpp',
            'src/mapnik_layer.cpp',
            'src/mapnik_logger.cpp',
            'src/mapnik_map.cpp',
            'src/mapnik_palette.cpp',
            'src/mapnik_parameters.cpp',
            'src/mapnik_proj_transform.cpp',
            'src/mapnik_projection.cpp',
            'src/mapnik_python.cpp',
            'src/mapnik_query.cpp',
            'src/mapnik_raster_colorizer.cpp',
            'src/mapnik_rule.cpp',
            'src/mapnik_scaling_method.cpp',
            'src/mapnik_style.cpp',
            'src/mapnik_svg_generator_grammar.cpp',
            'src/mapnik_symbolizer.cpp',
            'src/mapnik_text_placement.cpp',
            'src/mapnik_view_transform.cpp',
            'src/python_grid_utils.cpp',
        ],
            language='c++',
            libraries=[
                'mapnik',
                'mapnik-wkt',
                'mapnik-json',
            ] + get_boost_library_names(),
            extra_compile_args=extra_comp_args,
            extra_link_args=linkflags,
        )
    ]
)
<|endoftext|>


<commit_before>from __future__ import absolute_import, division, print_function

from setuptools import find_packages, setup

setup(
    name="ispyb",
    version="5.2.0",
    description="Python package to access ISPyB database",
    long_description="This package provides a python interface to ISPyB. It can access the ISPyB database directly or (in future versions) run on top of the official ISPyB webservices API.",
    url="https://github.com/DiamondLightSource/ispyb-api",
    author="Karl Erik Levik, Markus Gerstel",
    author_email="scientificsoftware@diamond.ac.uk",
    download_url="https://github.com/DiamondLightSource/ispyb-api/releases",
    keywords=["ISPyB", "database"],
    packages=find_packages(),
    scripts=["bin/dimple2ispyb.py", "bin/mxdatareduction2ispyb.py"],
    license="Apache License, Version 2.0",
    install_requires=["enum-compat", "mysql-connector<2.2.3"],
    setup_requires=["pytest-runner"],
    tests_require=["mock", "pytest"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: Apache Software License",
        "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",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    entry_points={"libtbx.precommit": ["ispyb = ispyb"]},
    project_urls={"Documentation": "https://ispyb.readthedocs.io"},
)
<commit_msg>setup.py: replace enum-compat with enum34 for python 2.7<commit_after>from __future__ import absolute_import, division, print_function

from setuptools import find_packages, setup
import sys

INSTALL_REQUIRES = ['mysql-connector<2.2.3']

if sys.version_info.major == 2:
    INSTALL_REQUIRES.append('enum34')

setup(
    name="ispyb",
    version="5.2.0",
    description="Python package to access ISPyB database",
    long_description="This package provides a python interface to ISPyB. It can access the ISPyB database directly or (in future versions) run on top of the official ISPyB webservices API.",
    url="https://github.com/DiamondLightSource/ispyb-api",
    author="Karl Erik Levik, Markus Gerstel",
    author_email="scientificsoftware@diamond.ac.uk",
    download_url="https://github.com/DiamondLightSource/ispyb-api/releases",
    keywords=["ISPyB", "database"],
    packages=find_packages(),
    scripts=["bin/dimple2ispyb.py", "bin/mxdatareduction2ispyb.py"],
    license="Apache License, Version 2.0",
    install_requires=INSTALL_REQUIRES,
    setup_requires=["pytest-runner"],
    tests_require=["mock", "pytest"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: Apache Software License",
        "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",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    entry_points={"libtbx.precommit": ["ispyb = ispyb"]},
    project_urls={"Documentation": "https://ispyb.readthedocs.io"},
)
<|endoftext|>


<commit_before>import shutil
import sys
import os
from setuptools import setup, find_packages, __version__
from pip.req import parse_requirements
import data

v = sys.version_info
if sys.version_info < (3, 5):
    msg = "FAIL: Requires Python 3.5 or later, " \
          "but setup.py was run using {}.{}.{}"
    v = sys.version_info
    print(msg.format(v.major, v.minor, v.micro))
    # noinspection PyPackageRequirements
    print("NOTE: Installation failed. Run setup.py using python3")
    sys.exit(1)

# Change to ioflo's source directory prior to running any command
try:
    SETUP_DIRNAME = os.path.dirname(__file__)
except NameError:
    # We're probably being frozen, and __file__ triggered this NameError
    # Work around this
    SETUP_DIRNAME = os.path.dirname(sys.argv[0])

if SETUP_DIRNAME != '':
    os.chdir(SETUP_DIRNAME)

SETUP_DIRNAME = os.path.abspath(SETUP_DIRNAME)

METADATA = os.path.join(SETUP_DIRNAME, 'plenum', '__metadata__.py')
# Load the metadata using exec() so we don't trigger an import of ioflo.__init__
exec(compile(open(METADATA).read(), METADATA, 'exec'))

BASE_DIR = os.path.join(os.path.expanduser("~"), ".plenum")
CONFIG_FILE = os.path.join(BASE_DIR, "plenum_config.py")
POOL_TXN_FILE = os.path.join(BASE_DIR, "pool_transactions_sandbox")

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

setup(
    name='plenum-dev',
    version=__version__,
    description='Plenum Byzantine Fault Tolerant Protocol',
    long_description='Plenum Byzantine Fault Tolerant Protocol',
    url='https://github.com/evernym/plenum',
    download_url='https://github.com/evernym/plenum/tarball/{}'.
        format(__version__),
    author=__author__,
    author_email='dev@evernym.us',
    license=__license__,
    keywords='Byzantine Fault Tolerant Plenum',
    packages=find_packages(exclude=['test', 'test.*', 'docs', 'docs*']) + [
        'data', ],
    package_data={
        '': ['*.txt', '*.md', '*.rst', '*.json', '*.conf', '*.html',
             '*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', 'plenum']},
    include_package_data=True,
    data_files=[(
        (BASE_DIR, ['data/pool_transactions_sandbox', ])
    )],
    install_requires=['ledger-dev', 'stp-dev',
                      'jsonpickle', 'portalocker==0.5.7',
                      'prompt_toolkit==0.57', 'pyorient', 'pygments',
                      'ioflo==1.5.4', 'semver', 'base58', 'orderedset',
                      'sortedcontainers==1.5.7', 'psutil'],
    extras_require={
        'stats': ['python-firebase']
    },
    setup_requires=['pytest-runner'],
    tests_require=['pytest', 'pytest-xdist'],
    scripts=['scripts/plenum', 'scripts/init_plenum_keys',
             'scripts/start_plenum_node',
             'scripts/generate_plenum_pool_transactions',
             'scripts/gen_steward_key', 'scripts/gen_node',
             'scripts/export-gen-txns', 'scripts/get_keys',
             'scripts/udp_sender', 'scripts/udp_receiver']
)

if not os.path.exists(CONFIG_FILE):
    with open(CONFIG_FILE, 'w') as f:
        msg = "# Here you can create config entries according to your " \
              "needs.\n " \
              "# For help, refer config.py in the sovrin package.\n " \
              "# Any entry you add here would override that from config " \
              "example\n"
        f.write(msg)

DATA_DIR = os.path.dirname(data.__file__)
shutil.copyfile(os.path.join(DATA_DIR, "pool_transactions_sandbox"),
                POOL_TXN_FILE)

# TODO: This code should not be copied here.
import getpass
import os
import shutil
import sys

def getLoggedInUser():
    if sys.platform == 'wind32':
        return getpass.getuser()
    else:
        if 'SUDO_USER' in os.environ:
            return os.environ['SUDO_USER']
        else:
            return getpass.getuser()

def changeOwnerAndGrpToLoggedInUser(directory, raiseEx=False):
    loggedInUser = getLoggedInUser()
    try:
        shutil.chown(directory, loggedInUser, loggedInUser)
    except Exception as e:
        if raiseEx:
            raise e
        else:
            pass

changeOwnerAndGrpToLoggedInUser(BASE_DIR)

<commit_msg>Versioning fix (#113)<commit_after>import shutil
import sys
import os
from setuptools import setup, find_packages, __version__
from pip.req import parse_requirements
import data

v = sys.version_info
if sys.version_info < (3, 5):
    msg = "FAIL: Requires Python 3.5 or later, " \
          "but setup.py was run using {}.{}.{}"
    v = sys.version_info
    print(msg.format(v.major, v.minor, v.micro))
    # noinspection PyPackageRequirements
    print("NOTE: Installation failed. Run setup.py using python3")
    sys.exit(1)

# Change to ioflo's source directory prior to running any command
try:
    SETUP_DIRNAME = os.path.dirname(__file__)
except NameError:
    # We're probably being frozen, and __file__ triggered this NameError
    # Work around this
    SETUP_DIRNAME = os.path.dirname(sys.argv[0])

if SETUP_DIRNAME != '':
    os.chdir(SETUP_DIRNAME)

SETUP_DIRNAME = os.path.abspath(SETUP_DIRNAME)

METADATA = os.path.join(SETUP_DIRNAME, 'plenum', '__metadata__.py')
# Load the metadata using exec() so we don't trigger an import of ioflo.__init__
exec(compile(open(METADATA).read(), METADATA, 'exec'))

BASE_DIR = os.path.join(os.path.expanduser("~"), ".plenum")
CONFIG_FILE = os.path.join(BASE_DIR, "plenum_config.py")
POOL_TXN_FILE = os.path.join(BASE_DIR, "pool_transactions_sandbox")

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

setup(
    name='plenum-dev',
    version=__version__,
    description='Plenum Byzantine Fault Tolerant Protocol',
    long_description='Plenum Byzantine Fault Tolerant Protocol',
    url='https://github.com/evernym/plenum',
    download_url='https://github.com/evernym/plenum/tarball/{}'.
        format(__version__),
    author=__author__,
    author_email='dev@evernym.us',
    license=__license__,
    keywords='Byzantine Fault Tolerant Plenum',
    packages=find_packages(exclude=['test', 'test.*', 'docs', 'docs*']) + [
        'data', ],
    package_data={
        '': ['*.txt', '*.md', '*.rst', '*.json', '*.conf', '*.html',
             '*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', 'plenum']},
    include_package_data=True,
    data_files=[(
        (BASE_DIR, ['data/pool_transactions_sandbox', ])
    )],
    install_requires=['ledger-dev==0.2.4', 'stp-dev==0.1.16',
                      'jsonpickle', 'portalocker==0.5.7',
                      'prompt_toolkit==0.57', 'pyorient', 'pygments',
                      'ioflo==1.5.4', 'semver', 'base58', 'orderedset',
                      'sortedcontainers==1.5.7', 'psutil'],
    extras_require={
        'stats': ['python-firebase']
    },
    setup_requires=['pytest-runner'],
    tests_require=['pytest', 'pytest-xdist'],
    scripts=['scripts/plenum', 'scripts/init_plenum_keys',
             'scripts/start_plenum_node',
             'scripts/generate_plenum_pool_transactions',
             'scripts/gen_steward_key', 'scripts/gen_node',
             'scripts/export-gen-txns', 'scripts/get_keys',
             'scripts/udp_sender', 'scripts/udp_receiver']
)

if not os.path.exists(CONFIG_FILE):
    with open(CONFIG_FILE, 'w') as f:
        msg = "# Here you can create config entries according to your " \
              "needs.\n " \
              "# For help, refer config.py in the sovrin package.\n " \
              "# Any entry you add here would override that from config " \
              "example\n"
        f.write(msg)

DATA_DIR = os.path.dirname(data.__file__)
shutil.copyfile(os.path.join(DATA_DIR, "pool_transactions_sandbox"),
                POOL_TXN_FILE)

# TODO: This code should not be copied here.
import getpass
import os
import shutil
import sys

def getLoggedInUser():
    if sys.platform == 'wind32':
        return getpass.getuser()
    else:
        if 'SUDO_USER' in os.environ:
            return os.environ['SUDO_USER']
        else:
            return getpass.getuser()

def changeOwnerAndGrpToLoggedInUser(directory, raiseEx=False):
    loggedInUser = getLoggedInUser()
    try:
        shutil.chown(directory, loggedInUser, loggedInUser)
    except Exception as e:
        if raiseEx:
            raise e
        else:
            pass

changeOwnerAndGrpToLoggedInUser(BASE_DIR)

<|endoftext|>


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

import ah_bootstrap
import pkg_resources
from setuptools import setup
from astropy_helpers.setup_helpers import register_commands, get_package_info
from astropy_helpers.version_helpers import generate_version_py

NAME = 'astropy_helpers'
VERSION = '0.4rc1.dev'
RELEASE = 'dev' not in VERSION
DOWNLOAD_BASE_URL = 'http://pypi.python.org/packages/source/a/astropy-helpers'

generate_version_py(NAME, VERSION, RELEASE, False)

# Use the updated version including the git rev count
from astropy_helpers.version import version as VERSION

cmdclass = register_commands(NAME, VERSION, RELEASE)
# This package actually doesn't use the Astropy test command
del cmdclass['test']

setup(
    name=pkg_resources.safe_name(NAME),  # astropy_helpers -> astropy-helpers
    version=VERSION,
    description='Utilities for building and installing Astropy, Astropy '
                'affiliated packages, and their respective documentation.',
    author='The Astropy Developers',
    author_email='astropy.team@gmail.com',
    license='BSD',
    url='http://astropy.org',
    long_description=open('README.rst').read(),
    download_url='{0}/astropy-helpers-{1}.tar.gz'.format(DOWNLOAD_BASE_URL,
                                                         VERSION),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Archiving :: Packaging'
    ],
    cmdclass=cmdclass,
    zip_safe=False,
    **get_package_info(exclude=['astropy_helpers.tests'])
)
<commit_msg>Preparing to release v0.4rc2<commit_after>#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst

import ah_bootstrap
import pkg_resources
from setuptools import setup
from astropy_helpers.setup_helpers import register_commands, get_package_info
from astropy_helpers.version_helpers import generate_version_py

NAME = 'astropy_helpers'
VERSION = '0.4rc2'
RELEASE = 'dev' not in VERSION
DOWNLOAD_BASE_URL = 'http://pypi.python.org/packages/source/a/astropy-helpers'

generate_version_py(NAME, VERSION, RELEASE, False)

# Use the updated version including the git rev count
from astropy_helpers.version import version as VERSION

cmdclass = register_commands(NAME, VERSION, RELEASE)
# This package actually doesn't use the Astropy test command
del cmdclass['test']

setup(
    name=pkg_resources.safe_name(NAME),  # astropy_helpers -> astropy-helpers
    version=VERSION,
    description='Utilities for building and installing Astropy, Astropy '
                'affiliated packages, and their respective documentation.',
    author='The Astropy Developers',
    author_email='astropy.team@gmail.com',
    license='BSD',
    url='http://astropy.org',
    long_description=open('README.rst').read(),
    download_url='{0}/astropy-helpers-{1}.tar.gz'.format(DOWNLOAD_BASE_URL,
                                                         VERSION),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Archiving :: Packaging'
    ],
    cmdclass=cmdclass,
    zip_safe=False,
    **get_package_info(exclude=['astropy_helpers.tests'])
)
<|endoftext|>


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

# Copyright 2016 rpaas authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import codecs

from setuptools import setup, find_packages

README = codecs.open('README.rst', encoding='utf-8').read()

setup(
    name="tsuru-rpaas",
    version="0.2.5",
    description="Reverse proxy as-a-service API for Tsuru PaaS",
    long_description=README,
    author="Tsuru",
    author_email="tsuru@corp.globo.com",
    classifiers=[
        "Programming Language :: Python :: 2.7",
    ],
    packages=find_packages(exclude=["docs", "tests"]),
    include_package_data=True,
    install_requires=[
        "cffi==1.8.3",
        "cryptography==1.6",
        "Flask==0.12.4",
        "Werkzeug==0.11.15",
        "requests==2.18.4",
        "gevent==1.1b6",
        "gunicorn==0.17.2",
        "tsuru-hm==0.6.12",
        "celery[redis]==3.1.23",
        "flower==0.9.1",
        "GloboNetworkAPI==0.8.1",
        "python-consul==0.6.1",
        "raven==4.2.3",
        "blinker==1.4",
        "acme==0.9.3",
        "letsencrypt==0.7.0",
        "certbot==0.9.3",
        "certifi==2016.9.26",
        "pbr==3.1.1",
        "Babel==2.3.4",
        "zope.interface==4.3.3",
        "parsedatetime==2.1",
    ],
    extras_require={
        'tests': [
            "mock==2.0.0",
            "flake8==2.1.0",
            "coverage==3.7.1",
            "freezegun==0.3.7",
        ]
    },
)
<commit_msg>setup.py: fixating pyOpenSSL<commit_after># -*- coding: utf-8 -*-

# Copyright 2016 rpaas authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import codecs

from setuptools import setup, find_packages

README = codecs.open('README.rst', encoding='utf-8').read()

setup(
    name="tsuru-rpaas",
    version="0.2.5",
    description="Reverse proxy as-a-service API for Tsuru PaaS",
    long_description=README,
    author="Tsuru",
    author_email="tsuru@corp.globo.com",
    classifiers=[
        "Programming Language :: Python :: 2.7",
    ],
    packages=find_packages(exclude=["docs", "tests"]),
    include_package_data=True,
    install_requires=[
        "cffi==1.8.3",
        "cryptography==1.6",
        "pyOpenSSL==17.2.0",
        "Flask==0.12.4",
        "Werkzeug==0.11.15",
        "requests==2.18.4",
        "gevent==1.1b6",
        "gunicorn==0.17.2",
        "tsuru-hm==0.6.12",
        "celery[redis]==3.1.23",
        "flower==0.9.1",
        "GloboNetworkAPI==0.8.1",
        "python-consul==0.6.1",
        "raven==4.2.3",
        "blinker==1.4",
        "acme==0.9.3",
        "letsencrypt==0.7.0",
        "certbot==0.9.3",
        "certifi==2016.9.26",
        "pbr==3.1.1",
        "Babel==2.3.4",
        "zope.interface==4.3.3",
        "parsedatetime==2.1",
    ],
    extras_require={
        'tests': [
            "mock==2.0.0",
            "flake8==2.1.0",
            "coverage==3.7.1",
            "freezegun==0.3.7",
        ]
    },
)
<|endoftext|>


<commit_before>import os

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

description = 'MVC Web Application Framework with Tornado.'

if os.path.exists('README.md'):
    long_description = open('README.md').read()
else:
    long_description = description

setup(
    name='dp-tornado',
    version="0.4.5",
    url='http://github.com/why2pac/dp-tornado',
    license='MIT',
    author='YoungYong Park',
    author_email='youngyongpark@gmail.com',
    maintainer='YoungYong Park',
    maintainer_email='youngyongpark@gmail.com',
    description=description,
    long_description=long_description,
    packages=[
        'dp_tornado',
        'dp_tornado/engine',
        'dp_tornado/engine/driver',
        'dp_tornado/engine/scheduler',
        'dp_tornado/engine/plugin',
        'dp_tornado/helper',
        'dp_tornado/helper/archive',
        'dp_tornado/helper/aws',
        'dp_tornado/helper/i18n',
        'dp_tornado/helper/image',
        'dp_tornado/helper/image/resize',
        'dp_tornado/helper/validator'],
    include_package_data=True,
    install_requires=[
        'tornado==4.3',
        'redis==2.10.3',
        'requests==2.8.1',
        'croniter==0.3.8',
        'boto==2.38.0',
        'SQLAlchemy==1.0.9',
        'futures==3.0.3'
    ],
    keywords=['MVC', 'Web Application Framework'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4'
    ],
)
<commit_msg>version updated, 0.4.6<commit_after>import os

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

description = 'MVC Web Application Framework with Tornado.'

if os.path.exists('README.md'):
    long_description = open('README.md').read()
else:
    long_description = description

setup(
    name='dp-tornado',
    version="0.4.6",
    url='http://github.com/why2pac/dp-tornado',
    license='MIT',
    author='YoungYong Park',
    author_email='youngyongpark@gmail.com',
    maintainer='YoungYong Park',
    maintainer_email='youngyongpark@gmail.com',
    description=description,
    long_description=long_description,
    packages=[
        'dp_tornado',
        'dp_tornado/engine',
        'dp_tornado/engine/driver',
        'dp_tornado/engine/scheduler',
        'dp_tornado/engine/plugin',
        'dp_tornado/helper',
        'dp_tornado/helper/archive',
        'dp_tornado/helper/aws',
        'dp_tornado/helper/i18n',
        'dp_tornado/helper/image',
        'dp_tornado/helper/image/resize',
        'dp_tornado/helper/validator'],
    include_package_data=True,
    install_requires=[
        'tornado==4.3',
        'redis==2.10.3',
        'requests==2.8.1',
        'croniter==0.3.8',
        'boto==2.38.0',
        'SQLAlchemy==1.0.9',
        'futures==3.0.3'
    ],
    keywords=['MVC', 'Web Application Framework'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4'
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""
Flask-Cache
-----------

Adds cache support to your Flask application

"""

from setuptools import setup

setup(
    name='Flask-Cache',
    version='0.3.2',
    url='http://github.com/thadeusb/flask-cache',
    license='BSD',
    author='Thadeus Burgess',
    author_email='thadeusb@thadeusb.com',
    description='Adds cache support to your Flask application',
    long_description=__doc__,
    packages=[
        'flaskext',
        'flaskext.cache',
    ],
    namespace_packages=['flaskext'],
    zip_safe=False,
    platforms='any',
    install_requires=[
        'setuptools',
        'Flask',
    ],
    test_suite='test_cache',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)
<commit_msg>R-0.3.3<commit_after>#!/usr/bin/env python
"""
Flask-Cache
-----------

Adds cache support to your Flask application

"""

from setuptools import setup

setup(
    name='Flask-Cache',
    version='0.3.3',
    url='http://github.com/thadeusb/flask-cache',
    license='BSD',
    author='Thadeus Burgess',
    author_email='thadeusb@thadeusb.com',
    description='Adds cache support to your Flask application',
    long_description=__doc__,
    packages=[
        'flaskext',
        'flaskext.cache',
    ],
    namespace_packages=['flaskext'],
    zip_safe=False,
    platforms='any',
    install_requires=[
        'setuptools',
        'Flask',
    ],
    test_suite='test_cache',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)
<|endoftext|>