<commit_before>import sys
import subprocess
from setuptools import setup
from setuptools.command.develop import develop

class PreCommitCommand(develop):
    """
    Install pre-commit hook after all required packages are installed.
    """

    def run(self):
        try:
            cmd = (sys.executable, "-m", "pre_commit", "install")
            if not subprocess.call(cmd):
                return
        except Exception as e:
            raise SystemExit(f'Unable to run "pre-commit install" because {e}')
        develop.run(self)

# required dependencies
install_requires = [
    "beautifulsoup4>=4.9.3",
    "chardet>=4.0.0",
    "common>=0.1.2",
    "enlighten>=1.7.2",
    "gender-detector",
    "GitPython",
    "html2text>=2020.1.16",
    "ietfdata>=0.4.0",
    "ipython>=7.22.0",
    "jinja2>=2.11.3",
    "jupyter>=1.0.0",
    "jsonschema>=3.2.0",
    "matplotlib>=3.4.1",
    "networkx>=2.5.1",
    "nltk>=3.6.2",
    "numpy>=1.20.2",
    "pandas>=1.2.3",
    "powerlaw>=1.4.6",
    "python-dateutil>=2.8.1",
    "python-Levenshtein>=0.12.2",
    "pytz>=2021.1",
    "pyyaml>=5.4.1",
    "pyzmq>=22.0.3",
    "requests>=2.25.1",
    "seaborn",
    "tornado>=6.1",
    "tqdm>=4.60.0",
    "validator_collection>=1.5.0",
]
# test dependencies
test_requires = ["pytest>=6.2.3", "coverage>=5.5", "testfixtures>=6.17.1"]
# development dependencies
dev_requires = [
    "black>=20.8b1",
    "isort>=5.7.0",
    "pre-commit>=2.13.0",
]

config = {
    "name": "BigBang",
    "version": "0.3",
    "description": "Analysis of Mailman archives",
    "author": "Sebastian Benthall",
    "author_email": "sb@ischool.berkeley.edu",
    "packages": ["bigbang"],
    "install_requires": install_requires,
    "extras_require": {
        "test": test_requires,
        "dev": test_requires + dev_requires,
    },
    "cmdclass": {"develop": PreCommitCommand},
}

setup(**config)
<commit_msg>add package to setup.py<commit_after>import sys
import subprocess
from setuptools import setup
from setuptools.command.develop import develop

class PreCommitCommand(develop):
    """
    Install pre-commit hook after all required packages are installed.
    """

    def run(self):
        try:
            cmd = (sys.executable, "-m", "pre_commit", "install")
            if not subprocess.call(cmd):
                return
        except Exception as e:
            raise SystemExit(f'Unable to run "pre-commit install" because {e}')
        develop.run(self)

# required dependencies
install_requires = [
    "beautifulsoup4>=4.9.3",
    "chardet>=4.0.0",
    "common>=0.1.2",
    "enlighten>=1.7.2",
    "gender-detector",
    "GitPython",
    "html2text>=2020.1.16",
    "ietfdata>=0.4.0",
    "ipython>=7.22.0",
    "jinja2>=2.11.3",
    "jupyter>=1.0.0",
    "jsonschema>=3.2.0",
    "matplotlib>=3.4.1",
    "networkx>=2.5.1",
    "nltk>=3.6.2",
    "numpy>=1.20.2",
    "pandas>=1.2.3",
    "powerlaw>=1.4.6",
    "python-dateutil>=2.8.1",
    "python-Levenshtein>=0.12.2",
    "pytz>=2021.1",
    "pyyaml>=5.4.1",
    "pyzmq>=22.0.3",
    "requests>=2.25.1",
    "seaborn",
    "tornado>=6.1",
    "tqdm>=4.60.0",
    "validator_collection>=1.5.0",
    "python-docx>=0.8",
]
# test dependencies
test_requires = ["pytest>=6.2.3", "coverage>=5.5", "testfixtures>=6.17.1"]
# development dependencies
dev_requires = [
    "black>=20.8b1",
    "isort>=5.7.0",
    "pre-commit>=2.13.0",
]

config = {
    "name": "BigBang",
    "version": "0.3",
    "description": "Analysis of Mailman archives",
    "author": "Sebastian Benthall",
    "author_email": "sb@ischool.berkeley.edu",
    "packages": ["bigbang"],
    "install_requires": install_requires,
    "extras_require": {
        "test": test_requires,
        "dev": test_requires + dev_requires,
    },
    "cmdclass": {"develop": PreCommitCommand},
}

setup(**config)
<|endoftext|>


<commit_before># Copyright 2016-2017 Curtis Sand <curtissand@gmail.com>
#
# 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.
"""Copy Files Task."""

import os
import subprocess
import glob
import shlex

from .core import Task

class CopyFilesJob(object):
    """Data object to represent one Copy Files Job."""

    def __init__(self, name, sources, destination):
        """Set up instance vars for a CopyFilesJob object."""
        self.name = name
        self.sources = sources
        self.destination = destination

class CopyFilesTask(Task):
    """Copy Files from around the system into the Escadrille build.

    Option keys use the suffixes "_dest" and "_src". Files listed in space
    separated strings as absolute paths are copied from options with the "_src"
    suffix to the single destination expected in the "_dest" option with the
    corresponding slug.

    (i.e "pics_src=/home/user/pics/*.jpeg /home/user/ref/images/*"
    would all get copied to "pics_dest=/tmp/escadrille/staging/")

    note: This behaviour disallows files containing spaces in their path. For
          paths containing spaces you can workaround this limitation by using
          an asterisk in place of a space. The wildcard will match the spaces
          and there is a very good chance that the rest of the path will
          preclude any other matches but the intended target.
    """

    config_name = 'copy_files'

    def __init__(self, *args, **kwargs):
        """Set up defaults for Copy Files Task instances."""
        self.jobs = []
        super().__init__(*args, **kwargs)

    def __call__(self, *args, **kwargs):
        """Execute the Copy Files Task."""
        print('Starting Copy Files Task')
        super().__call__(*args, **kwargs)
        self.dprint('%d copy jobs loaded from config file.' % len(self.jobs))
        for index, job in enumerate(self.jobs, 1):
            self.vprint('%s(%d/%d) %s' %
                        (self.indent, index, len(self.jobs), job.name))
            destination = os.path.abspath(os.path.expanduser(job.destination))
            if not os.path.exists(destination):
                os.makedirs(destination)
            for source_dir in job.sources:
                source_dir = os.path.abspath(os.path.expanduser(source_dir))
                source_paths = [shlex.quote(path) for path in
                                glob.glob(source_dir, recursive=True)]
                if not source_paths:
                    self.vprint('%sno files to copy at "%s"' %
                                (self.indent * 2, source_dir))
                    continue
                self.vprint('%scopying "%s"...' % (self.indent * 2,
                                                   source_dir))
                subprocess.check_call(
                    ' '.join(['rsync', '-Pa', '--ignore-existing',
                              *source_paths, destination]), shell=True)
        self._set_status()

    def _load_config(self):
        """Generate a map of files and destinations for the Copy Files Task."""
        super()._load_config()
        jobs, src_suffix, dest_suffix = {}, '_src', '_dst'
        options = []
        if (self.config_file.parser and
                self.config_file.has_section(self.tag)):
            options = self.config_file.section(self.tag).keys()
        for option in options:
            parts = option.split('_')
            if not (option.endswith(src_suffix) or
                    option.endswith(dest_suffix)):
                continue
            if parts[0] in jobs:
                continue
            job = {'name': parts[0]}
            if option.endswith(src_suffix):
                source_opt = option
                dest_opt = option.replace(src_suffix, dest_suffix)
            elif option.endswith(dest_suffix):
                source_opt = option.replace(dest_suffix, src_suffix)
                dest_opt = option
            sources_string = ' '.join(str(self.config_file.get(
                self.tag, source_opt)).split('\n'))
            job['sources'] = [
                pth.strip() for pth in sources_string.split(' ')]
            job['destination'] = self.config_file.get(
                self.tag, dest_opt)
            jobs[parts[0]] = CopyFilesJob(**job)
        self.jobs = jobs.values()

    def debug_msg(self):
        """Return some debug outut about the current state of the task."""
        msg = super().debug_msg() + "\n"
        for job in self.jobs:
            msg += '  %s:\n' % job.name
            msg += '    sources:\n      '
            msg += '\n      '.join(job.sources)
            msg += '\n    destination: %s\n' % job.destination
        return msg

    @property
    def default_config(self):
        """Return a string of default example section for config file."""
        config = "[%s_tag]\n" % self.config_name
        config += self.config_snippet_name
        comment = ["Add key pairs using the suffixes '_dst' and '_src'.",
                   "The keys with the '_dst' suffix should be a string",
                   "path to the destination for the matching source key.",
                   "The matching source key with the '_src' suffix is a",
                   "list of paths to be copied into the destination."]
        config += '; %s\n\n' % '\n; '.join(comment)
        return config
<commit_msg>tasks: add --cvs-exclude flag to copy_files rsync command<commit_after># Copyright 2016-2017 Curtis Sand <curtissand@gmail.com>
#
# 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.
"""Copy Files Task."""

import os
import subprocess
import glob
import shlex

from .core import Task

class CopyFilesJob(object):
    """Data object to represent one Copy Files Job."""

    def __init__(self, name, sources, destination):
        """Set up instance vars for a CopyFilesJob object."""
        self.name = name
        self.sources = sources
        self.destination = destination

