<commit_before>#!/usr/bin/python

import sys, os, re
from distutils.core import setup
from distutils.extension import Extension
from distutils.errors import *
from os.path import exists, abspath, dirname, join, isdir

OFFICIAL_BUILD = 9999

def main():

    version_str, version = get_version()

    files = [ abspath(join('src', f)) for f in os.listdir('src') if f.endswith('.cpp') ]
    libraries = []

    extra_compile_args = None
    extra_link_args    = None

    if os.name == 'nt':
        # Windows native
        files.append(join('src', 'pyodbc.rc'))
        libraries.append('odbc32')
        extra_compile_args = ['/W4']

        # extra_compile_args = ['/W4', '/Zi', '/Od']
        # extra_link_args    = ['/DEBUG']

    elif os.environ.get("OS", '').lower().startswith('windows'):
        # Windows Cygwin (posix on windows)
        # OS name not windows, but still on Windows
        libraries.append('odbc32')

    elif sys.platform == 'darwin':
        # OS/X now ships with iODBC.
        libraries.append('iodbc')

    else:
        # Other posix-like: Linux, Solaris, etc.

        # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
        extra_compile_args = ['-Wno-write-strings']

        # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
        libraries.append('odbc')

    macros = [('PYODBC_%s' % name, value) for name,value in zip(['MAJOR', 'MINOR', 'MICRO', 'BUILD'], version)]

    # This isn't the best or right way to do this, but I don't see how someone is supposed to sanely subclass the build
    # command.
    try:
        sys.argv.remove('--assert')
        macros.append(('PYODBC_ASSERT', 1))
    except ValueError:
        pass

    try:
        sys.argv.remove('--trace')
        macros.append(('TRACE_ALL', 1))
    except ValueError:
        pass

    if exists('MANIFEST'):
        os.remove('MANIFEST')

    setup (name = "pyodbc",
           version = version_str,
           description = "DB API Module for ODBC",

           long_description = ('A Python DB API 2 module for ODBC. This project provides an up-to-date, '
                               'convenient interface to ODBC using native data types like datetime and decimal.'),

           maintainer       = "Michael Kleehammer",
           maintainer_email = "michael@kleehammer.com",

           ext_modules = [Extension('pyodbc', files,
                                     libraries=libraries,
                                     define_macros = macros,
                                     extra_compile_args=extra_compile_args,
                                     extra_link_args=extra_link_args
                                     )],

           classifiers = ['Development Status :: 5 - Production/Stable',
                           'Intended Audience :: Developers',
                           'Intended Audience :: System Administrators',
                           'License :: OSI Approved :: MIT License',
                           'Operating System :: Microsoft :: Windows',
                           'Operating System :: POSIX',
                           'Programming Language :: Python',
                           'Topic :: Database',
                          ],

           url = 'http://pyodbc.sourceforge.net',
           download_url = 'http://github.com/pyodbc/pyodbc/tree/master')

def get_version():
    """
    Returns the version of the product as (description, [major,minor,micro,beta]).

    If the release is official, `beta` will be 9999 (OFFICIAL_BUILD).

      1. If in a git repository, use the latest tag (git describe).
      2. If in an unzipped source directory (from setup.py sdist),
         read the version from the PKG-INFO file.
      3. Use 2.1.0.0 and complain a lot.
    """
    # My goal is to (1) provide accurate tags for official releases but (2) not have to manage tags for every test
    # release.
    #
    # Official versions are tagged using 3 numbers: major, minor, micro.  A build of a tagged version should produce
    # the version using just these pieces, such as 2.1.4.
    #
    # Unofficial versions are "working towards" the next version.  So the next unofficial build after 2.1.4 would be a
    # beta for 2.1.5.  Using 'git describe' we can find out how many changes have been made after 2.1.4 and we'll use
    # this count as the beta id (beta1, beta2, etc.)
    #
    # Since the 4 numbers are put into the Windows DLL, we want to make sure the beta versions sort *before* the
    # official, so we set the official build number to 9999, but we don't show it.

    name    = None              # branch/feature name.  Should be None for official builds.
    numbers = None              # The 4 integers that make up the version.

    # If this is a source release the version will have already been assigned and be in the PKG-INFO file.

    name, numbers = _get_version_pkginfo()

    # If not a source release, we should be in a git repository.  Look for the latest tag.

    if not numbers:
        name, numbers = _get_version_git()

    if not numbers:
        print 'WARNING: Unable to determine version.  Using 2.1.0.0'
        name, numbers = '2.1.0-unsupported', [2,1,0,0]

    return name, numbers

def _get_version_pkginfo():
    filename = join(dirname(abspath(__file__)), 'PKG-INFO')
    if exists(filename):
        re_ver = re.compile(r'^Version: \s+ (\d+)\.(\d+)\.(\d+) (?: -beta(\d+))?', re.VERBOSE)
        for line in open(filename):
            match = re_ver.search(line)
            if match:
                name    = line.split(':', 1)[1].strip()
                numbers = [int(n or 0) for n in match.groups()]
                return name, numbers

    return None, None

def _get_version_git():
    n, result = getoutput('git describe --tags')
    if n:
        print 'WARNING: git describe failed with: %s %s' % (n, result)
        return None, None

    match = re.match(r'(\d+).(\d+).(\d+) (?: -(\d+)-g[0-9a-z]+)?', result, re.VERBOSE)
    if not match:
        return None, None

    numbers = [int(n or OFFICIAL_BUILD) for n in match.groups()]
    if numbers[-1] == OFFICIAL_BUILD:
        name = '%s.%s.%s' % tuple(numbers[:3])
    if numbers[-1] != OFFICIAL_BUILD:
        # This is a beta of the next micro release, so increment the micro number to reflect this.
        numbers[-2] += 1
        name = '%s.%s.%s-beta%s' % tuple(numbers)
    return name, numbers

def getoutput(cmd):
    pipe = os.popen(cmd, 'r')
    text   = pipe.read().rstrip('\n')
    status = pipe.close() or 0
    return status, text

if __name__ == '__main__':
    main()
<commit_msg>Updated metadata to point to Google code hosting<commit_after>#!/usr/bin/python

import sys, os, re
from distutils.core import setup
from distutils.extension import Extension
from distutils.errors import *
from os.path import exists, abspath, dirname, join, isdir

OFFICIAL_BUILD = 9999

def main():

    version_str, version = get_version()

    files = [ abspath(join('src', f)) for f in os.listdir('src') if f.endswith('.cpp') ]
    libraries = []

    extra_compile_args = None
    extra_link_args    = None

    if os.name == 'nt':
        # Windows native
        files.append(join('src', 'pyodbc.rc'))
        libraries.append('odbc32')
        extra_compile_args = ['/W4']

        # extra_compile_args = ['/W4', '/Zi', '/Od']
        # extra_link_args    = ['/DEBUG']

    elif os.environ.get("OS", '').lower().startswith('windows'):
        # Windows Cygwin (posix on windows)
        # OS name not windows, but still on Windows
        libraries.append('odbc32')

    elif sys.platform == 'darwin':
        # OS/X now ships with iODBC.
        libraries.append('iodbc')

    else:
        # Other posix-like: Linux, Solaris, etc.

        # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
        extra_compile_args = ['-Wno-write-strings']

        # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
        libraries.append('odbc')

    macros = [('PYODBC_%s' % name, value) for name,value in zip(['MAJOR', 'MINOR', 'MICRO', 'BUILD'], version)]

    # This isn't the best or right way to do this, but I don't see how someone is supposed to sanely subclass the build
    # command.
    try:
        sys.argv.remove('--assert')
        macros.append(('PYODBC_ASSERT', 1))
    except ValueError:
        pass

    try:
        sys.argv.remove('--trace')
        macros.append(('TRACE_ALL', 1))
    except ValueError:
        pass

    if exists('MANIFEST'):
        os.remove('MANIFEST')

    setup (name = "pyodbc",
           version = version_str,
           description = "DB API Module for ODBC",

           long_description = ('A Python DB API 2 module for ODBC. This project provides an up-to-date, '
                               'convenient interface to ODBC using native data types like datetime and decimal.'),

           maintainer       = "Michael Kleehammer",
           maintainer_email = "michael@kleehammer.com",

           ext_modules = [Extension('pyodbc', files,
                                     libraries=libraries,
                                     define_macros = macros,
                                     extra_compile_args=extra_compile_args,
                                     extra_link_args=extra_link_args
                                     )],

           classifiers = ['Development Status :: 5 - Production/Stable',
                           'Intended Audience :: Developers',
                           'Intended Audience :: System Administrators',
                           'License :: OSI Approved :: MIT License',
                           'Operating System :: Microsoft :: Windows',
                           'Operating System :: POSIX',
                           'Programming Language :: Python',
                           'Topic :: Database',
                          ],

           url = 'http://code.google.com/p/pyodbc',
           download_url = 'http://github.com/pyodbc/pyodbc/tree/master')

def get_version():
    """
    Returns the version of the product as (description, [major,minor,micro,beta]).

    If the release is official, `beta` will be 9999 (OFFICIAL_BUILD).

      1. If in a git repository, use the latest tag (git describe).
      2. If in an unzipped source directory (from setup.py sdist),
         read the version from the PKG-INFO file.
      3. Use 2.1.0.0 and complain a lot.
    """
    # My goal is to (1) provide accurate tags for official releases but (2) not have to manage tags for every test
    # release.
    #
    # Official versions are tagged using 3 numbers: major, minor, micro.  A build of a tagged version should produce
    # the version using just these pieces, such as 2.1.4.
    #
    # Unofficial versions are "working towards" the next version.  So the next unofficial build after 2.1.4 would be a
    # beta for 2.1.5.  Using 'git describe' we can find out how many changes have been made after 2.1.4 and we'll use
    # this count as the beta id (beta1, beta2, etc.)
    #
    # Since the 4 numbers are put into the Windows DLL, we want to make sure the beta versions sort *before* the
    # official, so we set the official build number to 9999, but we don't show it.

    name    = None              # branch/feature name.  Should be None for official builds.
    numbers = None              # The 4 integers that make up the version.

    # If this is a source release the version will have already been assigned and be in the PKG-INFO file.

    name, numbers = _get_version_pkginfo()

    # If not a source release, we should be in a git repository.  Look for the latest tag.

    if not numbers:
        name, numbers = _get_version_git()

    if not numbers:
        print 'WARNING: Unable to determine version.  Using 2.1.0.0'
        name, numbers = '2.1.0-unsupported', [2,1,0,0]

    return name, numbers

def _get_version_pkginfo():
    filename = join(dirname(abspath(__file__)), 'PKG-INFO')
    if exists(filename):
        re_ver = re.compile(r'^Version: \s+ (\d+)\.(\d+)\.(\d+) (?: -beta(\d+))?', re.VERBOSE)
        for line in open(filename):
            match = re_ver.search(line)
            if match:
                name    = line.split(':', 1)[1].strip()
                numbers = [int(n or 0) for n in match.groups()]
                return name, numbers

    return None, None

def _get_version_git():
    n, result = getoutput('git describe --tags')
    if n:
        print 'WARNING: git describe failed with: %s %s' % (n, result)
        return None, None

    match = re.match(r'(\d+).(\d+).(\d+) (?: -(\d+)-g[0-9a-z]+)?', result, re.VERBOSE)
    if not match:
        return None, None

    numbers = [int(n or OFFICIAL_BUILD) for n in match.groups()]
    if numbers[-1] == OFFICIAL_BUILD:
        name = '%s.%s.%s' % tuple(numbers[:3])
    if numbers[-1] != OFFICIAL_BUILD:
        # This is a beta of the next micro release, so increment the micro number to reflect this.
        numbers[-2] += 1
        name = '%s.%s.%s-beta%s' % tuple(numbers)
    return name, numbers

def getoutput(cmd):
    pipe = os.popen(cmd, 'r')
    text   = pipe.read().rstrip('\n')
    status = pipe.close() or 0
    return status, text

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


<commit_before>import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

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