class CopyFilesTask(Task):
    """Copy Files from around the system into the Escadrille build.

    Option keys use the suffixes "_dest" and "_src". Files listed in space
    separated strings as absolute paths are copied from options with the "_src"
    suffix to the single destination expected in the "_dest" option with the
    corresponding slug.

    (i.e "pics_src=/home/user/pics/*.jpeg /home/user/ref/images/*"
    would all get copied to "pics_dest=/tmp/escadrille/staging/")

    note: This behaviour disallows files containing spaces in their path. For
          paths containing spaces you can workaround this limitation by using
          an asterisk in place of a space. The wildcard will match the spaces
          and there is a very good chance that the rest of the path will
          preclude any other matches but the intended target.
    """

    config_name = 'copy_files'

    def __init__(self, *args, **kwargs):
        """Set up defaults for Copy Files Task instances."""
        self.jobs = []
        super().__init__(*args, **kwargs)

    def __call__(self, *args, **kwargs):
        """Execute the Copy Files Task."""
        print('Starting Copy Files Task')
        super().__call__(*args, **kwargs)
        self.dprint('%d copy jobs loaded from config file.' % len(self.jobs))
        for index, job in enumerate(self.jobs, 1):
            self.vprint('%s(%d/%d) %s' %
                        (self.indent, index, len(self.jobs), job.name))
            destination = os.path.abspath(os.path.expanduser(job.destination))
            if not os.path.exists(destination):
                os.makedirs(destination)
            for source_dir in job.sources:
                source_dir = os.path.abspath(os.path.expanduser(source_dir))
                source_paths = [shlex.quote(path) for path in
                                glob.glob(source_dir, recursive=True)]
                if not source_paths:
                    self.vprint('%sno files to copy at "%s"' %
                                (self.indent * 2, source_dir))
                    continue
                self.vprint('%scopying "%s"...' % (self.indent * 2,
                                                   source_dir))
                subprocess.check_call(
                    ' '.join(['rsync', '-Pa', '--ignore-existing',
                              '--cvs-exclude', *source_paths, destination]),
                    shell=True)
        self._set_status()

    def _load_config(self):
        """Generate a map of files and destinations for the Copy Files Task."""
        super()._load_config()
        jobs, src_suffix, dest_suffix = {}, '_src', '_dst'
        options = []
        if (self.config_file.parser and
                self.config_file.has_section(self.tag)):
            options = self.config_file.section(self.tag).keys()
        for option in options:
            parts = option.split('_')
            if not (option.endswith(src_suffix) or
                    option.endswith(dest_suffix)):
                continue
            if parts[0] in jobs:
                continue
            job = {'name': parts[0]}
            if option.endswith(src_suffix):
                source_opt = option
                dest_opt = option.replace(src_suffix, dest_suffix)
            elif option.endswith(dest_suffix):
                source_opt = option.replace(dest_suffix, src_suffix)
                dest_opt = option
            sources_string = ' '.join(str(self.config_file.get(
                self.tag, source_opt)).split('\n'))
            job['sources'] = [
                pth.strip() for pth in sources_string.split(' ')]
            job['destination'] = self.config_file.get(
                self.tag, dest_opt)
            jobs[parts[0]] = CopyFilesJob(**job)
        self.jobs = jobs.values()

    def debug_msg(self):
        """Return some debug outut about the current state of the task."""
        msg = super().debug_msg() + "\n"
        for job in self.jobs:
            msg += '  %s:\n' % job.name
            msg += '    sources:\n      '
            msg += '\n      '.join(job.sources)
            msg += '\n    destination: %s\n' % job.destination
        return msg

    @property
    def default_config(self):
        """Return a string of default example section for config file."""
        config = "[%s_tag]\n" % self.config_name
        config += self.config_snippet_name
        comment = ["Add key pairs using the suffixes '_dst' and '_src'.",
                   "The keys with the '_dst' suffix should be a string",
                   "path to the destination for the matching source key.",
                   "The matching source key with the '_src' suffix is a",
                   "list of paths to be copied into the destination."]
        config += '; %s\n\n' % '\n; '.join(comment)
        return config
<|endoftext|>


<commit_before>"""Defines the setup for the declxml library"""
from setuptools import setup

setup(
    name='declxml',
    description='Declarative XML processing library',
    version='0.10.0',
    url='http://declxml.readthedocs.io/',
    author='Greg Atkin',
    author_email='greg.scott.atkin@gmail.com',
    license='MIT',
    py_modules=['declxml'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
    ],
    keywords='XML, Parsing, Serialization'
)
<commit_msg>Publish version 0.11.0 to PyPi :shipit:<commit_after>"""Defines the setup for the declxml library"""
from setuptools import setup

setup(
    name='declxml',
    description='Declarative XML processing library',
    version='0.11.0',
    url='http://declxml.readthedocs.io/',
    author='Greg Atkin',
    author_email='greg.scott.atkin@gmail.com',
    license='MIT',
    py_modules=['declxml'],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
    ],
    keywords='XML, Parsing, Serialization'
)
<|endoftext|>


<commit_before># the following  import fixes/avoids some nostests issue
# see

try:
    import multiprocessing
except ImportError:
    pass

# the follwing is standard setup.py for a single package 'autowrap'

from setuptools import setup, find_packages

import autowrap

version = '%s.%s.%s' % autowrap.version

setup(name="autowrap",
      version=version,
      maintainer="Uwe Schmitt",
      maintainer_email="uschmitt@mineway.de",
      license="http://opensource.org/licenses/BSD-3-Clause",
      platforms=["any"],
      description='Generates Python Extension modules from commented Cython PXD files',
      classifiers=["Development Status :: 3 - Alpha",
                   "Intended Audience :: Developers",
                   "License :: OSI Approved :: BSD License",
                   "Programming Language :: Python :: 2.7",
                   "Topic :: Software Development :: Code Generators",
                   ],
      long_description="""
autowrap automatically generates python extension modules for wrapping
C++ libraries based on annotated (commented) cython pxd files. """,

      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,   # see MANIFEST.in
      zip_safe=False,
      test_suite='nose.collector',
      tests_require=['nose'],
      install_requires=['Cython>=0.18'],
      entry_points={
           'console_scripts':
           [
               'autowrap = autowrap.Main:main',
           ]
      },

     )
<commit_msg>[CLEANUP] setup.py<commit_after># the following  import fixes/avoids some nostests issue
# see

try:
    import multiprocessing
except ImportError:
    pass

# the follwing is standard setup.py for a single package 'autowrap'

from setuptools import setup, find_packages

import autowrap

version = '%s.%s.%s' % autowrap.version

setup(name="autowrap",
      version=version,
      maintainer="Uwe Schmitt",
      maintainer_email="uschmitt@mineway.de",
      license="http://opensource.org/licenses/BSD-3-Clause",
      platforms=["any"],
      description='Generates Python Extension modules from commented Cython PXD files',
      classifiers=["Development Status :: 3 - Alpha",
                   "Intended Audience :: Developers",
                   "License :: OSI Approved :: BSD License",
                   "Programming Language :: Python :: 2.7",
                   "Topic :: Software Development :: Code Generators",
                   ],
      long_description="""
autowrap automatically generates python extension modules for wrapping
C++ libraries based on annotated (commented) cython pxd files. """,

      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,   # see MANIFEST.in
      zip_safe=False,
      test_suite='nose.collector',
      tests_require=['nose'],
      install_requires=['Cython>=0.18'],
      entry_points={
           'console_scripts':
           [
               'autowrap = autowrap.Main:main',
           ]
      },

      )
<|endoftext|>


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

setup(
    name="django-planet",
    version=__import__("planet").__version__,
    url="http://github.com/matagus/django-planet",
    license="BSD",
    description="Django app to build a planet, RSS/Atom feeds aggregator.",
    long_description=open("docs/usage.rst").read(),

    author="Matias Agustin Mendez",
    author_email="me@matagus.com.ar",

    install_requires=["feedparser", "south", "django-tagging", "django-pagination", "Django>=1.4"],

    packages=find_packages(exclude=["sample_project"]),
    package_dir={"planet": "planet"},
    package_data={
        "planet": [
            "templates/*.html",
            "templates/planet/*.html",
            "templates/planet/*/*.html",
            "templates/planet/authors/blocks/*.html",
            "templates/planet/tags/blocks/*.html",
            "templates/planet/feeds/blocks/*.html",
            "templates/planet/microformats/*.xml",
            "media/planet/css/*.css",
            "media/planet/js/*.js",
            "media/planet/icons/*.gif",
            "media/planet/images/*.png",
        ]},

    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2.6",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary",
    ],
    zip_safe=False,
)
<commit_msg>Adding BeautifulSoup as requirement to setup.py.<commit_after># -*- coding: utf-8 -*-
from setuptools import setup, find_packages

setup(
    name="django-planet",
    version=__import__("planet").__version__,
    url="http://github.com/matagus/django-planet",
    license="BSD",
    description="Django app to build a planet, RSS/Atom feeds aggregator.",
    long_description=open("docs/usage.rst").read(),

    author="Matias Agustin Mendez",
    author_email="me@matagus.com.ar",

    install_requires=["feedparser", "south", "django-tagging",
        "django-pagination", "Django>=1.4", "BeautifulSoup"],

    packages=find_packages(exclude=["sample_project"]),
    package_dir={"planet": "planet"},
    package_data={
        "planet": [
            "templates/*.html",
            "templates/planet/*.html",
            "templates/planet/*/*.html",
            "templates/planet/authors/blocks/*.html",
            "templates/planet/tags/blocks/*.html",
            "templates/planet/feeds/blocks/*.html",
            "templates/planet/microformats/*.xml",
            "media/planet/css/*.css",
            "media/planet/js/*.js",
            "media/planet/icons/*.gif",
            "media/planet/images/*.png",
        ]},

    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2.6",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary",
    ],
    zip_safe=False,
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# Copyright 2015 Paul Schwendenman. All Rights Reserved.

from setuptools import setup

try:
    readme = open('readme.rst', 'r').read()
except:
    readme = ''

setup(name='twintrimmer',
      version='0.9',
      description='tool for removing duplicate files',
      long_description=readme,
      author='Paul Schwendenman',
      author_email='schwendenman.paul+twintrim@gmail.com',
      license='MIT',
      url='https://github.com/paul-schwendenman/twintrim',
      packages=['twintrimmer'],
      classifiers=['Environment :: Console',
                   'Intended Audience :: Developers',
                   'Intended Audience :: End Users/Desktop',
                   'License :: OSI Approved :: MIT License',
                   'Programming Language :: Python :: 3',
                   'Programming Language :: Python :: 3.4',
                   'Operating System :: POSIX :: Linux',
                   'Topic :: Utilities', ],
      entry_points=
      {'console_scripts': ['twintrim = twintrimmer:run.terminal'], }, )
<commit_msg>Bug fix broken 0.9 release<commit_after>#!/usr/bin/env python
# Copyright 2015 Paul Schwendenman. All Rights Reserved.

from setuptools import setup

try:
    readme = open('readme.rst', 'r').read()
except:
    readme = ''

setup(name='twintrimmer',
      version='0.9.1',
      description='tool for removing duplicate files',
      long_description=readme,
      author='Paul Schwendenman',
      author_email='schwendenman.paul+twintrim@gmail.com',
      license='MIT',
      url='https://github.com/paul-schwendenman/twintrim',
      packages=['twintrimmer'],
      classifiers=['Environment :: Console',
                   'Intended Audience :: Developers',
                   'Intended Audience :: End Users/Desktop',
                   'License :: OSI Approved :: MIT License',
                   'Programming Language :: Python :: 3',
                   'Programming Language :: Python :: 3.4',
                   'Operating System :: POSIX :: Linux',
                   'Topic :: Utilities', ],
      entry_points=
      {'console_scripts': ['twintrim = twintrimmer:tool.terminal'], }, )