setup(
    name='django-perimeter',
    version='0.6.2',
    packages=['perimeter', 'perimeter.tests', 'perimeter.management.commands'],
    include_package_data=True,
    license='BSD License',
    description='Site-wide perimeter access control for Django projects.',
    long_description=README,
    url='https://github.com/yunojuno/django-perimeter',
    author='Hugo Rodger-Brown',
    author_email='hugo@yunojuno.com',
    install_requires=[
        'Django>=1.8',
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)
<commit_msg>Bump version to 0.6.3<commit_after>import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()

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

setup(
    name='django-perimeter',
    version='0.6.3',
    packages=['perimeter', 'perimeter.tests', 'perimeter.management.commands'],
    include_package_data=True,
    license='BSD License',
    description='Site-wide perimeter access control for Django projects.',
    long_description=README,
    url='https://github.com/yunojuno/django-perimeter',
    author='Hugo Rodger-Brown',
    author_email='hugo@yunojuno.com',
    install_requires=[
        'Django>=1.8',
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
)
<|endoftext|>


<commit_before>import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()

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

setup(
    name='notacarioca',
    version='0.2.1',
    packages=['notacarioca'],
    include_package_data=True,
    license='Apache 2.0',
    description='NFSe for Rio de Janeiro city.',
    long_description=README,
    url='https://github.com/famoraes/py-notacarioca',
    author='Fabiano Moraes',
    author_email='fabiano.moraes@outlook.com'
)
<commit_msg>Alterada versão<commit_after>import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()

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

setup(
    name='notacarioca',
    version='0.2.2',
    packages=['notacarioca'],
    include_package_data=True,
    license='Apache 2.0',
    description='NFSe for Rio de Janeiro city.',
    long_description=README,
    url='https://github.com/famoraes/py-notacarioca',
    author='Fabiano Moraes',
    author_email='fabiano.moraes@outlook.com'
)
<|endoftext|>


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

from setuptools import find_packages
from setuptools import setup

base_dir = os.path.dirname(__file__)
setup(
    name='elastalert',
    version='0.0.24',
    description='Runs custom filters on Elasticsearch and alerts on matches',
    author='Quentin Long',
    author_email='qlo@yelp.com',
    setup_requires='setuptools',
    license='Copyright 2014 Yelp',
    entry_points={
        'console_scripts': ['elastalert-create-index=elastalert.create_index:main',
                            'elastalert-test-rule=elastalert.test_rule:check_files',
                            'elastalert-rule-from-kibana=elastalert.rule_from_kibana:main']},
    packages=find_packages(),
    install_requires=[
        'elasticsearch',
        'jira==0.32',  # jira.exceptions is missing from later versions
        'argparse',
        'python-dateutil',
        'PyStaticConfiguration',
        'pyyaml',
    ]
)
<commit_msg>Bumped version to 0.0.25<commit_after># -*- coding: utf-8 -*-
import os

from setuptools import find_packages
from setuptools import setup

base_dir = os.path.dirname(__file__)
setup(
    name='elastalert',
    version='0.0.25',
    description='Runs custom filters on Elasticsearch and alerts on matches',
    author='Quentin Long',
    author_email='qlo@yelp.com',
    setup_requires='setuptools',
    license='Copyright 2014 Yelp',
    entry_points={
        'console_scripts': ['elastalert-create-index=elastalert.create_index:main',
                            'elastalert-test-rule=elastalert.test_rule:check_files',
                            'elastalert-rule-from-kibana=elastalert.rule_from_kibana:main']},
    packages=find_packages(),
    install_requires=[
        'elasticsearch',
        'jira==0.32',  # jira.exceptions is missing from later versions
        'argparse',
        'python-dateutil',
        'PyStaticConfiguration',
        'pyyaml',
    ]
)
<|endoftext|>


<commit_before>import re
import os

from setuptools import setup, find_packages

with open(
        os.path.join(
            os.path.abspath(os.path.dirname(__file__)),
            'aiocache/_version.py')) as fp:
    try:
        version = re.findall(
            r"^__version__ = '([^']+)'\r?$", fp.read(), re.M)[0]
    except IndexError:
        raise RuntimeError('Unable to determine version.')

setup(
    name='aiocache',
    version=version,
    author='Manuel Miranda',
    url='https://github.com/argaen/aiocache',
    author_email='manu.mirandad@gmail.com',
    description='multi backend asyncio cache',
    classifiers=[
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Framework :: AsyncIO',
    ],
    packages=find_packages(),
    install_requires=None,
    extras_require={
        'redis': ['aioredis>=0.3.3'],
        'memcached': ['aiomcache>=0.5.2'],
        'msgpack': ['msgpack'],
        'dev': [
            'flake8',
            'pytest',
            'pytest-asyncio',
            'pytest-mock',
            'codecov',
            'marshmallow',
            'asynctest>=0.11.0',

            'sphinx',
            'sphinx-autobuild',
            'sphinx-rtd-theme',
            'pystache',
            'ipdb',
        ]
    }
)
<commit_msg>Add README to setup<commit_after>import re
import os

from setuptools import setup, find_packages

with open(
        os.path.join(
            os.path.abspath(os.path.dirname(__file__)),
            'aiocache/_version.py')) as fp:
    try:
        version = re.findall(
            r"^__version__ = '([^']+)'\r?$", fp.read(), re.M)[0]
    except IndexError:
        raise RuntimeError('Unable to determine version.')

with open('README.rst', 'rt', encoding='utf8') as f:
    readme = f.read()

setup(
    name='aiocache',
    version=version,
    author='Manuel Miranda',
    url='https://github.com/argaen/aiocache',
    author_email='manu.mirandad@gmail.com',
    description='multi backend asyncio cache',
    long_description=readme,
    classifiers=[
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Framework :: AsyncIO',
    ],
    packages=find_packages(),
    install_requires=None,
    extras_require={
        'redis': ['aioredis>=0.3.3'],
        'memcached': ['aiomcache>=0.5.2'],
        'msgpack': ['msgpack'],
        'dev': [
            'flake8',
            'pytest',
            'pytest-asyncio',
            'pytest-mock',
            'codecov',
            'marshmallow',
            'asynctest>=0.11.0',

            'sphinx',
            'sphinx-autobuild',
            'sphinx-rtd-theme',
            'pystache',
            'ipdb',
        ]
    }
)
<|endoftext|>


<commit_before>from setuptools import Extension, find_packages, setup
import pathlib

here = pathlib.Path(__file__).parent.resolve()

with open(here.joinpath('README.rst')) as fd:
    long_description = fd.read()

setup(
    name='streaming-form-data',
    version='1.7.0',
    description='Streaming parser for multipart/form-data',
    long_description=long_description,
    packages=find_packages(),
    ext_modules=[
        Extension(
            'streaming_form_data._parser', ['streaming_form_data/_parser.c'],
        )
    ],
    url='https://github.com/siddhantgoel/streaming-form-data',
    author='Siddhant Goel',
    author_email='me@sgoel.dev',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Browsers',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
        'Programming Language :: Cython',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3 :: Only',
    ],
    keywords='form-data, forms, http, multipart, web',
    python_requires='>=3.6',
)
<commit_msg>include long_description_content_type in setup.py<commit_after>from setuptools import Extension, find_packages, setup
import pathlib

here = pathlib.Path(__file__).parent.resolve()

with open(here.joinpath('README.rst')) as fd:
    long_description = fd.read()

setup(
    name='streaming-form-data',
    version='1.7.0',
    description='Streaming parser for multipart/form-data',
    long_description=long_description,
    long_description_content_type='text/x-rst',
    packages=find_packages(),
    ext_modules=[
        Extension(
            'streaming_form_data._parser', ['streaming_form_data/_parser.c'],
        )
    ],
    url='https://github.com/siddhantgoel/streaming-form-data',
    author='Siddhant Goel',
    author_email='me@sgoel.dev',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Browsers',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
        'Programming Language :: Cython',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3 :: Only',
    ],
    keywords='form-data, forms, http, multipart, web',
    python_requires='>=3.6',
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""NumPy: array processing for numbers, strings, records, and objects.

NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type which also makes NumPy suitable for
interfacing with general-purpose data-base applications.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
"""

DOCLINES = __doc__.split("\n")

import os
import shutil
import sys
import re
import subprocess

if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved
Programming Language :: C
Programming Language :: Python
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
"""

NAME                = 'numpy'
MAINTAINER          = "NumPy Developers"
MAINTAINER_EMAIL    = "numpy-discussion@scipy.org"
DESCRIPTION         = DOCLINES[0]
LONG_DESCRIPTION    = "\n".join(DOCLINES[2:])
URL                 = "http://numpy.scipy.org"
DOWNLOAD_URL        = "http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103"
LICENSE             = 'BSD'
CLASSIFIERS         = filter(None, CLASSIFIERS.split('\n'))
AUTHOR              = "Travis E. Oliphant, et.al."
AUTHOR_EMAIL        = "oliphant@enthought.com"
PLATFORMS           = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"]
MAJOR               = 1
MINOR               = 5
MICRO               = 0
ISRELEASED          = False
VERSION             = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

# Return the svn version as a string, raise a ValueError otherwise
def svn_version():
    def _minimal_ext_cmd(cmd):
        # construct minimal environment
        env = {}
        for k in ['SYSTEMROOT', 'PATH']:
            v = os.environ.get(k)
            if v is not None:
                env[k] = v
        # LANGUAGE is used on win32
        env['LANGUAGE'] = 'C'
        env['LANG'] = 'C'
        env['LC_ALL'] = 'C'
        out = subprocess.Popen(cmd, stdout = subprocess.PIPE, env=env).communicate()[0]
        return out

    try:
        out = _minimal_ext_cmd(['svn', 'info'])
    except OSError:
        print(" --- Could not run svn info --- ")
        return ""

    r = re.compile('Revision: ([0-9]+)')
    svnver = ""
    for line in out.split('\n'):
        m = r.match(line.strip())
        if m:
            svnver = m.group(1)

    if not svnver:
        print("Error while parsing svn version")

    return svnver

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'): os.remove('MANIFEST')

# This is a bit hackish: we are setting a global variable so that the main
# numpy __init__ can detect if it is being loaded by the setup routine, to
# avoid attempting to load components that aren't built yet.  While ugly, it's
# a lot more robust than what was previously being used.
builtins.__NUMPY_SETUP__ = True

FULLVERSION = VERSION
if not ISRELEASED:
    FULLVERSION += '.dev'
    # If in git or something, bypass the svn rev
    if os.path.exists('.svn'):
        FULLVERSION += svn_version()

def write_version_py(filename='numpy/version.py'):
    cnt = """
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY
short_version='%(version)s'
version='%(version)s'
release=%(isrelease)s

if not release:
    version += '.dev'
    import os
    svn_version_file = os.path.join(os.path.dirname(__file__),
                                   'core','__svn_version__.py')
    if os.path.isfile(svn_version_file):
        import imp
        svn = imp.load_module('numpy.core.__svn_version__',
                              open(svn_version_file),
                              svn_version_file,
                              ('.py','U',1))
        version += svn.version
"""
    a = open(filename, 'w')
    try:
        a.write(cnt % {'version': VERSION, 'isrelease': str(ISRELEASED)})
    finally:
        a.close()

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration(None, parent_package, top_path)
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    config.add_subpackage('numpy')

    config.add_data_files(('numpy','*.txt'),
                          ('numpy','COMPATIBILITY'),
                          ('numpy','site.cfg.example'))

    config.get_version('numpy/version.py') # sets config.version

    return config

def setup_package():

    # Rewrite the version file everytime
    if os.path.exists('numpy/version.py'): os.remove('numpy/version.py')
    write_version_py()

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return

if __name__ == '__main__':
    setup_package()
<commit_msg>3K: fix setup.py:svn_version to work on Py3<commit_after>#!/usr/bin/env python
"""NumPy: array processing for numbers, strings, records, and objects.

NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type which also makes NumPy suitable for
interfacing with general-purpose data-base applications.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
"""

DOCLINES = __doc__.split("\n")

import os
import shutil
import sys
import re
import subprocess

if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved
Programming Language :: C
Programming Language :: Python
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
"""

NAME                = 'numpy'
MAINTAINER          = "NumPy Developers"
MAINTAINER_EMAIL    = "numpy-discussion@scipy.org"
DESCRIPTION         = DOCLINES[0]
LONG_DESCRIPTION    = "\n".join(DOCLINES[2:])
URL                 = "http://numpy.scipy.org"
DOWNLOAD_URL        = "http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103"
LICENSE             = 'BSD'
CLASSIFIERS         = filter(None, CLASSIFIERS.split('\n'))
AUTHOR              = "Travis E. Oliphant, et.al."
AUTHOR_EMAIL        = "oliphant@enthought.com"
PLATFORMS           = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"]
MAJOR               = 1
MINOR               = 5
MICRO               = 0
ISRELEASED          = False
VERSION             = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

# Return the svn version as a string, raise a ValueError otherwise
def svn_version():
    def _minimal_ext_cmd(cmd):
        # construct minimal environment
        env = {}
        for k in ['SYSTEMROOT', 'PATH']:
            v = os.environ.get(k)
            if v is not None:
                env[k] = v
        # LANGUAGE is used on win32
        env['LANGUAGE'] = 'C'
        env['LANG'] = 'C'
        env['LC_ALL'] = 'C'
        out = subprocess.Popen(cmd, stdout = subprocess.PIPE, env=env).communicate()[0]
        return out

    try:
        out = _minimal_ext_cmd(['svn', 'info'])
    except OSError:
        print(" --- Could not run svn info --- ")
        return ""

    r = re.compile('Revision: ([0-9]+)')
    svnver = ""

    for line in out.split('\n'.encode()):
        m = r.match(line.strip())
        if m:
            svnver = m.group(1)

    if not svnver:
        print("Error while parsing svn version")

    return svnver

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'): os.remove('MANIFEST')

# This is a bit hackish: we are setting a global variable so that the main
# numpy __init__ can detect if it is being loaded by the setup routine, to
# avoid attempting to load components that aren't built yet.  While ugly, it's
# a lot more robust than what was previously being used.
builtins.__NUMPY_SETUP__ = True

FULLVERSION = VERSION
if not ISRELEASED:
    FULLVERSION += '.dev'
    # If in git or something, bypass the svn rev
    if os.path.exists('.svn'):
        FULLVERSION += svn_version()

def write_version_py(filename='numpy/version.py'):
    cnt = """
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY
short_version='%(version)s'
version='%(version)s'
release=%(isrelease)s

if not release:
    version += '.dev'
    import os
    svn_version_file = os.path.join(os.path.dirname(__file__),
                                   'core','__svn_version__.py')
    if os.path.isfile(svn_version_file):
        import imp
        svn = imp.load_module('numpy.core.__svn_version__',
                              open(svn_version_file),
                              svn_version_file,
                              ('.py','U',1))
        version += svn.version
"""
    a = open(filename, 'w')
    try:
        a.write(cnt % {'version': VERSION, 'isrelease': str(ISRELEASED)})
    finally:
        a.close()

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration(None, parent_package, top_path)
    config.set_options(ignore_setup_xxx_py=True,
                       assume_default_configuration=True,
                       delegate_options_to_subpackages=True,
                       quiet=True)

    config.add_subpackage('numpy')

    config.add_data_files(('numpy','*.txt'),
                          ('numpy','COMPATIBILITY'),
                          ('numpy','site.cfg.example'))

    config.get_version('numpy/version.py') # sets config.version

    return config

def setup_package():

    # Rewrite the version file everytime
    if os.path.exists('numpy/version.py'): os.remove('numpy/version.py')
    write_version_py()

    # Perform 2to3 if needed
    local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    src_path = local_path

    if sys.version_info[0] == 3:
        src_path = os.path.join(local_path, 'build', 'py3k')
        sys.path.insert(0, os.path.join(local_path, 'tools'))
        import py3tool
        print("Converting to Python3 via 2to3...")
        py3tool.sync_2to3('numpy', os.path.join(src_path, 'numpy'))

        site_cfg = os.path.join(local_path, 'site.cfg')
        if os.path.isfile(site_cfg):
            shutil.copy(site_cfg, src_path)

    # Run build
    old_path = os.getcwd()
    os.chdir(src_path)
    sys.path.insert(0, src_path)

    from numpy.distutils.core import setup

    try:
        setup(
            name=NAME,
            maintainer=MAINTAINER,
            maintainer_email=MAINTAINER_EMAIL,
            description=DESCRIPTION,
            long_description=LONG_DESCRIPTION,
            url=URL,
            download_url=DOWNLOAD_URL,
            license=LICENSE,
            classifiers=CLASSIFIERS,
            author=AUTHOR,
            author_email=AUTHOR_EMAIL,
            platforms=PLATFORMS,
            configuration=configuration )
    finally:
        del sys.path[0]
        os.chdir(old_path)
    return

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


<commit_before>from setuptools import setup

setup(
        name = "iron-mq-v3",
        py_modules = ["iron_mq"],
        install_requires = ["iron_core"],
        version = "0.7",
        description = "Client library for IronMQ, a message queue in the cloud",
        author = "Iron.io",
        author_email = "thirdparty@iron.io",
        url = "https://github.com/iron-io/iron_mq_python",
        keywords = ["Iron.io", "IronMQ", "message", "queue", "MQ"],
        test_suite='test',
        classifiers = [
                "Programming Language :: Python",
                "Intended Audience :: Developers",
                "Operating System :: OS Independent",
                "License :: OSI Approved :: BSD License",
                "Natural Language :: English",
                "Topic :: Internet",
                "Topic :: Software Development :: Libraries :: Python Modules",
        ],
        long_description = """\
IronMQ client library
---------------------

This package wraps the IronMQ API. It provides a simple and intuitive way
to interact with the IronMQ service.

IronMQ is a service provided by Iron.io. A flexible, scalable,
and durable messaging system lets different parts of a cloud app
connect with and scale independently from other internal and external
processes. IronMQ offers developers ready-to-use messaging with reliable
delivery and cloud-optimized performance."""
)
<commit_msg>Removing v3 from pypi, bump version to 0.8<commit_after>from setuptools import setup

setup(
        name = "iron-mq",
        py_modules = ["iron_mq"],
        install_requires = ["iron_core"],
        version = "0.8",
        description = "Client library for IronMQ, a message queue in the cloud",
        author = "Iron.io",
        author_email = "thirdparty@iron.io",
        url = "https://github.com/iron-io/iron_mq_python",
        keywords = ["Iron.io", "IronMQ", "message", "queue", "MQ"],
        test_suite='test',
        classifiers = [
                "Programming Language :: Python",
                "Intended Audience :: Developers",
                "Operating System :: OS Independent",
                "License :: OSI Approved :: BSD License",
                "Natural Language :: English",
                "Topic :: Internet",
                "Topic :: Software Development :: Libraries :: Python Modules",
        ],
        long_description = """\
IronMQ client library
---------------------

This package wraps the IronMQ API. It provides a simple and intuitive way
to interact with the IronMQ service.

IronMQ is a service provided by Iron.io. A flexible, scalable,
and durable messaging system lets different parts of a cloud app
connect with and scale independently from other internal and external
processes. IronMQ offers developers ready-to-use messaging with reliable
delivery and cloud-optimized performance."""
)
<|endoftext|>


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

from setuptools import setup, find_packages
import pyprocessmacro

setup(

    name='PyProcessMacro',

    version=pyprocessmacro.__version__,

    packages=find_packages(),

    author="Quentin André",

    author_email="quentin.andre@insead.edu",

    description="A Python library for moderation, mediation and conditional process analysis. Based on Andrew F. Hayes Process Macro.",

    long_description=open('README.md').read(),

    install_requires=["numpy", "matplotlib", "pandas", "scipy", "seaborn"],

    include_package_data=False,

    keywords=['mediation-analysis', 'statistics', 'process', 'plotting', 'data-science', 'data-analysis',
              'data-visualization', 'regression-models'],

    url='https://github.com/QuentinAndre/pyprocessmacro/',

    classifiers=[
        "Programming Language :: Python",
        "License :: OSI Approved",
        "Natural Language :: English",
        "Development Status :: 4 - Beta",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.5",
        "Topic :: Statistics",
    ],

    license="MIT"
)
<commit_msg>Updated config<commit_after># -*- coding: utf-8 -*-

from setuptools import setup, find_packages
import pyprocessmacro

setup(

    name='PyProcessMacro',

    version=pyprocessmacro.__version__,

    packages=find_packages(),

    author="Quentin André",

    author_email="quentin.andre@insead.edu",

    description="A Python library for moderation, mediation and conditional process analysis. Based on Andrew F. Hayes Process Macro.",

    long_description=open('README.md').read(),

    install_requires=["numpy", "matplotlib", "pandas", "scipy", "seaborn"],

    include_package_data=False,

    keywords=['mediation-analysis', 'statistics', 'process', 'plotting', 'data-science', 'data-analysis',
              'data-visualization', 'regression-models'],

    url='https://github.com/QuentinAndre/pyprocessmacro/',

    classifiers=[
        "Programming Language :: Python",
        "License :: OSI Approved",
        "Natural Language :: English",
        "Development Status :: 4 - Beta",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3.5"
    ],

    license="MIT"
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Installation and deployment script."""

from __future__ import print_function

import locale
import sys

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

try:
  from distutils.command.bdist_msi import bdist_msi
except ImportError:
  bdist_msi = None

try:
  from distutils.command.bdist_rpm import bdist_rpm
except ImportError:
  bdist_rpm = None

version_tuple = (sys.version_info[0], sys.version_info[1])
if version_tuple[0] not in (2, 3):
  print('Unsupported Python version: {0:s}.'.format(sys.version))
  sys.exit(1)

elif version_tuple[0] == 2 and version_tuple < (2, 7):
  print((
      'Unsupported Python 2 version: {0:s}, version 2.7 or higher '
      'required.').format(sys.version))
  sys.exit(1)

elif version_tuple[0] == 3 and version_tuple < (3, 4):
  print((
      'Unsupported Python 3 version: {0:s}, version 3.4 or higher '
      'required.').format(sys.version))
  sys.exit(1)

# Change PYTHONPATH to include dfdatetime so that we can get the version.
sys.path.insert(0, '.')

import dfdatetime  # pylint: disable=wrong-import-position

if not bdist_msi:
  BdistMSICommand = None
else:
  class BdistMSICommand(bdist_msi):
    """Custom handler for the bdist_msi command."""

    def run(self):
      """Builds an MSI."""
      # Command bdist_msi does not support the library version, neither a date
      # as a version but if we suffix it with .1 everything is fine.
      self.distribution.metadata.version += '.1'

      bdist_msi.run(self)

if not bdist_rpm:
  BdistRPMCommand = None
else:
  class BdistRPMCommand(bdist_rpm):
    """Custom handler for the bdist_rpm command."""

    def _make_spec_file(self):
      """Generates the text of an RPM spec file.

      Returns:
        list[str]: lines of the RPM spec file.
      """
      # Note that bdist_rpm can be an old style class.
      if issubclass(BdistRPMCommand, object):
        spec_file = super(BdistRPMCommand, self)._make_spec_file()
      else:
        spec_file = bdist_rpm._make_spec_file(self)

      if sys.version_info[0] < 3:
        python_package = 'python'
      else:
        python_package = 'python3'

      description = []
      summary = ''
      in_description = False

      python_spec_file = []
      for line in iter(spec_file):
        if line.startswith('Summary: '):
          summary = line

        elif line.startswith('BuildRequires: '):
          line = 'BuildRequires: {0:s}-setuptools'.format(python_package)

        elif line.startswith('Requires: '):
          if python_package == 'python3':
            line = line.replace('python', 'python3')

        elif line.startswith('%description'):
          in_description = True

        elif line.startswith('%files'):
          # Cannot use %{_libdir} here since it can expand to "lib64".
          lines = [
              '%files -n {0:s}-%{{name}}'.format(python_package),
              '%defattr(644,root,root,755)',
              '%doc ACKNOWLEDGEMENTS AUTHORS LICENSE README',
              '%{_prefix}/lib/python*/site-packages/**/*.py',
              '%{_prefix}/lib/python*/site-packages/dfdatetime*.egg-info/*',
              '',
              '%exclude %{_prefix}/share/doc/*',
              '%exclude %{_prefix}/lib/python*/site-packages/**/*.pyc',
              '%exclude %{_prefix}/lib/python*/site-packages/**/*.pyo',
              '%exclude %{_prefix}/lib/python*/site-packages/**/__pycache__/*']

          python_spec_file.extend(lines)
          break

        elif line.startswith('%prep'):
          in_description = False

          python_spec_file.append(
              '%package -n {0:s}-%{{name}}'.format(python_package))
          python_spec_file.append('{0:s}'.format(summary))
          python_spec_file.append('')
          python_spec_file.append(
              '%description -n {0:s}-%{{name}}'.format(python_package))
          python_spec_file.extend(description)

        elif in_description:
          # Ignore leading white lines in the description.
          if not description and not line:
            continue

          description.append(line)

        python_spec_file.append(line)

      return python_spec_file

if version_tuple[0] == 2:
  encoding = sys.stdin.encoding  # pylint: disable=invalid-name

  # Note that sys.stdin.encoding can be None.
  if not encoding:
    encoding = locale.getpreferredencoding()

  # Make sure the default encoding is set correctly otherwise on Python 2
  # setup.py sdist will fail to include filenames with Unicode characters.
  reload(sys)  # pylint: disable=undefined-variable

  sys.setdefaultencoding(encoding)  # pylint: disable=no-member

dfdatetime_description = (
    'Digital Forensics date and time (dfDateTime).')

dfdatetime_long_description = (
    'dfDateTime, or Digital Forensics date and time, provides date and time '
    'objects to preserve accuracy and precision.')

setup(
    name='dfdatetime',
    version=dfdatetime.__version__,
    description=dfdatetime_description,
    long_description=dfdatetime_long_description,
    license='Apache License, Version 2.0',
    url='https://github.com/log2timeline/dfdatetime',
    maintainer='Log2Timeline maintainers',
    maintainer_email='log2timeline-maintainers@googlegroups.com',
    cmdclass={
        'bdist_msi': BdistMSICommand,
        'bdist_rpm': BdistRPMCommand},
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
    ],
    packages=find_packages('.', exclude=[
        'tests', 'tests.*', 'utils']),
    package_dir={
        'dfdatetime': 'dfdatetime'
    },
    data_files=[
        ('share/doc/dfdatetime', [
            'ACKNOWLEDGEMENTS', 'AUTHORS', 'LICENSE', 'README']),
    ],
)
<commit_msg>Changes to setup.py to support Fedora Core 29 (#121)<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Installation and deployment script."""

from __future__ import print_function

import locale
import sys

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

try:
  from distutils.command.bdist_msi import bdist_msi
except ImportError:
  bdist_msi = None

try:
  from distutils.command.bdist_rpm import bdist_rpm
except ImportError:
  bdist_rpm = None

version_tuple = (sys.version_info[0], sys.version_info[1])
if version_tuple[0] not in (2, 3):
  print('Unsupported Python version: {0:s}.'.format(sys.version))
  sys.exit(1)

elif version_tuple[0] == 2 and version_tuple < (2, 7):
  print((
      'Unsupported Python 2 version: {0:s}, version 2.7 or higher '
      'required.').format(sys.version))
  sys.exit(1)

elif version_tuple[0] == 3 and version_tuple < (3, 4):
  print((
      'Unsupported Python 3 version: {0:s}, version 3.4 or higher '
      'required.').format(sys.version))
  sys.exit(1)

# Change PYTHONPATH to include dfdatetime so that we can get the version.
sys.path.insert(0, '.')

import dfdatetime  # pylint: disable=wrong-import-position

if not bdist_msi:
  BdistMSICommand = None
else:
  class BdistMSICommand(bdist_msi):
    """Custom handler for the bdist_msi command."""

    def run(self):
      """Builds an MSI."""
      # Command bdist_msi does not support the library version, neither a date
      # as a version but if we suffix it with .1 everything is fine.
      self.distribution.metadata.version += '.1'

      bdist_msi.run(self)

if not bdist_rpm:
  BdistRPMCommand = None
else:
  class BdistRPMCommand(bdist_rpm):
    """Custom handler for the bdist_rpm command."""

    def _make_spec_file(self):
      """Generates the text of an RPM spec file.

      Returns:
        list[str]: lines of the RPM spec file.
      """
      # Note that bdist_rpm can be an old style class.
      if issubclass(BdistRPMCommand, object):
        spec_file = super(BdistRPMCommand, self)._make_spec_file()
      else:
        spec_file = bdist_rpm._make_spec_file(self)

      if sys.version_info[0] < 3:
        python_package = 'python2'
      else:
        python_package = 'python3'

      description = []
      summary = ''
      in_description = False

      python_spec_file = []
      for line in iter(spec_file):
        if line.startswith('Summary: '):
          summary = line

        elif line.startswith('BuildRequires: '):
          line = 'BuildRequires: {0:s}-setuptools, {0:s}-devel'.format(
              python_package)

        elif line.startswith('Requires: '):
          if python_package == 'python3':
            line = line.replace('python-', 'python3-')
            line = line.replace('python2-', 'python3-')

        elif line.startswith('%description'):
          in_description = True

        elif line.startswith('python setup.py build'):
          if python_package == 'python3':
            line = '%py3_build'
          else:
            line = '%py2_build'

        elif line.startswith('python setup.py install'):
          if python_package == 'python3':
            line = '%py3_install'
          else:
            line = '%py2_install'

        elif line.startswith('%files'):
          lines = [
              '%files -n {0:s}-%{{name}}'.format(python_package),
              '%defattr(644,root,root,755)',
              '%doc ACKNOWLEDGEMENTS AUTHORS LICENSE README']

          if python_package == 'python3':
            lines.extend([
                '%{python3_sitelib}/**/*.py',
                '%{python3_sitelib}/dfdatetime*.egg-info/*',
                '',
                '%exclude %{_prefix}/share/doc/*',
                '%exclude %{python3_sitelib}/**/__pycache__/*'])

          else:
            lines.extend([
                '%{python2_sitelib}/**/*.py',
                '%{python2_sitelib}/dfdatetime*.egg-info/*',
                '',
                '%exclude %{_prefix}/share/doc/*',
                '%exclude %{python2_sitelib}/**/*.pyc',
                '%exclude %{python2_sitelib}/**/*.pyo'])

          python_spec_file.extend(lines)
          break

        elif line.startswith('%prep'):
          in_description = False

          python_spec_file.append(
              '%package -n {0:s}-%{{name}}'.format(python_package))
          if python_package == 'python2':
            python_spec_file.append(
                'Obsoletes: python-dfdatetime < %{version}')
            python_spec_file.append(
                'Provides: python-dfdatetime = %{version}')

          python_spec_file.append('{0:s}'.format(summary))
          python_spec_file.append('')
          python_spec_file.append(
              '%description -n {0:s}-%{{name}}'.format(python_package))
          python_spec_file.extend(description)

        elif in_description:
          # Ignore leading white lines in the description.
          if not description and not line:
            continue

          description.append(line)

        python_spec_file.append(line)

      return python_spec_file

if version_tuple[0] == 2:
  encoding = sys.stdin.encoding  # pylint: disable=invalid-name

  # Note that sys.stdin.encoding can be None.
  if not encoding:
    encoding = locale.getpreferredencoding()

  # Make sure the default encoding is set correctly otherwise on Python 2
  # setup.py sdist will fail to include filenames with Unicode characters.
  reload(sys)  # pylint: disable=undefined-variable

  sys.setdefaultencoding(encoding)  # pylint: disable=no-member

dfdatetime_description = (
    'Digital Forensics date and time (dfDateTime).')

dfdatetime_long_description = (
    'dfDateTime, or Digital Forensics date and time, provides date and time '
    'objects to preserve accuracy and precision.')

setup(
    name='dfdatetime',
    version=dfdatetime.__version__,
    description=dfdatetime_description,
    long_description=dfdatetime_long_description,
    license='Apache License, Version 2.0',
    url='https://github.com/log2timeline/dfdatetime',
    maintainer='Log2Timeline maintainers',
    maintainer_email='log2timeline-maintainers@googlegroups.com',
    cmdclass={
        'bdist_msi': BdistMSICommand,
        'bdist_rpm': BdistRPMCommand},
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
    ],
    packages=find_packages('.', exclude=[
        'tests', 'tests.*', 'utils']),
    package_dir={
        'dfdatetime': 'dfdatetime'
    },
    data_files=[
        ('share/doc/dfdatetime', [
            'ACKNOWLEDGEMENTS', 'AUTHORS', 'LICENSE', 'README']),
    ],
)
<|endoftext|>


<commit_before>from distutils.core import setup
import io
import os.path

def read(filename):
    filepath = os.path.join(os.path.dirname(__file__), filename)
    with io.open(filepath) as fp:
        text = fp.read()
    return text

setup(
    name='fastcomp',
    version='1.1.0',
    py_modules=['fastcomp'],
    author='Fujimoto Seiji',
    author_email='fujimoto@ceptord.net',
    url='https://github.com/fujimotos/fastcomp',
    description='Limited-but-faster computation of Levenshtein distance',
    long_description=read('README.md'),
    license='MIT',
    classifiers=[
        'Programming Language :: Python',
        'Development Status :: 4 - Beta',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Scientific/Engineering',
        'Topic :: Text Processing'
    ]
)
<commit_msg>setup.py: clean up the package meta data.<commit_after>from distutils.core import setup

setup(
    name='fastcomp',
    version='1.1.0',
    py_modules=['fastcomp'],
    author='Fujimoto Seiji',
    author_email='fujimoto@ceptord.net',
    url='https://github.com/fujimotos/fastcomp',
    description='Limited-but-faster computation of Levenshtein distance',
    long_description="""The fastcomp is an efficient algorithm for computing (Damerau-)
Levenshtein distance **up to two**.

Given two strings of length m and n (m <= n), the
computation requires O(1) space and O(n) time, which is
much smaller and faster than well-known Wagner-Fisher algorithm.""",
    license='MIT',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Scientific/Engineering',
    ]
)
<|endoftext|>