<|endoftext|>


<commit_before>import sys
from setuptools import setup, Extension

# setuptools DWIM monkey-patch madness: http://dou.bz/37m3XL
if 'setuptools.extension' in sys.modules:
    m = sys.modules['setuptools.extension']
    m.Extension.__dict__ = m._Extension.__dict__

ext_modules = [Extension('dpark.portable_hash', ['dpark/portable_hash.pyx'])]
version = '0.3.2'

setup(name='DPark',
      version=version,
      description="Python clone of Spark, MapReduce like "
            +"computing framework supporting iterative algorithms.",
      classifiers=[
        "Programming Language :: Python",
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX',
      ],
      keywords='dpark python mapreduce spark',
      author='Davies Liu',
      author_email='davies.liu@gmail.com',
      license= 'BSD License',
      packages=['dpark', 'dpark.moosefs'],
      include_package_data=True,
      zip_safe=False,
      setup_requires=['setuptools_cython', 'Cython >= 0.20'],
      url="https://github.com/douban/dpark",
      download_url = 'https://github.com/douban/dpark/archive/%s.tar.gz' % version,
      install_requires=[
          'pymesos',
          'setuptools',
          'pyzmq',
          'msgpack-python',
          'cython',
          'lz4',
          'psutil',
      ],
      tests_require=[
          'nose',
      ],
      test_suite='nose.collector',
      ext_modules=ext_modules,
      scripts=[
          'tools/drun',
          'tools/mrun',
          'tools/executor.py',
          'tools/scheduler.py',
          'tools/dquery',
          'examples/dgrep',
      ]
)
<commit_msg>depend pymesos<0.2.0<commit_after>import sys
from setuptools import setup, Extension

# setuptools DWIM monkey-patch madness: http://dou.bz/37m3XL
if 'setuptools.extension' in sys.modules:
    m = sys.modules['setuptools.extension']
    m.Extension.__dict__ = m._Extension.__dict__

ext_modules = [Extension('dpark.portable_hash', ['dpark/portable_hash.pyx'])]
version = '0.3.2'

setup(name='DPark',
      version=version,
      description="Python clone of Spark, MapReduce like "
            +"computing framework supporting iterative algorithms.",
      classifiers=[
        "Programming Language :: Python",
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX',
      ],
      keywords='dpark python mapreduce spark',
      author='Davies Liu',
      author_email='davies.liu@gmail.com',
      license= 'BSD License',
      packages=['dpark', 'dpark.moosefs'],
      include_package_data=True,
      zip_safe=False,
      setup_requires=['setuptools_cython', 'Cython >= 0.20'],
      url="https://github.com/douban/dpark",
      download_url = 'https://github.com/douban/dpark/archive/%s.tar.gz' % version,
      install_requires=[
          'pymesos<0.2.0',
          'setuptools',
          'pyzmq',
          'msgpack-python',
          'cython',
          'lz4',
          'psutil',
      ],
      tests_require=[
          'nose',
      ],
      test_suite='nose.collector',
      ext_modules=ext_modules,
      scripts=[
          'tools/drun',
          'tools/mrun',
          'tools/executor.py',
          'tools/scheduler.py',
          'tools/dquery',
          'examples/dgrep',
      ]
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from __future__ import print_function
import io
import os
import shutil
import subprocess
import sys
import contextlib
from distutils.command.build_ext import build_ext
from distutils.sysconfig import get_python_inc

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

PACKAGES = ["cymem", "cymem.tests"]
MOD_NAMES = ["cymem.cymem"]

# By subclassing build_extensions we have the actual compiler that will be used which is really known only after finalize_options
# http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
compile_options = {
    "msvc": ["/Ox", "/EHsc"],
    "other": ["-O3", "-Wno-strict-prototypes", "-Wno-unused-function"],
}
link_options = {"msvc": [], "other": []}

class build_ext_options:
    def build_options(self):
        for e in self.extensions:
            e.extra_compile_args = compile_options.get(
                self.compiler.compiler_type, compile_options["other"]
            )
        for e in self.extensions:
            e.extra_link_args = link_options.get(
                self.compiler.compiler_type, link_options["other"]
            )

class build_ext_subclass(build_ext, build_ext_options):
    def build_extensions(self):
        build_ext_options.build_options(self)
        build_ext.build_extensions(self)

def generate_cython(root, source):
    print("Cythonizing sources")
    p = subprocess.call(
        [sys.executable, os.path.join(root, "bin", "cythonize.py"), source]
    )
    if p != 0:
        raise RuntimeError("Running cythonize failed")

def is_source_release(path):
    return os.path.exists(os.path.join(path, "PKG-INFO"))

def clean(path):
    for name in MOD_NAMES:
        name = name.replace(".", "/")
        for ext in [".so", ".html", ".cpp", ".c"]:
            file_path = os.path.join(path, name + ext)
            if os.path.exists(file_path):
                os.unlink(file_path)

@contextlib.contextmanager
def chdir(new_dir):
    old_dir = os.getcwd()
    try:
        os.chdir(new_dir)
        sys.path.insert(0, new_dir)
        yield
    finally:
        del sys.path[0]
        os.chdir(old_dir)

def setup_package():
    root = os.path.abspath(os.path.dirname(__file__))

    if len(sys.argv) > 1 and sys.argv[1] == "clean":
        return clean(root)

    with chdir(root):
        with io.open(os.path.join(root, "cymem", "about.py"), encoding="utf8") as f:
            about = {}
            exec(f.read(), about)

        with io.open(os.path.join(root, "README.md"), encoding="utf8") as f:
            readme = f.read()

        include_dirs = [get_python_inc(plat_specific=True)]

        ext_modules = []
        for mod_name in MOD_NAMES:
            mod_path = mod_name.replace(".", "/") + ".cpp"
            ext_modules.append(
                Extension(
                    mod_name, [mod_path], language="c++", include_dirs=include_dirs
                )
            )

        if not is_source_release(root):
            generate_cython(root, "cymem")

        setup(
            name=about["__title__"],
            zip_safe=False,
            packages=PACKAGES,
            package_data={"": ["*.pyx", "*.pxd"]},
            description=about["__summary__"],
            long_description=readme,
            long_description_content_type="text/markdown",
            author=about["__author__"],
            author_email=about["__email__"],
            version=about["__version__"],
            url=about["__uri__"],
            license=about["__license__"],
            ext_modules=ext_modules,
            setup_requires=["wheel>=0.32.0,<0.33.0"],
            classifiers=[
                "Environment :: Console",
                "Intended Audience :: Developers",
                "Intended Audience :: Science/Research",
                "License :: OSI Approved :: MIT License",
                "Operating System :: POSIX :: Linux",
                "Operating System :: MacOS :: MacOS X",
                "Operating System :: Microsoft :: Windows",
                "Programming Language :: Cython",
                "Programming Language :: Python :: 2.6",
                "Programming Language :: Python :: 2.7",
                "Programming Language :: Python :: 3.3",
                "Programming Language :: Python :: 3.4",
                "Programming Language :: Python :: 3.5",
                "Programming Language :: Python :: 3.6",
                "Programming Language :: Python :: 3.7",
                "Topic :: Scientific/Engineering",
            ],
            cmdclass={"build_ext": build_ext_subclass},
        )

if __name__ == "__main__":
    setup_package()
<commit_msg>Remove unused import<commit_after>#!/usr/bin/env python
from __future__ import print_function
import io
import os
import subprocess
import sys
import contextlib
from distutils.command.build_ext import build_ext
from distutils.sysconfig import get_python_inc

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

PACKAGES = ["cymem", "cymem.tests"]
MOD_NAMES = ["cymem.cymem"]

# By subclassing build_extensions we have the actual compiler that will be used which is really known only after finalize_options
# http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
compile_options = {
    "msvc": ["/Ox", "/EHsc"],
    "other": ["-O3", "-Wno-strict-prototypes", "-Wno-unused-function"],
}
link_options = {"msvc": [], "other": []}

class build_ext_options:
    def build_options(self):
        for e in self.extensions:
            e.extra_compile_args = compile_options.get(
                self.compiler.compiler_type, compile_options["other"]
            )
        for e in self.extensions:
            e.extra_link_args = link_options.get(
                self.compiler.compiler_type, link_options["other"]
            )

class build_ext_subclass(build_ext, build_ext_options):
    def build_extensions(self):
        build_ext_options.build_options(self)
        build_ext.build_extensions(self)

def generate_cython(root, source):
    print("Cythonizing sources")
    p = subprocess.call(
        [sys.executable, os.path.join(root, "bin", "cythonize.py"), source]
    )
    if p != 0:
        raise RuntimeError("Running cythonize failed")

def is_source_release(path):
    return os.path.exists(os.path.join(path, "PKG-INFO"))

def clean(path):
    for name in MOD_NAMES:
        name = name.replace(".", "/")
        for ext in [".so", ".html", ".cpp", ".c"]:
            file_path = os.path.join(path, name + ext)
            if os.path.exists(file_path):
                os.unlink(file_path)

@contextlib.contextmanager
def chdir(new_dir):
    old_dir = os.getcwd()
    try:
        os.chdir(new_dir)
        sys.path.insert(0, new_dir)
        yield
    finally:
        del sys.path[0]
        os.chdir(old_dir)

def setup_package():
    root = os.path.abspath(os.path.dirname(__file__))

    if len(sys.argv) > 1 and sys.argv[1] == "clean":
        return clean(root)

    with chdir(root):
        with io.open(os.path.join(root, "cymem", "about.py"), encoding="utf8") as f:
            about = {}
            exec(f.read(), about)

        with io.open(os.path.join(root, "README.md"), encoding="utf8") as f:
            readme = f.read()

        include_dirs = [get_python_inc(plat_specific=True)]

        ext_modules = []
        for mod_name in MOD_NAMES:
            mod_path = mod_name.replace(".", "/") + ".cpp"
            ext_modules.append(
                Extension(
                    mod_name, [mod_path], language="c++", include_dirs=include_dirs
                )
            )

        if not is_source_release(root):
            generate_cython(root, "cymem")

        setup(
            name=about["__title__"],
            zip_safe=False,
            packages=PACKAGES,
            package_data={"": ["*.pyx", "*.pxd"]},
            description=about["__summary__"],
            long_description=readme,
            long_description_content_type="text/markdown",
            author=about["__author__"],
            author_email=about["__email__"],
            version=about["__version__"],
            url=about["__uri__"],
            license=about["__license__"],
            ext_modules=ext_modules,
            setup_requires=["wheel>=0.32.0,<0.33.0"],
            classifiers=[
                "Environment :: Console",
                "Intended Audience :: Developers",
                "Intended Audience :: Science/Research",
                "License :: OSI Approved :: MIT License",
                "Operating System :: POSIX :: Linux",
                "Operating System :: MacOS :: MacOS X",
                "Operating System :: Microsoft :: Windows",
                "Programming Language :: Cython",
                "Programming Language :: Python :: 2.6",
                "Programming Language :: Python :: 2.7",
                "Programming Language :: Python :: 3.3",
                "Programming Language :: Python :: 3.4",
                "Programming Language :: Python :: 3.5",
                "Programming Language :: Python :: 3.6",
                "Programming Language :: Python :: 3.7",
                "Topic :: Scientific/Engineering",
            ],
            cmdclass={"build_ext": build_ext_subclass},
        )

if __name__ == "__main__":
    setup_package()
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='dash_core_components',
    version='0.2.0',
    author='Chris Parmer',
    author_email='chris@plot.ly',
    packages=['dash_core_components'],
    include_package_data=True,
    license='MIT',
    description='Dash UI core component suite',
    install_requires=['flask', 'plotly', 'flask-cors', 'dash.ly']
)
<commit_msg>match pypi with npm<commit_after>from setuptools import setup