<commit_before>import importlib.util
import os
import sys

from setuptools import find_packages, setup
from setuptools.command.build_py import build_py as _build_py

# Prevents pkg_resources import in entry point script,
# see https://github.com/ninjaaron/fast-entry_points.
# This saves about 200 ms on startup time for non-wheel installs.
import fastentrypoints  # noqa: F401

# Read package meta-data from version.py
# see https://packaging.python.org/guides/single-sourcing-package-version/
pkg_dir = os.path.dirname(os.path.abspath(__file__))
version_path = os.path.join(pkg_dir, "dvc", "version.py")
spec = importlib.util.spec_from_file_location("dvc.version", version_path)
dvc_version = importlib.util.module_from_spec(spec)
spec.loader.exec_module(dvc_version)
version = dvc_version.__version__  # noqa: F821

# To achieve consistency between the build version and the one provided
# by your package during runtime, you need to **pin** the build version.
#
# This custom class will replace the version.py module with a **static**
# `__version__` that your package can read at runtime, assuring consistency.
#
# References:
#   - https://docs.python.org/3.7/distutils/extending.html
#   - https://github.com/python/mypy
class build_py(_build_py):
    def pin_version(self):
        path = os.path.join(self.build_lib, "dvc")
        self.mkpath(path)
        with open(os.path.join(path, "version.py"), "w") as fobj:
            fobj.write("# AUTOGENERATED at build time by setup.py\n")
            fobj.write('__version__ = "{}"\n'.format(version))

    def run(self):
        self.execute(self.pin_version, ())
        _build_py.run(self)

install_requires = [
    "python-dateutil<2.8.1,>=2.1",  # Consolidates azure-blob-storage and boto3
    "ply>=3.9",  # See https://github.com/pyinstaller/pyinstaller/issues/1945
    "colorama>=0.3.9",
    "configobj>=5.0.6",
    "gitpython>=2.1.8",
    "gitdb2>=2.0.6",  # See https://github.com/iterative/dvc/issues/1880
    "setuptools>=34.0.0",
    "nanotime>=0.5.2",
    "pyasn1>=0.4.1",
    "voluptuous>=0.11.7",
    "jsonpath-ng>=1.4.3",
    "requests>=2.22.0",
    "grandalf==0.6",
    "distro>=1.3.0",
    "appdirs>=1.4.3",
    "treelib>=1.5.5",
    "inflect>=2.1.0,<4",
    "humanize>=0.5.1",
    "PyYAML>=5.1.2,<5.2",  # Compatibility with awscli
    "ruamel.yaml>=0.16.1",
    "funcy>=1.14",
    "pathspec>=0.6.0",
    "shortuuid>=0.5.0",
    "tqdm>=4.40.0,<5",
    "packaging>=19.0",
    "zc.lockfile>=1.2.1",
    "flufl.lock>=3.2",
    "win-unicode-console>=0.5; sys_platform == 'win32'",
    "pywin32>=225; sys_platform == 'win32'",
    "networkx>=2.1,<2.4",
    "speedcopy>=2.0.1",
    "pyfastcopy>=1.0.3",
    "flatten_json>=0.1.6",
    "texttable>=0.5.2",
]

# Extra dependencies for remote integrations

gs = ["google-cloud-storage==1.19.0"]
gdrive = ["pydrive2>=1.4.2"]
s3 = ["boto3>=1.9.201"]
azure = ["azure-storage-blob==2.1.0"]
oss = ["oss2==2.6.1"]
ssh = ["paramiko>=2.5.0"]
hdfs = ["pyarrow==0.15.1"]
# gssapi should not be included in all_remotes, because it doesn't have wheels
# for linux and mac, so it will fail to compile if user doesn't have all the
# requirements, including kerberos itself. Once all the wheels are available,
# we can start shipping it by default.
ssh_gssapi = ["paramiko[gssapi]>=2.5.0"]
all_remotes = gs + s3 + azure + ssh + oss + gdrive + hdfs

# Extra dependecies to run tests
tests_requirements = [
    "wheel>=0.31.1",
    "pydot>=1.2.4",
    # Test requirements:
    "pytest>=4.6.0",
    "pytest-timeout>=1.3.3",
    "pytest-cov>=2.6.1",
    "pytest-xdist>=1.26.1",
    "pytest-mock==1.11.2",
    "flaky>=3.5.3",
    "mock>=3.0.0",
    "xmltodict>=0.11.0",
    "awscli>=1.16.297",
    "google-compute-engine==2.8.13",
    "Pygments",  # required by collective.checkdocs,
    "collective.checkdocs",
    "flake8",
    "psutil",
    "flake8-docstrings",
    "pydocstyle<4.0",
    "jaraco.windows==3.9.2",
    "mock-ssh-server>=0.6.0",
    "moto==1.3.14.dev464",
    "rangehttpserver==1.2.0",
]

if (sys.version_info) >= (3, 6):
    tests_requirements.append("black==19.3b0")

setup(
    name="dvc",
    version=version,
    description="Git for data scientists - manage your code and data together",
    long_description=open("README.rst", "r").read(),
    author="Dmitry Petrov",
    author_email="dmitry@dataversioncontrol.com",
    download_url="https://github.com/iterative/dvc",
    license="Apache License 2.0",
    install_requires=install_requires,
    extras_require={
        "all": all_remotes,
        "gs": gs,
        "gdrive": gdrive,
        "s3": s3,
        "azure": azure,
        "oss": oss,
        "ssh": ssh,
        "ssh_gssapi": ssh_gssapi,
        "hdfs": hdfs,
        "tests": tests_requirements,
    },
    keywords="data science, data version control, machine learning",
    python_requires=">=3.5",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    packages=find_packages(exclude=["tests"]),
    include_package_data=True,
    url="http://dvc.org",
    entry_points={"console_scripts": ["dvc = dvc.main:main"]},
    cmdclass={"build_py": build_py},
    zip_safe=False,
)
<commit_msg>setup: move pydot to install_requires<commit_after>import importlib.util
import os
import sys

from setuptools import find_packages, setup
from setuptools.command.build_py import build_py as _build_py

# Prevents pkg_resources import in entry point script,
# see https://github.com/ninjaaron/fast-entry_points.
# This saves about 200 ms on startup time for non-wheel installs.
import fastentrypoints  # noqa: F401

# Read package meta-data from version.py
# see https://packaging.python.org/guides/single-sourcing-package-version/
pkg_dir = os.path.dirname(os.path.abspath(__file__))
version_path = os.path.join(pkg_dir, "dvc", "version.py")
spec = importlib.util.spec_from_file_location("dvc.version", version_path)
dvc_version = importlib.util.module_from_spec(spec)
spec.loader.exec_module(dvc_version)
version = dvc_version.__version__  # noqa: F821