setup(
    name='dash_core_components',
    version='0.2.1',
    author='Chris Parmer',
    author_email='chris@plot.ly',
    packages=['dash_core_components'],
    include_package_data=True,
    license='MIT',
    description='Dash UI core component suite',
    install_requires=['flask', 'plotly', 'flask-cors', 'dash.ly']
)
<|endoftext|>


<commit_before># coding=utf-8
# Copyright 2018 The TensorFlow GAN 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 TF-GAN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import codecs
import io
import os
import sys
import unittest

from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install as InstallCommandBase
from setuptools.command.test import test as TestCommandBase
from setuptools.dist import Distribution

from tensorflow_gan import __version__  # pylint: disable=g-import-not-at-top

project_name = 'tensorflow-gan'
version = __version__

class StderrWrapper(io.IOBase):

  def write(self, *args, **kwargs):
    return sys.stderr.write(*args, **kwargs)

  def writeln(self, *args, **kwargs):
    if args or kwargs:
      sys.stderr.write(*args, **kwargs)
    sys.stderr.write('\n')

class Test(TestCommandBase):

  def run_tests(self):
    # Import absl inside run, where dependencies have been loaded already.
    from absl import app  # pylint: disable=g-import-not-at-top

    def main(_):
      test_loader = unittest.TestLoader()
      test_suite = test_loader.discover('tensorflow_gan', pattern='*_test.py')
      stderr = StderrWrapper()
      result = unittest.TextTestResult(stderr, descriptions=True, verbosity=2)
      test_suite.run(result)

      result.printErrors()

      final_output = ('Tests run: {}. Errors: {}  Failures: {}.'.format(
          result.testsRun, len(result.errors), len(result.failures)))

      header = '=' * len(final_output)
      stderr.writeln(header)
      stderr.writeln(final_output)
      stderr.writeln(header)

      if result.wasSuccessful():
        return 0
      else:
        return 1

    # Run inside absl.app.run to ensure flags parsing is done.
    return app.run(main)

class BinaryDistribution(Distribution):
  """This class is needed in order to create OS specific wheels."""

  def has_ext_modules(self):
    return False

here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
  long_description = f.read()

setup(
    name=project_name,
    version=version,
    description=('TF-GAN:A Generative Adversarial Networks Library for '
                 'TensorFlow'),
    long_description=long_description,
    author='Joel Shor',
    author_email='joelshor@google.com',
    url='http://github.com/tensorflow/gan',
    license='Apache 2.0',
    packages=find_packages(),
    zip_safe=False,
    distclass=BinaryDistribution,
    cmdclass={
        'test': Test,
        'pip_pkg': InstallCommandBase,
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        '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',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    keywords='tensorflow GAN generative model machine learning',
)
<commit_msg>Fix spelling mistake in package description.<commit_after># coding=utf-8
# Copyright 2018 The TensorFlow GAN 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 TF-GAN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import codecs
import io
import os
import sys
import unittest

from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install as InstallCommandBase
from setuptools.command.test import test as TestCommandBase
from setuptools.dist import Distribution

from tensorflow_gan import __version__  # pylint: disable=g-import-not-at-top

project_name = 'tensorflow-gan'
version = __version__

class StderrWrapper(io.IOBase):

  def write(self, *args, **kwargs):
    return sys.stderr.write(*args, **kwargs)

  def writeln(self, *args, **kwargs):
    if args or kwargs:
      sys.stderr.write(*args, **kwargs)
    sys.stderr.write('\n')

class Test(TestCommandBase):

  def run_tests(self):
    # Import absl inside run, where dependencies have been loaded already.
    from absl import app  # pylint: disable=g-import-not-at-top

    def main(_):
      test_loader = unittest.TestLoader()
      test_suite = test_loader.discover('tensorflow_gan', pattern='*_test.py')
      stderr = StderrWrapper()
      result = unittest.TextTestResult(stderr, descriptions=True, verbosity=2)
      test_suite.run(result)

      result.printErrors()

      final_output = ('Tests run: {}. Errors: {}  Failures: {}.'.format(
          result.testsRun, len(result.errors), len(result.failures)))

      header = '=' * len(final_output)
      stderr.writeln(header)
      stderr.writeln(final_output)
      stderr.writeln(header)

      if result.wasSuccessful():
        return 0
      else:
        return 1

    # Run inside absl.app.run to ensure flags parsing is done.
    return app.run(main)

class BinaryDistribution(Distribution):
  """This class is needed in order to create OS specific wheels."""

  def has_ext_modules(self):
    return False

here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
  long_description = f.read()

setup(
    name=project_name,
    version=version,
    description=('TF-GAN: A Generative Adversarial Networks Library for '
                 'TensorFlow'),
    long_description=long_description,
    author='Joel Shor',
    author_email='joelshor@google.com',
    url='http://github.com/tensorflow/gan',
    license='Apache 2.0',
    packages=find_packages(),
    zip_safe=False,
    distclass=BinaryDistribution,
    cmdclass={
        'test': Test,
        'pip_pkg': InstallCommandBase,
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        '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',
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    keywords='tensorflow GAN generative model machine learning',
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name="servicemanager",
    version="2.0.2",
    description="A python tool to manage developing and testing with lots of microservices",
    url="https://github.com/hmrc/service-manager",
    author="hmrc-web-operations",
    license="Apache Licence 2.0",
    packages=[
        "servicemanager",
        "servicemanager.actions",
        "servicemanager.server",
        "servicemanager.service",
        "servicemanager.thirdparty",
    ],
    install_requires=[
        "requests~=2.24.0",
        "pymongo==3.11.0",
        "bottle==0.12.18",
        "pytest==5.4.3",
        "pyhamcrest==2.0.2",
        "argcomplete==1.12.0",
        "prettytable==0.7.2"
    ],
    scripts=["bin/sm", "bin/smserver"],
    zip_safe=False,
)
<commit_msg>BDOG-914 bump to 2.0.3<commit_after>from setuptools import setup

setup(
    name="servicemanager",
    version="2.0.3",
    description="A python tool to manage developing and testing with lots of microservices",
    url="https://github.com/hmrc/service-manager",
    author="hmrc-web-operations",
    license="Apache Licence 2.0",
    packages=[
        "servicemanager",
        "servicemanager.actions",
        "servicemanager.server",
        "servicemanager.service",
        "servicemanager.thirdparty",
    ],
    install_requires=[
        "requests~=2.24.0",
        "pymongo==3.11.0",
        "bottle==0.12.18",
        "pytest==5.4.3",
        "pyhamcrest==2.0.2",
        "argcomplete==1.12.0",
        "prettytable==0.7.2"
    ],
    scripts=["bin/sm", "bin/smserver"],
    zip_safe=False,
)
<|endoftext|>


<commit_before>from setuptools import find_packages
from setuptools import setup

setup(name='cleverhans',
      version='3.0.1',
      url='https://github.com/tensorflow/cleverhans',
      license='MIT',
      install_requires=[
          'nose',
          'pycodestyle',
          'scipy',
          'matplotlib',
          "mnist ~= 0.2",
          "numpy",
          "tensorflow-probability",
      ],
      # Explicit dependence on TensorFlow is not supported.
      # See https://github.com/tensorflow/tensorflow/issues/7166
      extras_require={
          "tf": ["tensorflow>=1.0.0"],
          "tf_gpu": ["tensorflow-gpu>=1.0.0"],
          "pytorch": ["torch==0.4.0", "torchvision==0.2.1"],
      },
      packages=find_packages())
<commit_msg>add joblib to required packages in setup<commit_after>from setuptools import find_packages
from setuptools import setup

setup(name='cleverhans',
      version='3.0.1',
      url='https://github.com/tensorflow/cleverhans',
      license='MIT',
      install_requires=[
          'nose',
          'pycodestyle',
          'scipy',
          'matplotlib',
          "mnist ~= 0.2",
          "numpy",
          "tensorflow-probability",
          "joblib",
      ],
      # Explicit dependence on TensorFlow is not supported.
      # See https://github.com/tensorflow/tensorflow/issues/7166
      extras_require={
          "tf": ["tensorflow>=1.0.0"],
          "tf_gpu": ["tensorflow-gpu>=1.0.0"],
          "pytorch": ["torch==0.4.0", "torchvision==0.2.1"],
      },
      packages=find_packages())
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name = 'linqish',
    py_modules = ['linqish'],
    version = '0.5',
    description = 'Iterable manipulation',
    author = 'Henri Wiechers',
    author_email = 'hwiechers@gmail.com',
    url = 'http://linqish.codeplex.com',
    download_url = 'http://linqish-py.googlecode.com/files/linqish-0.5.zip',
    keywords = ['iterable', 'linq'],
    classifiers = [
    'Programming Language :: Python :: 2.7',
    'License :: OSI Approved ::  Apache Software License',
    'Operating System :: OS Independent',
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Topic :: Software Development :: Libraries :: Python Modules'
    ],
    long_description = """\
Python module for manipulating iterables.
An implementation of the .Net Framework's Linq to Objects for Python.
""")

<commit_msg>setup.py: fixed typo in classifier<commit_after>from distutils.core import setup

setup(
    name = 'linqish',
    py_modules = ['linqish'],
    version = '0.5',
    description = 'Iterable manipulation',
    author = 'Henri Wiechers',
    author_email = 'hwiechers@gmail.com',
    url = 'http://linqish.codeplex.com',
    download_url = 'http://linqish-py.googlecode.com/files/linqish-0.5.zip',
    keywords = ['iterable', 'linq'],
    classifiers = [
    'Programming Language :: Python :: 2.7',
    'License :: OSI Approved :: Apache Software License',
    'Operating System :: OS Independent',
    'Development Status :: 4 - Beta',
    'Intended Audience :: Developers',
    'Topic :: Software Development :: Libraries :: Python Modules'
    ],
    long_description = """\
Python module for manipulating iterables.
An implementation of the .Net Framework's Linq to Objects for Python.
""")

<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
"""A simple permutation for arbitrary size integers."""
from setuptools import find_packages, setup

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

setup(
    name='intperm',
    version='1.1.0',
    url='https://github.com/attilaolah/intperm.py',
    license='Public Domain',
    author='Attila Oláh',
    author_email='attilaolah@gmail.com',
    description='A simple permutation for arbitrary size integers.',
    long_description=LONG_DESCRIPTION,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: Public Domain',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries',
    ],
    tests_require=[
        'nose',
    ],
    packages=find_packages('src'),
    package_dir={'': 'src'},
    include_package_data=False,
    test_suite='nose.collector',
    zip_safe=True,
)
<commit_msg>1.1.1 release<commit_after># -*- coding: utf-8 -*-
"""A simple permutation for arbitrary size integers."""
from setuptools import find_packages, setup

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