# To achieve consistency between the build version and the one provided
# by your package during runtime, you need to **pin** the build version.
#
# This custom class will replace the version.py module with a **static**
# `__version__` that your package can read at runtime, assuring consistency.
#
# References:
#   - https://docs.python.org/3.7/distutils/extending.html
#   - https://github.com/python/mypy
class build_py(_build_py):
    def pin_version(self):
        path = os.path.join(self.build_lib, "dvc")
        self.mkpath(path)
        with open(os.path.join(path, "version.py"), "w") as fobj:
            fobj.write("# AUTOGENERATED at build time by setup.py\n")
            fobj.write('__version__ = "{}"\n'.format(version))

    def run(self):
        self.execute(self.pin_version, ())
        _build_py.run(self)

install_requires = [
    "python-dateutil<2.8.1,>=2.1",  # Consolidates azure-blob-storage and boto3
    "ply>=3.9",  # See https://github.com/pyinstaller/pyinstaller/issues/1945
    "colorama>=0.3.9",
    "configobj>=5.0.6",
    "gitpython>=2.1.8",
    "gitdb2>=2.0.6",  # See https://github.com/iterative/dvc/issues/1880
    "setuptools>=34.0.0",
    "nanotime>=0.5.2",
    "pyasn1>=0.4.1",
    "voluptuous>=0.11.7",
    "jsonpath-ng>=1.4.3",
    "requests>=2.22.0",
    "grandalf==0.6",
    "distro>=1.3.0",
    "appdirs>=1.4.3",
    "treelib>=1.5.5",
    "inflect>=2.1.0,<4",
    "humanize>=0.5.1",
    "PyYAML>=5.1.2,<5.2",  # Compatibility with awscli
    "ruamel.yaml>=0.16.1",
    "funcy>=1.14",
    "pathspec>=0.6.0",
    "shortuuid>=0.5.0",
    "tqdm>=4.40.0,<5",
    "packaging>=19.0",
    "zc.lockfile>=1.2.1",
    "flufl.lock>=3.2",
    "win-unicode-console>=0.5; sys_platform == 'win32'",
    "pywin32>=225; sys_platform == 'win32'",
    "networkx>=2.1,<2.4",
    "pydot>=1.2.4",
    "speedcopy>=2.0.1",
    "pyfastcopy>=1.0.3",
    "flatten_json>=0.1.6",
    "texttable>=0.5.2",
]

# Extra dependencies for remote integrations

gs = ["google-cloud-storage==1.19.0"]
gdrive = ["pydrive2>=1.4.2"]
s3 = ["boto3>=1.9.201"]
azure = ["azure-storage-blob==2.1.0"]
oss = ["oss2==2.6.1"]
ssh = ["paramiko>=2.5.0"]
hdfs = ["pyarrow==0.15.1"]
# gssapi should not be included in all_remotes, because it doesn't have wheels
# for linux and mac, so it will fail to compile if user doesn't have all the
# requirements, including kerberos itself. Once all the wheels are available,
# we can start shipping it by default.
ssh_gssapi = ["paramiko[gssapi]>=2.5.0"]
all_remotes = gs + s3 + azure + ssh + oss + gdrive + hdfs

# Extra dependecies to run tests
tests_requirements = [
    "wheel>=0.31.1",
    # Test requirements:
    "pytest>=4.6.0",
    "pytest-timeout>=1.3.3",
    "pytest-cov>=2.6.1",
    "pytest-xdist>=1.26.1",
    "pytest-mock==1.11.2",
    "flaky>=3.5.3",
    "mock>=3.0.0",
    "xmltodict>=0.11.0",
    "awscli>=1.16.297",
    "google-compute-engine==2.8.13",
    "Pygments",  # required by collective.checkdocs,
    "collective.checkdocs",
    "flake8",
    "psutil",
    "flake8-docstrings",
    "pydocstyle<4.0",
    "jaraco.windows==3.9.2",
    "mock-ssh-server>=0.6.0",
    "moto==1.3.14.dev464",
    "rangehttpserver==1.2.0",
]

if (sys.version_info) >= (3, 6):
    tests_requirements.append("black==19.3b0")

setup(
    name="dvc",
    version=version,
    description="Git for data scientists - manage your code and data together",
    long_description=open("README.rst", "r").read(),
    author="Dmitry Petrov",
    author_email="dmitry@dataversioncontrol.com",
    download_url="https://github.com/iterative/dvc",
    license="Apache License 2.0",
    install_requires=install_requires,
    extras_require={
        "all": all_remotes,
        "gs": gs,
        "gdrive": gdrive,
        "s3": s3,
        "azure": azure,
        "oss": oss,
        "ssh": ssh,
        "ssh_gssapi": ssh_gssapi,
        "hdfs": hdfs,
        "tests": tests_requirements,
    },
    keywords="data science, data version control, machine learning",
    python_requires=">=3.5",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    packages=find_packages(exclude=["tests"]),
    include_package_data=True,
    url="http://dvc.org",
    entry_points={"console_scripts": ["dvc = dvc.main:main"]},
    cmdclass={"build_py": build_py},
    zip_safe=False,
)
<|endoftext|>


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

from distutils.core import setup

setup(
  name = "deco",
  version = "0.5",
  description = "A decorator for concurrency",
  packages = ["deco"],
  author='Alex Sherman',
  author_email='asherman1024@gmail.com',
  url='https://github.com/alex-sherman/deco')
<commit_msg>Increment version number<commit_after>#!/usr/bin/env python

from distutils.core import setup

setup(
  name = "deco",
  version = "0.5.1",
  description = "A decorator for concurrency",
  packages = ["deco"],
  author='Alex Sherman',
  author_email='asherman1024@gmail.com',
  url='https://github.com/alex-sherman/deco')
<|endoftext|>


<commit_before>from distutils.core import setup

setup(
    name='store',
    version='0.1',
    author='C Bates',
    author_email='chrsbats@gmail.com',
    packages=['kvstore'],
    scripts=[],
    url='https://github.com/chrsbats/store',
    license='LICENSE.TXT',
    description='Key value store with Filesystem and S3 backends',
    long_description='Key value store with Filesystem and S3 backends',
    install_requires=[
        "boto==2.15.0",
    ],
)
<commit_msg>Fix setup.py<commit_after>from distutils.core import setup

setup(
    name='kvstore',
    version='0.1',
    author='C Bates',
    author_email='chrsbats@gmail.com',
    packages=['kvstore'],
    scripts=[],
    url='https://github.com/chrsbats/store',
    license='LICENSE.TXT',
    description='Key value store with Filesystem and S3 backends',
    long_description='Key value store with Filesystem and S3 backends',
    install_requires=[
        "boto==2.15.0",
    ],
)
<|endoftext|>


<commit_before>from os.path import abspath, dirname, join
from setuptools import find_packages, setup

ENTRY_POINTS = '''
[console_scripts]
crosscompute = crosscompute.scripts:launch
[crosscompute]
projects.add = crosscompute.scripts.projects.add:AddProjectScript
projects.see = crosscompute.scripts.projects.see:SeeProjectScript
projects.change = crosscompute.scripts.projects.change:ChangeProjectScript
tools.add = crosscompute.scripts.tools.add:AddToolScript
tools.see = crosscompute.scripts.tools.see:SeeToolScript
results.add = crosscompute.scripts.results.add:AddResultScript
workers.run = crosscompute.scripts.workers.run:RunWorkerScript
'''
APPLICATION_CLASSIFIERS = [
    'Programming Language :: Python :: 3',
    'License :: OSI Approved :: MIT License',
]
APPLICATION_REQUIREMENTS = [
    'invisibleroads >= 0.3.2',
    'requests',
    'strictyaml',
]
TEST_REQUIREMENTS = [
]
FOLDER = dirname(abspath(__file__))
DESCRIPTION = '\n\n'.join(open(join(FOLDER, x)).read().strip() for x in [
    'README.md', 'CHANGES.md'])

setup(
    name='crosscompute',
    version='0.8.0',
    description='Publish your tool by writing a configuration file',
    long_description=DESCRIPTION,
    long_description_content_type='text/markdown',
    classifiers=APPLICATION_CLASSIFIERS,
    author='CrossCompute Inc',
    author_email='support@crosscompute.com',
    url='https://github.com/crosscompute/crosscompute',
    keywords='crosscompute',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=True,
    extras_require={'test': TEST_REQUIREMENTS},
    install_requires=APPLICATION_REQUIREMENTS,
    entry_points=ENTRY_POINTS)
<commit_msg>add missing dependency invisibleroads-macros-log<commit_after>from os.path import abspath, dirname, join
from setuptools import find_packages, setup

ENTRY_POINTS = '''
[console_scripts]
crosscompute = crosscompute.scripts:launch
[crosscompute]
projects.add = crosscompute.scripts.projects.add:AddProjectScript
projects.see = crosscompute.scripts.projects.see:SeeProjectScript
projects.change = crosscompute.scripts.projects.change:ChangeProjectScript
tools.add = crosscompute.scripts.tools.add:AddToolScript
tools.see = crosscompute.scripts.tools.see:SeeToolScript
results.add = crosscompute.scripts.results.add:AddResultScript
workers.run = crosscompute.scripts.workers.run:RunWorkerScript
'''
APPLICATION_CLASSIFIERS = [
    'Programming Language :: Python :: 3',
    'License :: OSI Approved :: MIT License',
]
APPLICATION_REQUIREMENTS = [
    'invisibleroads >= 0.3.2',
    'invisibleroads-macros-log >= 1.0.3',
    'requests',
    'strictyaml',
]
TEST_REQUIREMENTS = [
]
FOLDER = dirname(abspath(__file__))
DESCRIPTION = '\n\n'.join(open(join(FOLDER, x)).read().strip() for x in [
    'README.md', 'CHANGES.md'])

setup(
    name='crosscompute',
    version='0.8.0',
    description='Publish your tool by writing a configuration file',
    long_description=DESCRIPTION,
    long_description_content_type='text/markdown',
    classifiers=APPLICATION_CLASSIFIERS,
    author='CrossCompute Inc',
    author_email='support@crosscompute.com',
    url='https://github.com/crosscompute/crosscompute',
    keywords='crosscompute',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=True,
    extras_require={'test': TEST_REQUIREMENTS},
    install_requires=APPLICATION_REQUIREMENTS,
    entry_points=ENTRY_POINTS)
<|endoftext|>


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

from __future__ import print_function

import os
import sys
import warnings
from setuptools import setup, Extension
from Cython.Distutils import build_ext

dist_dir = os.path.dirname(os.path.abspath(__file__))
os.system("gunzip -kf %s/irtrans/models/* 2> /dev/null" %dist_dir)

try:
    import py2exe
except ImportError:
    if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
        print("Cannot import py2exe", file=sys.stderr)
        exit(1)

py2exe_options = {
    "bundle_files": 1,
    "compressed": 1,
    "optimize": 2,
    "dist_dir": '.',
    "dll_excludes": ['w9xpopen.exe'],
}