setup(
    name='intperm',
    version='1.1.1',
    url='https://github.com/attilaolah/intperm.py',
    license='Public Domain',
    author='Attila Oláh',
    author_email='attilaolah@gmail.com',
    description='A simple permutation for arbitrary size integers.',
    long_description=LONG_DESCRIPTION,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: Public Domain',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Software Development :: Libraries',
    ],
    tests_require=[
        'nose',
    ],
    packages=find_packages('src'),
    package_dir={'': 'src'},
    include_package_data=False,
    test_suite='nose.collector',
    zip_safe=True,
)
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name = "fsmonitor",
    version = "0.1",
    description = "Filesystem monitoring",
    author = "Luke McCarthy",
    author_email = "luke@iogopro.co.uk",
    url = "http://github.com/shaurz/fsmonitor",
    install_requires=[
        'pypiwin32',
    ],
    packages = ["fsmonitor"],
)
<commit_msg>Add long description in setup.py for push to Pypi<commit_after>from distutils.core import setup
from os.path import exists

setup(
    name = "fsmonitor",
    version = "0.1",
    description = "Filesystem monitoring",
    long_description=(open('README.rst').read() if exists('README.rst')
                      else ''),
    author = "Luke McCarthy",
    author_email = "luke@iogopro.co.uk",
    licence="MIT",
    url = "http://github.com/shaurz/fsmonitor",
    install_requires=[
        'pypiwin32',
    ],
    packages = ["fsmonitor"],
)
<|endoftext|>


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

import os
import os.path
import sys
from glob import glob
from distutils.core import setup
from distutils.command.install import install
from distutils.command.install_scripts import install_scripts
import trac

PACKAGE = 'Trac'
VERSION = str(trac.__version__)
URL = trac.__url__
LICENSE = trac.__license__

if sys.version_info<(2,1):
    print >>sys.stderr, "You need at least Python 2.1 for %s %s" % (PACKAGE, VERSION)
    sys.exit(3)

def _p(unix_path):
     return os.path.normpath(unix_path)

class my_install (install):
     def run (self):
         self.siteconfig()

     def siteconfig(self):
         templates_dir = os.path.join(self.prefix, 'share','trac','templates')
         htdocs_dir = os.path.join(self.prefix, 'share','trac','htdocs')
         wiki_dir = os.path.join(self.prefix, 'share','trac','wiki-default')
         f = open(_p('trac/siteconfig.py'),'w')
         f.write("""
# PLEASE DO NOT EDIT THIS FILE!
# This file was autogenerated when installing %(trac)s %(ver)s.
#
__default_templates_dir__ = '%(templates)s'
__default_htdocs_dir__ = '%(htdocs)s'
__default_wiki_dir__ = '%(wiki)s'

""" % {'trac':PACKAGE, 'ver':VERSION, 'templates':_p(templates_dir),
       'htdocs':_p(htdocs_dir), 'wiki':_p(wiki_dir)})
         f.close()

         # Run actual install
         install.run(self)

         print
         print "Thank you for choosing Trac %s. Enjoy your stay!" % VERSION
         print trac.__credits__

class my_install_scripts (install_scripts):
     def initialize_options (self):
          install_scripts.initialize_options(self)
          self.install_data = None

     def finalize_options (self):
          install_scripts.finalize_options(self)
          self.set_undefined_options('install',
                                     ('install_data', 'install_data'))

     def run (self):
          if not self.skip_build:
               self.run_command('build_scripts')

          self.mkpath(os.path.normpath(self.install_dir))
          self.copy_file(os.path.join(self.build_dir, 'trac-admin'),
                         self.install_dir)
          cgi_dir = os.path.join(self.install_data, 'share', 'trac', 'cgi-bin')
          if not os.path.exists(cgi_dir):
               os.makedirs(cgi_dir)
          self.copy_file(os.path.join(self.build_dir, 'trac.cgi'), cgi_dir)

setup(name="trac",
      description="Trac - Wiki-based issue tracker and project environment",
      version=VERSION,
      author="Edgewall Software",
      author_email="info@edgewall.com",
      license=LICENSE,
      url=URL,
      packages=['trac'],
      data_files=[(_p('share/trac/templates'), glob('templates/*')),
                  (_p('share/trac/htdocs'), glob(_p('htdocs/*.*')) + [_p('htdocs/README')]),
                  (_p('share/trac/htdocs/css'), glob(_p('htdocs/css/*'))),
                  (_p('share/trac/wiki-default'), glob(_p('wiki-default/*')))],
      scripts=[_p('scripts/trac-admin'), _p('cgi-bin/trac.cgi')],
      cmdclass = {'install': my_install,
                  'install_scripts': my_install_scripts})

<commit_msg>Make sure the executable bit is set on trac.cgi when installing.<commit_after>#!/usr/bin/env python

import os
import os.path
import sys
from glob import glob
from distutils.core import setup
from distutils.command.install import install
from distutils.command.install_scripts import install_scripts
from distutils import log
from stat import ST_MODE

import trac

PACKAGE = 'Trac'
VERSION = str(trac.__version__)
URL = trac.__url__
LICENSE = trac.__license__

if sys.version_info<(2,1):
    print >>sys.stderr, "You need at least Python 2.1 for %s %s" % (PACKAGE, VERSION)
    sys.exit(3)

def _p(unix_path):
     return os.path.normpath(unix_path)

class my_install (install):
     def run (self):
         self.siteconfig()

     def siteconfig(self):
         templates_dir = os.path.join(self.prefix, 'share','trac','templates')
         htdocs_dir = os.path.join(self.prefix, 'share','trac','htdocs')
         wiki_dir = os.path.join(self.prefix, 'share','trac','wiki-default')
         f = open(_p('trac/siteconfig.py'),'w')
         f.write("""
# PLEASE DO NOT EDIT THIS FILE!
# This file was autogenerated when installing %(trac)s %(ver)s.
#
__default_templates_dir__ = '%(templates)s'
__default_htdocs_dir__ = '%(htdocs)s'
__default_wiki_dir__ = '%(wiki)s'

""" % {'trac':PACKAGE, 'ver':VERSION, 'templates':_p(templates_dir),
       'htdocs':_p(htdocs_dir), 'wiki':_p(wiki_dir)})
         f.close()

         # Run actual install
         install.run(self)

         print
         print "Thank you for choosing Trac %s. Enjoy your stay!" % VERSION
         print trac.__credits__

class my_install_scripts (install_scripts):
    def initialize_options (self):
        install_scripts.initialize_options(self)
        self.install_data = None

    def finalize_options (self):
        install_scripts.finalize_options(self)
        self.set_undefined_options('install',
                                   ('install_data', 'install_data'))

    def run (self):
        if not self.skip_build:
            self.run_command('build_scripts')

        self.outfiles = []

        self.mkpath(os.path.normpath(self.install_dir))
        ofile, copied = self.copy_file(os.path.join(self.build_dir,
                                                     'trac-admin'),
                                        self.install_dir)
        if copied:
            self.outfiles.append(ofile)

        cgi_dir = os.path.join(self.install_data, 'share', 'trac', 'cgi-bin')
        if not os.path.exists(cgi_dir):
            os.makedirs(cgi_dir)

        ofile, copied = self.copy_file(os.path.join(self.build_dir,
                                                    'trac.cgi'), cgi_dir)
        if copied:
            self.outfiles.append(ofile)

        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the scripts we just installed.
            for file in self.get_outputs():
                if self.dry_run:
                    log.info("changing mode of %s", file)
                else:
                    mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777
                    log.info("changing mode of %s to %o", file, mode)
                    os.chmod(file, mode)

setup(name="trac",
      description="Trac - Wiki-based issue tracker and project environment",
      version=VERSION,
      author="Edgewall Software",
      author_email="info@edgewall.com",
      license=LICENSE,
      url=URL,
      packages=['trac'],
      data_files=[(_p('share/trac/templates'), glob('templates/*')),
                  (_p('share/trac/htdocs'), glob(_p('htdocs/*.*')) + [_p('htdocs/README')]),
                  (_p('share/trac/htdocs/css'), glob(_p('htdocs/css/*'))),
                  (_p('share/trac/wiki-default'), glob(_p('wiki-default/*')))],
      scripts=[_p('scripts/trac-admin'), _p('cgi-bin/trac.cgi')],
      cmdclass = {'install': my_install,
                  'install_scripts': my_install_scripts})

<|endoftext|>


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

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

if sys.argv[-1] == 'pypi':
    os.system('python setup.py sdist bdist_wheel upload')
    sys.exit()

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

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