py2exe_console = [{
    "script": "./irtrans/__main__.py",
    "dest_base": "irtrans",
}]

py2exe_params = {
    'console': py2exe_console,
    'options': {"py2exe": py2exe_options},
    'zipfile': None
}

if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
    params = py2exe_params
else:
    files_spec = [
        ('share/doc/irtrans', ['README.rst'])
    ]
    root = os.path.dirname(os.path.abspath(__file__))
    data_files = []
    for dirname, files in files_spec:
        resfiles = []
        for fn in files:
            if not os.path.exists(fn):
                warnings.warn('Skipping file %s since it is not present. Type  make  to build all automatically generated files.' % fn)
            else:
                resfiles.append(fn)
        data_files.append((dirname, resfiles))

    params = {
        'data_files': data_files,
    }
    params['entry_points'] = {'console_scripts': ['irtrans = irtrans:main']}

# Get the version from youtube_dl/version.py without importing the package
exec(compile(open('irtrans/version.py').read(),
             'irtrans/version.py', 'exec'))

setup(
    name = "irtrans",
    version = __version__,
    description="Transliteration Tool: Hindi to Urdu transliterator and vice-versa",
    long_description = open('README.rst', 'rb').read().decode('utf8'),
    keywords = ['Language Transliteration', 'Computational Linguistics',
		'Indic', 'Roman'],
    author=['Riyaz Ahmad', 'Irshad Ahmad'],
    author_email='irshad.bhat@research.iiit.ac.in',
    maintainer='Irshad Ahmad',
    maintainer_email='irshad.bhat@research.iiit.ac.in',
    license = "MIT",
    url="https://github.com/irshadbhat/irtrans",
    package_dir={"hutrams":"irtrans"},
    packages=['irtrans', 'irtrans._utils', 'irtrans._decode'],
    package_data={'irtrans': ['models/*.npy']},

    classifiers=[
        "Topic :: Indian Languages :: Transliteration",
        "Environment :: Console",
        "License :: Public Domain",
        "Programming Language :: Python :: 2.7"
    ],
    cmdclass={'build_ext': build_ext},
    ext_modules=[
        Extension("irtrans._decode.viterbi", ["irtrans/_decode/viterbi.pyx"]),
    ],
    install_requires=["cython", "numpy", "scipy"],
    #requires=["cython", "numpy", "scipy"],
    **params
)
<commit_msg>update<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function

import os
import sys
import warnings
from setuptools import setup, Extension
from Cython.Distutils import build_ext

dist_dir = os.path.dirname(os.path.abspath(__file__))
os.system("gunzip -kf %s/irtrans/models/* 2> /dev/null" %dist_dir)

try:
    import py2exe
except ImportError:
    if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
        print("Cannot import py2exe", file=sys.stderr)
        exit(1)

py2exe_options = {
    "bundle_files": 1,
    "compressed": 1,
    "optimize": 2,
    "dist_dir": '.',
    "dll_excludes": ['w9xpopen.exe'],
}

py2exe_console = [{
    "script": "./irtrans/__main__.py",
    "dest_base": "irtrans",
}]

py2exe_params = {
    'console': py2exe_console,
    'options': {"py2exe": py2exe_options},
    'zipfile': None
}

if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
    params = py2exe_params
else:
    files_spec = [
        ('share/doc/irtrans', ['README.rst'])
    ]
    root = os.path.dirname(os.path.abspath(__file__))
    data_files = []
    for dirname, files in files_spec:
        resfiles = []
        for fn in files:
            if not os.path.exists(fn):
                warnings.warn('Skipping file %s since it is not present. Type  make  to build all automatically generated files.' % fn)
            else:
                resfiles.append(fn)
        data_files.append((dirname, resfiles))

    params = {
        'data_files': data_files,
    }
    params['entry_points'] = {'console_scripts': ['irtrans = irtrans:main']}

# Get the package version
exec(compile(open('irtrans/version.py').read(),
             'irtrans/version.py', 'exec'))

setup(
    name = "irtrans",
    version = __version__,
    description="Transliteration Tool: Hindi to Urdu transliterator and vice-versa",
    long_description = open('README.rst', 'rb').read().decode('utf8'),
    keywords = ['Language Transliteration', 'Computational Linguistics',
		'Indic', 'Roman'],
    author=['Riyaz Ahmad', 'Irshad Ahmad'],
    author_email='irshad.bhat@research.iiit.ac.in',
    maintainer='Irshad Ahmad',
    maintainer_email='irshad.bhat@research.iiit.ac.in',
    license = "MIT",
    url="https://github.com/irshadbhat/irtrans",
    package_dir={"hutrams":"irtrans"},
    packages=['irtrans', 'irtrans._utils', 'irtrans._decode'],
    package_data={'irtrans': ['models/*.npy']},

    classifiers=[
        "Topic :: Text Processing :: Linguistic",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3.3",
        "Operating System :: Unix"
    ],
    cmdclass={'build_ext': build_ext},
    ext_modules=[
        Extension("irtrans._decode.viterbi", ["irtrans/_decode/viterbi.pyx"]),
    ],
    install_requires=["cython", "numpy", "scipy"],
    #requires=["cython", "numpy", "scipy"],
    **params
)
<|endoftext|>


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

import os
import re
from setuptools import setup
try:  # pip >= 10
    from pip._internal.req import parse_requirements
except ImportError:  # pip <= 9.0.3
    from pip.req import parse_requirements
from setuptools.command.install import install
from setuptools.command.develop import develop

# Hackishly override of the install method
class InstallReqs(install):
    def run(self):
        print(" ********************** ")
        print(" *** Installing VIP *** ")
        print(" ********************** ")
        os.system('pip install -r requirements.txt')
        install.run(self)

class InstallDevReqs(develop):
    def run(self):
        print(" **************************** ")
        print(" *** Installing VIP (dev) *** ")
        print(" **************************** ")
        os.system('pip install -r requirements-dev.txt')
        develop.run(self)

def resource(*args):
    return os.path.join(os.path.abspath(os.path.join(__file__, os.pardir)),
                        *args)

# parse_requirements() returns generator of pip.req.InstallRequirement objects
reqs = parse_requirements(resource('requirements.txt'), session=False)
reqs = [str(ir.req) for ir in reqs]
reqs_dev = parse_requirements(resource('requirements-dev.txt'), session=False)
reqs_dev = [str(ir.req) for ir in reqs_dev]

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

with open(resource('vip_hci', '__init__.py')) as version_file:
    version_file = version_file.read()
    VERSION = re.search(r"""^__version__ = ['"]([^'"]*)['"]""",
                        version_file, re.M)
    VERSION = VERSION.group(1)

PACKAGES = ['vip_hci',
            'vip_hci.andromeda',
            'vip_hci.conf',
            'vip_hci.exlib',
            'vip_hci.fits',
            'vip_hci.frdiff',
            'vip_hci.leastsq',
            'vip_hci.llsg',
            'vip_hci.medsub',
            'vip_hci.metrics',
            'vip_hci.negfc',
            'vip_hci.nmf',
            'vip_hci.pca',
            'vip_hci.preproc',
            'vip_hci.stats',
            'vip_hci.var']

setup(
    name='vip_hci',
    version=VERSION,
    description='Package for astronomical high-contrast image processing.',
    long_description=README,
    license='MIT',
    author='Carlos Alberto Gomez Gonzalez',
    author_email='carlosgg33@gmail.com',
    url='https://github.com/vortex-exoplanet/VIP',
    cmdclass={'install': InstallReqs,
              'develop': InstallDevReqs},
    packages=PACKAGES,
    install_requires=reqs,
    extras_require={
        "dev": reqs_dev,
    },
    zip_safe=False,
    classifiers=['Intended Audience :: Science/Research',
                 'License :: OSI Approved :: MIT License',
                 'Operating System :: MacOS :: MacOS X',
                 'Operating System :: POSIX :: Linux',
                 'Natural Language :: English',
                 'Programming Language :: Python :: 2.7',
                 'Programming Language :: Python :: 3.6',
                 'Topic :: Scientific/Engineering :: Astronomy'
                 ]
)
<commit_msg>REL: add python 3.7 Trove classifier<commit_after>#!/usr/bin/env python

import os
import re
from setuptools import setup
try:  # pip >= 10
    from pip._internal.req import parse_requirements
except ImportError:  # pip <= 9.0.3
    from pip.req import parse_requirements
from setuptools.command.install import install
from setuptools.command.develop import develop

# Hackishly override of the install method
class InstallReqs(install):
    def run(self):
        print(" ********************** ")
        print(" *** Installing VIP *** ")
        print(" ********************** ")
        os.system('pip install -r requirements.txt')
        install.run(self)

class InstallDevReqs(develop):
    def run(self):
        print(" **************************** ")
        print(" *** Installing VIP (dev) *** ")
        print(" **************************** ")
        os.system('pip install -r requirements-dev.txt')
        develop.run(self)

def resource(*args):
    return os.path.join(os.path.abspath(os.path.join(__file__, os.pardir)),
                        *args)

# parse_requirements() returns generator of pip.req.InstallRequirement objects
reqs = parse_requirements(resource('requirements.txt'), session=False)
reqs = [str(ir.req) for ir in reqs]
reqs_dev = parse_requirements(resource('requirements-dev.txt'), session=False)
reqs_dev = [str(ir.req) for ir in reqs_dev]

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

with open(resource('vip_hci', '__init__.py')) as version_file:
    version_file = version_file.read()
    VERSION = re.search(r"""^__version__ = ['"]([^'"]*)['"]""",
                        version_file, re.M)
    VERSION = VERSION.group(1)

PACKAGES = ['vip_hci',
            'vip_hci.andromeda',
            'vip_hci.conf',
            'vip_hci.exlib',
            'vip_hci.fits',
            'vip_hci.frdiff',
            'vip_hci.leastsq',
            'vip_hci.llsg',
            'vip_hci.medsub',
            'vip_hci.metrics',
            'vip_hci.negfc',
            'vip_hci.nmf',
            'vip_hci.pca',
            'vip_hci.preproc',
            'vip_hci.stats',
            'vip_hci.var']

setup(
    name='vip_hci',
    version=VERSION,
    description='Package for astronomical high-contrast image processing.',
    long_description=README,
    license='MIT',
    author='Carlos Alberto Gomez Gonzalez',
    author_email='carlosgg33@gmail.com',
    url='https://github.com/vortex-exoplanet/VIP',
    cmdclass={'install': InstallReqs,
              'develop': InstallDevReqs},
    packages=PACKAGES,
    install_requires=reqs,
    extras_require={
        "dev": reqs_dev,
    },
    zip_safe=False,
    classifiers=['Intended Audience :: Science/Research',
                 'License :: OSI Approved :: MIT License',
                 'Operating System :: MacOS :: MacOS X',
                 'Operating System :: POSIX :: Linux',
                 'Natural Language :: English',
                 'Programming Language :: Python :: 2.7',
                 'Programming Language :: Python :: 3.6',
                 'Programming Language :: Python :: 3.7',
                 'Topic :: Scientific/Engineering :: Astronomy'
                 ]
)
<|endoftext|>


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