setup(
    name='OBB_Maya',
    version='0.1.1',
    description="Oriented Bounding Boxes in Maya.",
    long_description=readme,
    author="Christopher DeVito",
    author_email='chrisdevito@chribis.com',
    url='https://github.com/chrisdevito/OBB',
    packages=[
        'OBB',
    ],
    package_dir={'OBB':
                 'OBB'},
    include_package_data=True,
    license="MIT",
    zip_safe=False,
    keywords='OBB',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Natural Language :: English',
        'Programming Language :: Python :: 2.7',
    ],
)
<commit_msg>changed version.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys

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

if sys.argv[-1] == 'pypi':
    os.system('python setup.py sdist bdist_wheel upload')
    sys.exit()

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

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

setup(
    name='OBB_Maya',
    version='0.1.2',
    description="Oriented Bounding Boxes in Maya.",
    long_description=readme,
    author="Christopher DeVito",
    author_email='chrisdevito@chribis.com',
    url='https://github.com/chrisdevito/OBB',
    packages=[
        'OBB',
    ],
    package_dir={'OBB':
                 'OBB'},
    include_package_data=True,
    license="MIT",
    zip_safe=False,
    keywords='OBB',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Natural Language :: English',
        'Programming Language :: Python :: 2.7',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='alexandra',
    version='0.3.1',
    description='Toolkit for writing Amazon Alexa skills as web services',
    author='Erik Price',
    url='https://github.com/erik/alexandra',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Topic :: Home Automation',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
    ],
    packages=['alexandra'],
    license='ISC',
    test_requires=['tox'],
    install_requires=[
        'Werkzeug==0.11.4',
        'pyOpenssl==16.2.0'
    ]
)
<commit_msg>0.3.2<commit_after>from setuptools import setup

setup(
    name='alexandra',
    version='0.3.2',
    description='Toolkit for writing Amazon Alexa skills as web services',
    author='Erik Price',
    url='https://github.com/erik/alexandra',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Topic :: Home Automation',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
        'Topic :: Software Development :: Libraries :: Application Frameworks',
    ],
    packages=['alexandra'],
    license='ISC',
    test_requires=['tox'],
    install_requires=[
        'Werkzeug==0.11.4',
        'pyOpenssl==16.2.0'
    ]
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(
        name = "Pycco",
        version = "0.2.0",
        description = """A Python port of Docco: the original quick-and-dirty,
        hundred-line-long, literate-programming-style documentation generator.
        """,
        author = "Nick Fitzgerald",
        author_email = "fitzgen@gmail.com",
        url = "http://fitzgen.github.com/pycco",
        packages = find_packages(),
        entry_points = {
            'console_scripts': [
                'pycco = pycco.main:main',
                ]
            },
        install_requires = ['markdown', 'pygments', 'pystache', 'smartypants'],
        extras_require = {'monitoring': 'watchdog'},
        )
<commit_msg>Bump version number (now 0.3.0)<commit_after>from setuptools import setup, find_packages

setup(
        name = "Pycco",
        version = "0.3.0",
        description = """A Python port of Docco: the original quick-and-dirty,
        hundred-line-long, literate-programming-style documentation generator.
        """,
        author = "Nick Fitzgerald",
        author_email = "fitzgen@gmail.com",
        url = "http://fitzgen.github.com/pycco",
        packages = find_packages(),
        entry_points = {
            'console_scripts': [
                'pycco = pycco.main:main',
                ]
            },
        install_requires = ['markdown', 'pygments', 'pystache', 'smartypants'],
        extras_require = {'monitoring': 'watchdog'},
        )
<|endoftext|>


<commit_before>#  Copyright (c) 2015 SONATA-NFV, UBIWHERE
# ALL RIGHTS RESERVED.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Neither the name of the SONATA-NFV, UBIWHERE
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# This work has been performed in the framework of the SONATA project,
# funded by the European Commission under Grant number 671517 through
# the Horizon 2020 and 5G-PPP programmes. The authors would like to
# acknowledge the contributions of their colleagues of the SONATA
# partner consortium (www.sonata-nfv.eu).

from setuptools import setup, find_packages
import codecs
import os.path as path

# buildout build system
# http://www.buildout.org/en/latest/docs/tutorial.html

# setup() documentation:
# http://python-packaging-user-guide.readthedocs.org/en/
# latest/distributing/#setup-py

cwd = path.dirname(__file__)
longdesc = codecs.open(path.join(cwd, 'README.md'), 'r', 'utf-8').read()

name = 'sonata-cli'
setup(
        name=name,
        license='Apache License, Version 2.0',
        version='0.9',
        url='https://github.com/sonata-nfv/son-cli',
        author_email='sonata-dev@sonata-nfv.eu',
        long_description=longdesc,
        package_dir={'': 'src'},
        packages=find_packages('src'),  # dependency resolution
        namespace_packages=['son', ],
        include_package_data=True,
        package_data= {
            'son': ['schema/tests/son-schema/*', 'workspace/samples/*',
                    'monitor/docker_compose_files/*', 'monitor/grafana/*',
                    'monitor/prometheus/*', 'monitor/*.exp']
        },
        # in jenkins, the last package in the list is installed first
        install_requires=['setuptools', 'pyaml', 'jsonschema', 'validators',
                          'requests>2.4.2', 'coloredlogs<=5.1.1', 'paramiko',
                          'termcolor', 'tabulate', 'networkx', 'PyJWT',
                          'Flask', 'docker==2.0.2', 'scipy', 'numpy'],
        zip_safe=False,
        entry_points={
            'console_scripts': [
                'son-workspace=son.workspace.workspace:main',
                'son-package=son.package.package:main',
                'son-monitor=son.monitor.monitor:main',
                'son-profile=son.profile.profile:main',
                'son-validate=son.validate.validate:main',
                'son-access=son.access.access:main'
            ],
        },
        test_suite='son',
        setup_requires=['pytest-runner'],
        tests_require=['pytest']
    )
<commit_msg>Updated setup.py<commit_after>#  Copyright (c) 2015 SONATA-NFV, UBIWHERE
# ALL RIGHTS RESERVED.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Neither the name of the SONATA-NFV, UBIWHERE
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# This work has been performed in the framework of the SONATA project,
# funded by the European Commission under Grant number 671517 through
# the Horizon 2020 and 5G-PPP programmes. The authors would like to
# acknowledge the contributions of their colleagues of the SONATA
# partner consortium (www.sonata-nfv.eu).

from setuptools import setup, find_packages
import codecs
import os.path as path

# buildout build system
# http://www.buildout.org/en/latest/docs/tutorial.html

# setup() documentation:
# http://python-packaging-user-guide.readthedocs.org/en/
# latest/distributing/#setup-py

cwd = path.dirname(__file__)
longdesc = codecs.open(path.join(cwd, 'README.md'), 'r', 'utf-8').read()

name = 'sonata-cli'
setup(
        name=name,
        license='Apache License, Version 2.0',
        version='0.9',
        url='https://github.com/sonata-nfv/son-cli',
        author_email='sonata-dev@sonata-nfv.eu',
        long_description=longdesc,
        package_dir={'': 'src'},
        packages=find_packages('src'),  # dependency resolution
        namespace_packages=['son', ],
        include_package_data=True,
        package_data= {
            'son': ['schema/tests/son-schema/*', 'workspace/samples/*',
                    'monitor/docker_compose_files/*', 'monitor/grafana/*',
                    'monitor/prometheus/*', 'monitor/*.exp']
        },
        # in jenkins, the last package in the list is installed first
        install_requires=['setuptools', 'pyaml', 'jsonschema', 'validators',
                          'requests>2.4.2', 'coloredlogs<=5.1.1', 'paramiko',
                          'termcolor', 'tabulate', 'networkx', 'PyJWT',
                          'Flask', 'docker==2.0.2', 'scipy', 'numpy', 'Crypto'],
        zip_safe=False,
        entry_points={
            'console_scripts': [
                'son-workspace=son.workspace.workspace:main',
                'son-package=son.package.package:main',
                'son-monitor=son.monitor.monitor:main',
                'son-profile=son.profile.profile:main',
                'son-validate=son.validate.validate:main',
                'son-access=son.access.access:main'
            ],
        },
        test_suite='son',
        setup_requires=['pytest-runner'],
        tests_require=['pytest']
    )
<|endoftext|>


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

from imp import load_source
from distutils.core import setup

core = load_source("core", "w1thermsensor/__init__.py")

setup(
    name="w1thermsensor",
    version=core.__version__,
    license="MIT",
    description="This little pure python module provides a single class to get the temperature of a w1 sensor",
    author=core.__author__,
    author_email=core.__email__,
    maintainer=core.__author__,
    maintainer_email=core.__email__,
    platforms=["Linux"],
    url="http://github.com/timofurrer/w1thermsensor",
    download_url="http://github.com/timofurrer/w1thermsensor",
    packages=["w1thermsensor"]
)
<commit_msg>change version in setup.py to GPLv2<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

from imp import load_source
from distutils.core import setup

core = load_source("core", "w1thermsensor/__init__.py")

setup(
    name="w1thermsensor",
    version=core.__version__,
    license="GPLv2",
    description="This little pure python module provides a single class to get the temperature of a w1 sensor",
    author=core.__author__,
    author_email=core.__email__,
    maintainer=core.__author__,
    maintainer_email=core.__email__,
    platforms=["Linux"],
    url="http://github.com/timofurrer/w1thermsensor",
    download_url="http://github.com/timofurrer/w1thermsensor",
    packages=["w1thermsensor"]
)
<|endoftext|>


<commit_before>from datetime import datetime
from distutils.core import setup
import os
import subprocess

if os.path.exists("MANIFEST"):
    os.unlink("MANIFEST")

VERSION = ("11", "09", "0", "alpha", "1", "alpha", "0")

setup(
    name='armstrong',
    version=".".join(VERSION),
    description="Armstrong is an open-source publishing system designed for news organizations that gives your team the technology edge it needs to report in a media-rich environment.",
    long_description=open("README.rst").read(),
    author='Bay Citizen & Texas Tribune',
    author_email='dev@armstrongcms.org',
    url='http://github.com/armstrong/armstrong/',
    packages=["armstrong", ],
    namespace_packages=["armstrong", ],
    install_requires=[
        "armstrong.cli>=0.5.0",
        "armstrong.core.arm_content>=0.5.0",
        "armstrong.core.arm_layout>=0.1.0",
        "armstrong.core.arm_sections>=0.2.1",
        "armstrong.core.arm_wells>=0.3.0",
        "armstrong.apps.articles>=0.4.0",
        "armstrong.apps.content>=0.1.0",
        "armstrong.apps.events>=0.1.2,<0.2",
        "armstrong.hatband>=0.3.1",
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
    ],
)

<commit_msg>v11.09.0.alpha.1<commit_after>from datetime import datetime
from distutils.core import setup
import os
import subprocess

if os.path.exists("MANIFEST"):
    os.unlink("MANIFEST")

VERSION = ("11", "09", "0", "alpha", "1")

setup(
    name='armstrong',
    version=".".join(VERSION),
    description="Armstrong is an open-source publishing system designed for news organizations that gives your team the technology edge it needs to report in a media-rich environment.",
    long_description=open("README.rst").read(),
    author='Bay Citizen & Texas Tribune',
    author_email='dev@armstrongcms.org',
    url='http://github.com/armstrong/armstrong/',
    packages=["armstrong", ],
    namespace_packages=["armstrong", ],
    install_requires=[
        "armstrong.cli>=0.5.0",
        "armstrong.core.arm_content>=0.5.0",
        "armstrong.core.arm_layout>=0.1.0",
        "armstrong.core.arm_sections>=0.2.1",
        "armstrong.core.arm_wells>=0.3.0",
        "armstrong.apps.articles>=0.4.0",
        "armstrong.apps.content>=0.1.0",
        "armstrong.apps.events>=0.1.2,<0.2",
        "armstrong.hatband>=0.3.1",
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
    ],
)

<|endoftext|>


<commit_before>#
#  This is the pyenchant setuptools script.
#  Originally developed by Ryan Kelly, 2004.
#
#  This script is placed in the public domain.
#

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

from distutils.archive_util import make_archive

import sys
import os
import shutil
import errno

setup_kwds = {}
if sys.version_info > (3,):
    setup_kwds["use_2to3"] = True

# Location of the prebuilt binaries, if available
if sys.platform == "win32":
    BINDEPS = ".\\tools\\pyenchant-bdist-win32-sources\\build"
    DYLIB_EXT = ".dll"
elif sys.platform == "darwin":
    BINDEPS = "./tools/pyenchant-bdist-osx-sources/build"
    DYLIB_EXT = ".dylib"

# Package MetaData
NAME = "pyenchant"
DESCRIPTION = "Python bindings for the Enchant spellchecking system"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL = "http://packages.python.org/pyenchant/"
LICENSE = "LGPL"
KEYWORDS = "spelling spellcheck enchant"
CLASSIFIERS = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 3",
    "Topic :: Software Development :: Libraries",
    "Topic :: Text Processing :: Linguistic",
]

#  Module Lists
PACKAGES = find_packages()
EXT_MODULES = []
PKG_DATA = {}
EAGER_RES = []

#
# Helper functions for packaging dynamic libs on OSX.
#

def osx_make_lib_relocatable(libpath,bundle_dir=None):
    """Make an OSX dynamic lib re-locatable by changing dep paths.

    This function adjusts the path information stored in the given dynamic
    library, so that is can be bundled into a directory and restributed.
    It returns a list of any dependencies that must also be included in the
    bundle directory.
    """
    if sys.platform != "darwin":
        raise RuntimeError("only works on osx")
    import subprocess
    import shutil
    def do(*cmd):
        subprocess.Popen(cmd).wait()
    def bt(*cmd):
        return subprocess.Popen(cmd,stdout=subprocess.PIPE).stdout.read()
    (dirnm,nm) = os.path.split(libpath)
    if bundle_dir is None:
        bundle_dir = dirnm
    #  Fix the installed name of the lib to be relative to rpath.
    if libpath.endswith(".dylib"):
        do("install_name_tool","-id","@loader_path/"+nm,libpath)
    #  Fix references to any non-core dependencies, and add them to the list
    #  so they will be copied and fixed-up in turn.
    deps = []
    deplines = bt("otool","-L",libpath).split("\n")
    if libpath.endswith(".dylib"):
        deplines = deplines[2:]
    else:
        deplines = deplines[1:]
    for dep in deplines:
        dep = dep.strip()
        if not dep:
            continue
        dep = dep.split()[0]
        if dep.startswith("/System/"):
            continue
        if dep.startswith("/usr/") and not dep.startswith("/usr/local"):
            continue
        depnm = os.path.basename(dep)
        numdirs = len(dirnm[len(bundle_dir):].split("/")) - 1
        loadpath = "@loader_path/" + ("../"*numdirs) + depnm
        do("install_name_tool","-change",dep,loadpath,libpath)
        deps.append(dep)
    return deps

def osx_bundle_lib(libpath):
    """Bundle dependencies into the same directory as the given library."""
    if sys.platform != "darwin":
        raise RuntimeError("only works on osx")
    bundle_dir = os.path.dirname(libpath)
    # Remove any old libraries from  previous build.
    for nm in os.listdir(bundle_dir):
        oldpath = os.path.join(bundle_dir,nm)
        if oldpath != libpath and os.path.isfile(oldpath):
            os.unlink(oldpath)
    # Copy in and relocate all its dependencies, and theirs, and so-on.
    todo = osx_make_lib_relocatable(libpath,bundle_dir)
    for deppath in todo:
        print "MAKING RELOCATABLE:", deppath
        depnm = os.path.basename(deppath)
        bdeppath = os.path.join(bundle_dir,depnm)
        if not os.path.exists(bdeppath):
            shutil.copyfile(deppath,bdeppath)
            todo.extend(osx_make_lib_relocatable(bdeppath,bundle_dir))

#
# Build and distribution information is different on Windows and OSX.
#
# There's the possibility of including pre-built support DLLs
# for the Windows installer.  They will be included if the directory
# <WINDEPS> exists when this script is run.  They are copied into
# the package directory so setuptools can locate them.
#
if sys.platform in ("win32","darwin",):
  try:
    PKG_DATA["enchant"] = ["*"+DYLIB_EXT,"lib/*"+DYLIB_EXT,
                           "lib/enchant/*"+DYLIB_EXT,
                           "lib/enchant/*.so",
                           "lib/enchant/*.txt",
                           "share/enchant/myspell/*.*",
                           "share/enchant/ispell/*.*"]
    EAGER_RES = ["enchant/lib", "enchant/share"]
    # Copy local DLLs across if available
    if os.path.exists(BINDEPS):
      # Main enchant DLL
      libDir = os.path.join(BINDEPS,"lib")
      for fName in os.listdir(libDir):
        if "enchant" in fName and fName.endswith(DYLIB_EXT):
          print("COPYING: " + fName)
          if sys.platform == "win32":
              libroot = os.path.join(".","enchant")
              EAGER_RES.append("enchant/" + fName)
          else:
              libroot = os.path.join(".","enchant","lib")
              EAGER_RES.append("enchant/lib/" + fName)
          shutil.copy(os.path.join(libDir,fName),libroot)
          break
      # Dependencies.  On win32 we just bundle everything, on OSX we call
      # a helper function that tracks (and re-writes) dependencies
      if sys.platform == "darwin":
          print "DARMIN", fName, libroot
          osx_bundle_lib(os.path.join(libroot,fName))
          for fName in os.listdir(libroot):
              EAGER_RES.append("enchant/lib/" + fName)
      else:
        for fName in os.listdir(libDir):
          if fName.endswith(DYLIB_EXT):
              print("COPYING: " + fName)
              libroot = os.path.join(".","enchant")
              EAGER_RES.append("enchant/" + fName)
              shutil.copy(os.path.join(libDir,fName),libroot)
      # Enchant plugins
      plugDir = os.path.join(BINDEPS,"lib","enchant")
      for fName in os.listdir(plugDir):
        if fName.endswith(DYLIB_EXT) or fName.endswith(".so"):
          print("COPYING: " + fName)
          EAGER_RES.append("enchant/lib/enchant/" + fName)
          fDest = os.path.join(".","enchant","lib","enchant",fName)
          shutil.copy(os.path.join(plugDir,fName),fDest)
          if sys.platform == "darwin":
              osx_make_lib_relocatable(fDest,libroot)
      # Local Dictionaries
      dictPath = os.path.join(BINDEPS,"share","enchant","myspell")
      if os.path.isdir(dictPath):
        for dictName in os.listdir(dictPath):
          if dictName[-3:] in ["txt","dic","aff"]:
            print("COPYING: " + dictName)
            shutil.copy(os.path.join(dictPath,dictName),
			os.path.join(".","enchant","share","enchant","myspell"))
      dictPath = os.path.join(BINDEPS,"share","enchant","ispell")
      if os.path.isdir(dictPath):
        for dictName in os.listdir(dictPath):
          if dictName.endswith("hash") or dictName == "README.txt":
            print("COPYING: " + dictName)
            shutil.copy(os.path.join(dictPath,dictName),
			os.path.join(".","enchant","share","enchant","ispell"))
  except EnvironmentError:
    (_,e,_) = sys.exc_info()
    if e.errno not in (errno.ENOENT,):
        raise
    import traceback
    traceback.print_exc()
    sys.stderr.write("COULD NOT COPY PRE-BUILT DEPENDENCIES\n")

##  Now we can import enchant to get at version info

import enchant
VERSION = enchant.__version__

##
##  Main call to setup() function
##

setup(name=NAME,
      version=VERSION,
      author=AUTHOR,
      author_email=AUTHOR_EMAIL,
      url=URL,
      description=DESCRIPTION,
      license=LICENSE,
      keywords=KEYWORDS,
      classifiers=CLASSIFIERS,
      packages=PACKAGES,
      package_data=PKG_DATA,
      eager_resources=EAGER_RES,
      include_package_data=True,
      test_suite="enchant.tests.buildtestsuite",
     )

dist_dir = os.path.join(os.path.dirname(__file__),"dist")
if os.path.exists(dist_dir):
  for nm in os.listdir(dist_dir):
    #  Rename any eggs to make it clear they're platform-specific.
    #  This isn't done by default because we don't build any extension modules,
    #  but rather bundle our libs as data_files.
    if nm.endswith("py%d.%d.egg" % sys.version_info[:2]):
        if sys.platform == "win32":
            platform = "win32"
        elif sys.platform == "darwin":
            platform = "macosx-10.4-universal"
        else:
            continue
        newname = nm.rsplit(".",1)[0] + "-" + platform + ".egg"
        newpath = os.path.join(dist_dir,newname)
        if os.path.exists(newpath):
            os.unlink(newpath)
        os.rename(os.path.join(dist_dir,nm),newpath)
    #  Rename any mpkgs to give better platform info, and zip them up
    #  for easy uploading to PyPI.
    elif nm.endswith(".mpkg"):
        if sys.platform != "darwin":
            continue
        platform = "macosx-10.4-universal"
        if platform in nm:
            continue
        newname = nm.rsplit("macosx",1)[0] + platform + ".mpkg"
        newpath = os.path.join(dist_dir,newname)
        if os.path.exists(newpath):
            shutil.rmtree(newpath)
        os.rename(os.path.join(dist_dir,nm),newpath)
        if os.path.exists(newpath+".zip"):
            os.unlink(newpath+".zip")
        make_archive(newpath,"zip",dist_dir,newname)
        shutil.rmtree(newpath)