from setuptools import setup, find_packages
from dreambeam import __version__

setup(name='dreamBeam',
      version=__version__,
      description='Measurement equation framework for radio interferometry.',
      author='Tobia D. Carozzi',
      author_email='tobia.carozzi@chalmers.se',
      packages=find_packages(),
      package_data={'dreambeam.telescopes.LOFAR':
                    ['share/*.cc', 'share/simmos/*.cfg',
                     'share/alignment/*.txt'],
                    'dreambeam':
                    ['configs/*.txt']},
      include_package_data=True,
      license='ISC',
      classifiers=[
          'Development Status :: 1 - Planning',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: ISC License',
          'Programming Language :: Python :: 2.7',
          'Topic :: Scientific/Engineering :: Astronomy',
          'Topic :: Scientific/Engineering :: Mathematics',
          'Topic :: Scientific/Engineering :: Visualization'
      ],
      install_requires=[
          'numpy>=1.10',
          'python-casacore',
          'matplotlib>2.0',
          'antpat>=0.4'
      ],
      entry_points={
        'console_scripts': [
            'pointing_jones = scripts.pointing_jones:cli_main',
            'FoV_jones = scripts.FoV_jones:main'
        ]

      }
      )
<commit_msg>Adding Python 3 to dreamBeam classifiers.<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages
from dreambeam import __version__

setup(name='dreamBeam',
      version=__version__,
      description='Measurement equation framework for radio interferometry.',
      author='Tobia D. Carozzi',
      author_email='tobia.carozzi@chalmers.se',
      packages=find_packages(),
      package_data={'dreambeam.telescopes.LOFAR':
                    ['share/*.cc', 'share/simmos/*.cfg',
                     'share/alignment/*.txt'],
                    'dreambeam':
                    ['configs/*.txt']},
      include_package_data=True,
      license='ISC',
      classifiers=[
          'Development Status :: 1 - Planning',
          'Intended Audience :: Science/Research',
          'License :: OSI Approved :: ISC License',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3',
          'Topic :: Scientific/Engineering :: Astronomy',
          'Topic :: Scientific/Engineering :: Mathematics',
          'Topic :: Scientific/Engineering :: Visualization'
      ],
      install_requires=[
          'numpy>=1.10',
          'python-casacore',
          'matplotlib>2.0',
          'antpat>=0.4'
      ],
      entry_points={
        'console_scripts': [
            'pointing_jones = scripts.pointing_jones:cli_main',
            'FoV_jones = scripts.FoV_jones:main'
        ]

      }
      )
<|endoftext|>


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

"""The setup script."""

import sys

from setuptools import find_packages, setup

PY2 = int(sys.version[0]) == 2

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

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

requirements = [
    # TODO: put package requirements here
]
if PY2:
    requirements.append('backports.lzma')

setup_requirements = [
    'pytest-runner',
    # TODO(wroberts): put setup requirements (distutils extensions, etc.) here
]

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

setup(
    name='wkr',
    version='1.0.0',
    description='Python utility library',
    long_description=readme + '\n\n' + history,
    author='Will Roberts',
    author_email='wildwilhelm@gmail.com',
    url='https://github.com/wroberts/wkr.py',
    packages=find_packages(include=['wkr']),
    include_package_data=True,
    install_requires=requirements,
    license='MIT license',
    zip_safe=False,
    keywords='wkr',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    test_suite='tests',
    tests_require=test_requirements,
    setup_requires=setup_requirements,
)
<commit_msg>setup.py pathlib reqt for py27<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""The setup script."""

import sys

from setuptools import find_packages, setup

PY2 = int(sys.version[0]) == 2

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

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

requirements = [
    # TODO: put package requirements here
]
if PY2:
    requirements.append('backports.lzma', 'pathlib')

setup_requirements = [
    'pytest-runner',
    # TODO(wroberts): put setup requirements (distutils extensions, etc.) here
]

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

setup(
    name='wkr',
    version='1.0.0',
    description='Python utility library',
    long_description=readme + '\n\n' + history,
    author='Will Roberts',
    author_email='wildwilhelm@gmail.com',
    url='https://github.com/wroberts/wkr.py',
    packages=find_packages(include=['wkr']),
    include_package_data=True,
    install_requires=requirements,
    license='MIT license',
    zip_safe=False,
    keywords='wkr',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    test_suite='tests',
    tests_require=test_requirements,
    setup_requires=setup_requirements,
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

version = "1.0.0"
url = "http://openquake.org/"

README = """
OpenQuake is an open source application that allows users to
compute seismic hazard and seismic risk of earthquakes on a global scale.

Please note: the /usr/bin/openquake script requires a celeryconfig.py
file in the PYTHONPATH.  Please make sure this is the case and that your
celeryconfig.py file works with your python-celery setup.

Feel free to copy /usr/openquake/engine/celeryconfig.py and revise it as needed.
"""

PY_MODULES = ['openquake.engine.bin.oqscript']

setup(
    entry_points={
        "console_scripts": ["openquake = openquake.engine.bin.oqscript:main"]
    },
    name="openquake.engine",
    version=version,
    author="The OpenQuake team",
    author_email="devops@openquake.org",
    description=("Computes hazard, risk and socio-economic impact of "
                 "earthquakes."),
    license="AGPL3",
    keywords="earthquake seismic hazard risk",
    url=url,
    long_description=README,
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Topic :: Utilities",
    ],
    packages=find_packages(exclude=["qa_tests", "qa_tests.*",
                                    "tools", "tests", "tests.*",
                                    "openquake.engine.bin",
                                    "openquake.engine.bin.*"]),
    py_modules=PY_MODULES,

    include_package_data=True,
    package_data={"openquake.engine": [
        "db/schema/*.sql", "db/schema/upgrades/*/*/*.sql",
        "openquake.cfg", "README", "LICENSE"]},
    exclude_package_data={"": ["bin/oqpath.py", "bin/oq_check_monitors",
                               "bin/oq_log_sink"]},
    scripts=["openquake/engine/bin/oq_create_db"],

    namespace_packages=['openquake'],

    zip_safe=False,
    )
<commit_msg>Fixed setup.py<commit_after>from setuptools import setup, find_packages

version = "1.0.0"
url = "http://openquake.org/"

README = """
OpenQuake is an open source application that allows users to
compute seismic hazard and seismic risk of earthquakes on a global scale.

Please note: the /usr/bin/openquake script requires a celeryconfig.py
file in the PYTHONPATH.  Please make sure this is the case and that your
celeryconfig.py file works with your python-celery setup.

Feel free to copy /usr/openquake/engine/celeryconfig.py and revise it as needed.
"""

PY_MODULES = ['openquake.engine.bin.oqscript']

setup(
    entry_points={
        "console_scripts": ["openquake = openquake.engine.bin.oqscript:main"]
    },
    name="openquake.engine",
    version=version,
    author="The OpenQuake team",
    author_email="devops@openquake.org",
    description=("Computes hazard, risk and socio-economic impact of "
                 "earthquakes."),
    license="AGPL3",
    keywords="earthquake seismic hazard risk",
    url=url,
    long_description=README,
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Topic :: Utilities",
    ],
    packages=find_packages(exclude=["qa_tests", "qa_tests.*",
                                    "tools",
                                    "openquake.engine.bin",
                                    "openquake.engine.bin.*"]),
    py_modules=PY_MODULES,

    include_package_data=True,
    package_data={"openquake.engine": [
        "db/schema/*.sql", "db/schema/upgrades/*/*/*.sql",
        "openquake.cfg", "README", "LICENSE"]},
    exclude_package_data={"": ["bin/oqpath.py", "bin/oq_check_monitors",
                               "bin/oq_log_sink"]},
    scripts=["openquake/engine/bin/oq_create_db"],

    namespace_packages=['openquake'],

    zip_safe=False,
    )
<|endoftext|>


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

setup(
	name = "IndicoIo",
	version = '0.2.5',
	packages = [
            "IndicoIo",
            "IndicoIo.text.sentiment",
            "IndicoIo.images.fer",
            "IndicoIo.images.facial_features",
            "IndicoIo.text",
            "IndicoIo.images"
        ],
	license = "MIT License (See LICENSE)",
	long_description = open("README").read(),
	url = "https://github.com/IndicoDataSolutions/IndicoIo-python",
	author = "Alec Radford, Slater Victoroff",
	author_email = "Alec Radford <alec@indicodatasolutions.com>, Slater Victoroff <slater@indicodatasolutions.com>",
)
<commit_msg>hopefully it works this time<commit_after>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
	name = "IndicoIo",
	version = '0.2.6',
	packages = [
            "IndicoIo",
            "IndicoIo.text",
            "IndicoIo.images",
        ],
	license = "MIT License (See LICENSE)",
	long_description = open("README").read(),
	url = "https://github.com/IndicoDataSolutions/IndicoIo-python",
	author = "Alec Radford, Slater Victoroff",
	author_email = "Alec Radford <alec@indicodatasolutions.com>, Slater Victoroff <slater@indicodatasolutions.com>",
)
<|endoftext|>


<commit_before>from distutils.core import setup
setup(
    name='FluGibson',
    packages=['FluGibson'],  # this must be the same as the name above
    version='1.0',
    description='A Python package for designing influenza reverse genetics \
                 primers using the seamless cloning methods (e.g. Gibson \
                 assembly, CPEC assembly).',
    author='Eric J. Ma',
    author_email='ericmajinglong@gmail.com',
    # use the URL to the github repo
    url='https://github.com/ericmjl/flu-gibson',
    keywords=['biology'],  # arbitrary keywords
    classifiers=[],
)
<commit_msg>added requirements<commit_after>from distutils.core import setup
setup(
    name='FluGibson',
    packages=['FluGibson'],  # this must be the same as the name above
    version='1.0',
    description='A Python package for designing influenza reverse genetics \
                 primers using the seamless cloning methods (e.g. Gibson \
                 assembly, CPEC assembly).',
    author='Eric J. Ma',
    author_email='ericmajinglong@gmail.com',
    # use the URL to the github repo
    url='https://github.com/ericmjl/flu-gibson',
    keywords=['biology'],  # arbitrary keywords
    classifiers=[],
    requires=['networkx', 'pandas', 'matplotlib', 'biopython']
)
<|endoftext|>