<commit_msg>Fix print statements in setup.py<commit_after>#
#  This is the pyenchant setuptools script.
#  Originally developed by Ryan Kelly, 2004.
#
#  This script is placed in the public domain.
#

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

from distutils.archive_util import make_archive

import sys
import os
import shutil
import errno

setup_kwds = {}
if sys.version_info > (3,):
    setup_kwds["use_2to3"] = True

# Location of the prebuilt binaries, if available
if sys.platform == "win32":
    BINDEPS = ".\\tools\\pyenchant-bdist-win32-sources\\build"
    DYLIB_EXT = ".dll"
elif sys.platform == "darwin":
    BINDEPS = "./tools/pyenchant-bdist-osx-sources/build"
    DYLIB_EXT = ".dylib"

# Package MetaData
NAME = "pyenchant"
DESCRIPTION = "Python bindings for the Enchant spellchecking system"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL = "http://packages.python.org/pyenchant/"
LICENSE = "LGPL"
KEYWORDS = "spelling spellcheck enchant"
CLASSIFIERS = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 3",
    "Topic :: Software Development :: Libraries",
    "Topic :: Text Processing :: Linguistic",
]

#  Module Lists
PACKAGES = find_packages()
EXT_MODULES = []
PKG_DATA = {}
EAGER_RES = []

#
# Helper functions for packaging dynamic libs on OSX.
#

def osx_make_lib_relocatable(libpath,bundle_dir=None):
    """Make an OSX dynamic lib re-locatable by changing dep paths.

    This function adjusts the path information stored in the given dynamic
    library, so that is can be bundled into a directory and restributed.
    It returns a list of any dependencies that must also be included in the
    bundle directory.
    """
    if sys.platform != "darwin":
        raise RuntimeError("only works on osx")
    import subprocess
    import shutil
    def do(*cmd):
        subprocess.Popen(cmd).wait()
    def bt(*cmd):
        return subprocess.Popen(cmd,stdout=subprocess.PIPE).stdout.read()
    (dirnm,nm) = os.path.split(libpath)
    if bundle_dir is None:
        bundle_dir = dirnm
    #  Fix the installed name of the lib to be relative to rpath.
    if libpath.endswith(".dylib"):
        do("install_name_tool","-id","@loader_path/"+nm,libpath)
    #  Fix references to any non-core dependencies, and add them to the list
    #  so they will be copied and fixed-up in turn.
    deps = []
    deplines = bt("otool","-L",libpath).split("\n")
    if libpath.endswith(".dylib"):
        deplines = deplines[2:]
    else:
        deplines = deplines[1:]
    for dep in deplines:
        dep = dep.strip()
        if not dep:
            continue
        dep = dep.split()[0]
        if dep.startswith("/System/"):
            continue
        if dep.startswith("/usr/") and not dep.startswith("/usr/local"):
            continue
        depnm = os.path.basename(dep)
        numdirs = len(dirnm[len(bundle_dir):].split("/")) - 1
        loadpath = "@loader_path/" + ("../"*numdirs) + depnm
        do("install_name_tool","-change",dep,loadpath,libpath)
        deps.append(dep)
    return deps

def osx_bundle_lib(libpath):
    """Bundle dependencies into the same directory as the given library."""
    if sys.platform != "darwin":
        raise RuntimeError("only works on osx")
    bundle_dir = os.path.dirname(libpath)
    # Remove any old libraries from  previous build.
    for nm in os.listdir(bundle_dir):
        oldpath = os.path.join(bundle_dir,nm)
        if oldpath != libpath and os.path.isfile(oldpath):
            os.unlink(oldpath)
    # Copy in and relocate all its dependencies, and theirs, and so-on.
    todo = osx_make_lib_relocatable(libpath,bundle_dir)
    for deppath in todo:
        print("MAKING RELOCATABLE: " + deppath)
        depnm = os.path.basename(deppath)
        bdeppath = os.path.join(bundle_dir,depnm)
        if not os.path.exists(bdeppath):
            shutil.copyfile(deppath,bdeppath)
            todo.extend(osx_make_lib_relocatable(bdeppath,bundle_dir))

#
# Build and distribution information is different on Windows and OSX.
#
# There's the possibility of including pre-built support DLLs
# for the Windows installer.  They will be included if the directory
# <WINDEPS> exists when this script is run.  They are copied into
# the package directory so setuptools can locate them.
#
if sys.platform in ("win32","darwin",):
  try:
    PKG_DATA["enchant"] = ["*"+DYLIB_EXT,"lib/*"+DYLIB_EXT,
                           "lib/enchant/*"+DYLIB_EXT,
                           "lib/enchant/*.so",
                           "lib/enchant/*.txt",
                           "share/enchant/myspell/*.*",
                           "share/enchant/ispell/*.*"]
    EAGER_RES = ["enchant/lib", "enchant/share"]
    # Copy local DLLs across if available
    if os.path.exists(BINDEPS):
      # Main enchant DLL
      libDir = os.path.join(BINDEPS,"lib")
      for fName in os.listdir(libDir):
        if "enchant" in fName and fName.endswith(DYLIB_EXT):
          print("COPYING: " + fName)
          if sys.platform == "win32":
              libroot = os.path.join(".","enchant")
              EAGER_RES.append("enchant/" + fName)
          else:
              libroot = os.path.join(".","enchant","lib")
              EAGER_RES.append("enchant/lib/" + fName)
          shutil.copy(os.path.join(libDir,fName),libroot)
          break
      # Dependencies.  On win32 we just bundle everything, on OSX we call
      # a helper function that tracks (and re-writes) dependencies
      if sys.platform == "darwin":
          osx_bundle_lib(os.path.join(libroot,fName))
          for fName in os.listdir(libroot):
              EAGER_RES.append("enchant/lib/" + fName)
      else:
        for fName in os.listdir(libDir):
          if fName.endswith(DYLIB_EXT):
              print("COPYING: " + fName)
              libroot = os.path.join(".","enchant")
              EAGER_RES.append("enchant/" + fName)
              shutil.copy(os.path.join(libDir,fName),libroot)
      # Enchant plugins
      plugDir = os.path.join(BINDEPS,"lib","enchant")
      for fName in os.listdir(plugDir):
        if fName.endswith(DYLIB_EXT) or fName.endswith(".so"):
          print("COPYING: " + fName)
          EAGER_RES.append("enchant/lib/enchant/" + fName)
          fDest = os.path.join(".","enchant","lib","enchant",fName)
          shutil.copy(os.path.join(plugDir,fName),fDest)
          if sys.platform == "darwin":
              osx_make_lib_relocatable(fDest,libroot)
      # Local Dictionaries
      dictPath = os.path.join(BINDEPS,"share","enchant","myspell")
      if os.path.isdir(dictPath):
        for dictName in os.listdir(dictPath):
          if dictName[-3:] in ["txt","dic","aff"]:
            print("COPYING: " + dictName)
            shutil.copy(os.path.join(dictPath,dictName),
			os.path.join(".","enchant","share","enchant","myspell"))
      dictPath = os.path.join(BINDEPS,"share","enchant","ispell")
      if os.path.isdir(dictPath):
        for dictName in os.listdir(dictPath):
          if dictName.endswith("hash") or dictName == "README.txt":
            print("COPYING: " + dictName)
            shutil.copy(os.path.join(dictPath,dictName),
			os.path.join(".","enchant","share","enchant","ispell"))
  except EnvironmentError:
    (_,e,_) = sys.exc_info()
    if e.errno not in (errno.ENOENT,):
        raise
    import traceback
    traceback.print_exc()
    sys.stderr.write("COULD NOT COPY PRE-BUILT DEPENDENCIES\n")

##  Now we can import enchant to get at version info

import enchant
VERSION = enchant.__version__

##
##  Main call to setup() function
##

setup(name=NAME,
      version=VERSION,
      author=AUTHOR,
      author_email=AUTHOR_EMAIL,
      url=URL,
      description=DESCRIPTION,
      license=LICENSE,
      keywords=KEYWORDS,
      classifiers=CLASSIFIERS,
      packages=PACKAGES,
      package_data=PKG_DATA,
      eager_resources=EAGER_RES,
      include_package_data=True,
      test_suite="enchant.tests.buildtestsuite",
     )

dist_dir = os.path.join(os.path.dirname(__file__),"dist")
if os.path.exists(dist_dir):
  for nm in os.listdir(dist_dir):
    #  Rename any eggs to make it clear they're platform-specific.
    #  This isn't done by default because we don't build any extension modules,
    #  but rather bundle our libs as data_files.
    if nm.endswith("py%d.%d.egg" % sys.version_info[:2]):
        if sys.platform == "win32":
            platform = "win32"
        elif sys.platform == "darwin":
            platform = "macosx-10.4-universal"
        else:
            continue
        newname = nm.rsplit(".",1)[0] + "-" + platform + ".egg"
        newpath = os.path.join(dist_dir,newname)
        if os.path.exists(newpath):
            os.unlink(newpath)
        os.rename(os.path.join(dist_dir,nm),newpath)
    #  Rename any mpkgs to give better platform info, and zip them up
    #  for easy uploading to PyPI.
    elif nm.endswith(".mpkg"):
        if sys.platform != "darwin":
            continue
        platform = "macosx-10.4-universal"
        if platform in nm:
            continue
        newname = nm.rsplit("macosx",1)[0] + platform + ".mpkg"
        newpath = os.path.join(dist_dir,newname)
        if os.path.exists(newpath):
            shutil.rmtree(newpath)
        os.rename(os.path.join(dist_dir,nm),newpath)
        if os.path.exists(newpath+".zip"):
            os.unlink(newpath+".zip")
        make_archive(newpath,"zip",dist_dir,newname)
        shutil.rmtree(newpath)

<|endoftext|>