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

from __future__ import print_function
import errno
import os
import platform
import sys
from distutils.command.build import build
from setuptools.command.install import install
from distutils.sysconfig import get_config_vars
from setuptools import setup, Extension
from shutil import copytree, copy2
from subprocess import Popen

class InstallCommand(install):
    user_options = install.user_options + [
        ('lua-system-path=', None, 'Path to the lua system files')
    ]

    def initialize_options(self):
        install.initialize_options(self)
        self.lua_system_path = None

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

    def run(self):
        global lua_system_path
        lua_system_path = self.lua_system_path
        install.run(self)

class BuildCommand(build):
    user_options = build.user_options + [
        ('lua-system-path=', None, 'Path to the lua system files')
    ]

    def initialize_options(self):
        build.initialize_options(self)
        self.lua_system_path = None

    def finalize_options(self):
        build.finalize_options(self)

    def run(self):
        global lua_system_path
        lua_system_path = self.lua_system_path
        build.run(self)

################################################################################
# ENVIRONMENT VARIABLES
################################################################################

os.putenv('ARCHFLAGS', '-arch x86_64')
os.environ['ARCHFLAGS'] = '-arch x86_64'
AEROSPIKE_C_VERSION = os.getenv('AEROSPIKE_C_VERSION')
if not AEROSPIKE_C_VERSION:
    AEROSPIKE_C_VERSION = '4.3.6'
DOWNLOAD_C_CLIENT = os.getenv('DOWNLOAD_C_CLIENT')
AEROSPIKE_C_HOME = os.getenv('AEROSPIKE_C_HOME')
PREFIX = None
PLATFORM = platform.platform(1)
LINUX = 'Linux' in PLATFORM
DARWIN = 'Darwin' in PLATFORM
CWD = os.path.abspath(os.path.dirname(__file__))

################################################################################
# HELPER FUNCTION FOR RESOLVING THE C CLIENT DEPENDENCY
################################################################################

def resolve_c_client(lua_src_path):
    global PREFIX, AEROSPIKE_C_VERSION, DOWNLOAD_C_CLIENT
    global extra_objects, include_dirs

    if PREFIX:
        os.putenv('PREFIX', PREFIX)
        os.environ['PREFIX'] = PREFIX
    if AEROSPIKE_C_VERSION:
        os.putenv('AEROSPIKE_C_VERSION', AEROSPIKE_C_VERSION)
        os.environ['AEROSPIKE_C_VERSION'] = AEROSPIKE_C_VERSION
    if DOWNLOAD_C_CLIENT:
        os.putenv('DOWNLOAD_C_CLIENT', DOWNLOAD_C_CLIENT)
        os.environ['DOWNLOAD_C_CLIENT'] = DOWNLOAD_C_CLIENT

    print('info: Executing', './scripts/aerospike-client-c.sh', file=sys.stdout)
    os.chmod('./scripts/aerospike-client-c.sh', 0o0755)
    os.chmod('./scripts/os_version', 0o0755)
    p = Popen(['./scripts/aerospike-client-c.sh'], env=os.environ)
    rc = p.wait()

    if rc != 0:
        print("error: scripts/aerospike-client-c.sh", rc, file=sys.stderr)
        sys.exit(1)

    # Prefix for Aerospike C client libraries and headers
    aerospike_c_prefix = './aerospike-client-c'
    if not os.path.isdir(aerospike_c_prefix):
        print("error: Directory not found:", aerospike_c_prefix, file=sys.stderr)
        sys.exit(2)

    # -------------------------------------------------------------------------------
    # Check for aerospike.h
    # -------------------------------------------------------------------------------
    aerospike_h = aerospike_c_prefix + '/include/aerospike/aerospike.h'
    if not os.path.isfile(aerospike_h):
        print("error: aerospike.h not found:", aerospike_h, file=sys.stderr)
        sys.exit(3)
    print("info: aerospike.h found:", aerospike_h, file=sys.stdout)
    include_dirs = include_dirs + [
        '/usr/local/opt/openssl/include',
        aerospike_c_prefix + '/include',
        aerospike_c_prefix + '/include/ck'
        ]

    # -------------------------------------------------------------------------------
    # Check for libaerospike.a
    # -------------------------------------------------------------------------------
    aerospike_a = aerospike_c_prefix + '/lib/libaerospike.a'
    if not os.path.isfile(aerospike_a):
        print("error: libaerospike.a not found:", aerospike_a, file=sys.stderr)
        sys.exit(4)
    print("info: libaerospike.a found:", aerospike_a, file=sys.stdout)
    extra_objects = extra_objects + [
        aerospike_a
        ]

    # ---------------------------------------------------------------------------
    # Environment Variables
    # ---------------------------------------------------------------------------
    os.putenv('CPATH', ':'.join(include_dirs))
    os.environ['CPATH'] = ':'.join(include_dirs)
    os.putenv('LD_LIBRARY_PATH', ':'.join(library_dirs))
    os.environ['LD_LIBRARY_PATH'] = ':'.join(library_dirs)
    os.putenv('DYLD_LIBRARY_PATH', ':'.join(library_dirs))
    os.environ['DYLD_LIBRARY_PATH'] = ':'.join(library_dirs)

    # ---------------------------------------------------------------------------
    # Deploying the system lua files
    # ---------------------------------------------------------------------------

################################################################################
# GENERIC BUILD SETTINGS
################################################################################

include_dirs = ['src/include'] + [x for x in os.getenv('CPATH', '').split(':') if len(x) > 0]
extra_compile_args = [
    '-std=gnu99', '-g', '-Wall', '-fPIC', '-O1',
    '-fno-common', '-fno-strict-aliasing', '-Wno-strict-prototypes',
    '-march=nocona',
    '-D_FILE_OFFSET_BITS=64', '-D_REENTRANT', '-D_GNU_SOURCE'
    ]
extra_objects = []
extra_link_args = []
library_dirs = ['/usr/local/opt/openssl/lib']
libraries = [
  'ssl',
  'crypto',
  'pthread',
  'm',
  'z'
  ]

################################################################################
# PLATFORM SPECIFIC BUILD SETTINGS
################################################################################

if DARWIN:
    # ---------------------------------------------------------------------------
    # Mac Specific Compiler and Linker Settings
    # ---------------------------------------------------------------------------
    extra_compile_args = extra_compile_args + [
        '-D_DARWIN_UNLIMITED_SELECT',
        '-DMARCH_x86_64'
        ]

    if AEROSPIKE_C_HOME:
        PREFIX = AEROSPIKE_C_HOME + '/target/Darwin-x86_64'

elif LINUX:
    # ---------------------------------------------------------------------------
    # Linux Specific Compiler and Linker Settings
    # ---------------------------------------------------------------------------
    extra_compile_args = extra_compile_args + [
        '-rdynamic', '-finline-functions',
        '-DMARCH_x86_64'
        ]
    libraries = libraries + ['rt']
    if AEROSPIKE_C_HOME:
        PREFIX = AEROSPIKE_C_HOME + '/target/Linux-x86_64'
else:
    print("error: OS not supported:", PLATFORM, file=sys.stderr)
    sys.exit(8)

################################################################################
# RESOLVE C CLIENT DEPENDENCY AND LUA SYSTEM PATH
################################################################################

lua_system_path = ''

# If the C client is packaged elsewhere, assume the libraries are available
lua_src_path = "modules/aerospike-lua-core/src"

if os.environ.get('NO_RESOLVE_C_CLIENT_DEP', None):
    has_c_client = True
    libraries = libraries + ['aerospike']
    lua_src_path = os.environ.get('AEROSPIKE_LUA_PATH', lua_src_path)
else:
    has_c_client = False

lua_files = [
                lua_src_path + '/aerospike.lua',
                lua_src_path + '/as.lua',
                lua_src_path + '/stream_ops.lua'
            ]

for file in lua_files:
    if not os.path.isfile(file):
        print("Warning: lua file {} not found, exiting".format(file), file=sys.stderr)
        sys.exit(4)

# If system-path isn't specified this will install relative to sys.exec_prefix
data_files = [
    ('aerospike/lua', lua_files)
]

if not has_c_client:
    if (('build' in sys.argv or 'build_ext' in sys.argv or
         'install' in sys.argv or 'bdist_wheel' in sys.argv)):
        resolve_c_client(lua_src_path)

################################################################################
# SETUP
################################################################################

# Get the long description from the relevant file
with open(os.path.join(CWD, 'README.rst')) as f:
    long_description = f.read()

# Get the version from the relevant file
with open(os.path.join(CWD, 'VERSION')) as f:
    version = f.read()

setup(
    cmdclass={
        'build': BuildCommand,
        'install': InstallCommand,
    },
    name='aerospike',
    version=version.strip(),
    description='Aerospike Client Library for Python',
    long_description=long_description,
    author='Aerospike, Inc.',
    author_email='info@aerospike.com',
    url='http://aerospike.com',
    license='Apache Software License',
    keywords=['aerospike', 'nosql', 'database'],
    classifiers=[
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Operating System :: MacOS :: MacOS X',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Topic :: Database'
    ],

    # Package Data Files
    zip_safe=False,
    include_package_data=True,
    package_data={
        'aerospike': [
            lua_src_path + '/*.lua',
        ]
    },

    # Data files
    data_files=data_files,
    ext_modules=[
        Extension(
            # Extension Name
            'aerospike',

            # Source Files
            [
                'src/main/aerospike.c',
                'src/main/exception.c',
                'src/main/log.c',
                'src/main/client/type.c',
                'src/main/client/apply.c',
                'src/main/client/close.c',
                'src/main/client/connect.c',
                'src/main/client/exists.c',
                'src/main/client/exists_many.c',
                'src/main/client/get.c',
                'src/main/client/get_many.c',
                'src/main/client/select_many.c',
                'src/main/client/info_node.c',
                'src/main/client/info.c',
                'src/main/client/put.c',
                'src/main/client/operate_list.c',
                'src/main/client/operate_map.c',
                'src/main/client/operate.c',
                'src/main/client/query.c',
                'src/main/client/remove.c',
                'src/main/client/scan.c',
                'src/main/client/select.c',
                'src/main/client/tls_info_host.c',
                'src/main/client/truncate.c',
                'src/main/client/admin.c',
                'src/main/client/udf.c',
                'src/main/client/sec_index.c',
                'src/main/serializer.c',
                'src/main/client/remove_bin.c',
                'src/main/client/get_key_digest.c',
                'src/main/query/type.c',
                'src/main/query/apply.c',
                'src/main/query/foreach.c',
                'src/main/query/results.c',
                'src/main/query/select.c',
                'src/main/query/where.c',
                'src/main/scan/type.c',
                'src/main/scan/foreach.c',
                'src/main/scan/results.c',
                'src/main/scan/select.c',
                'src/main/geospatial/type.c',
                'src/main/geospatial/wrap.c',
                'src/main/geospatial/unwrap.c',
                'src/main/geospatial/loads.c',
                'src/main/geospatial/dumps.c',
                'src/main/conversions.c',
                'src/main/policy.c',
                'src/main/policy_config.c',
                'src/main/calc_digest.c',
                'src/main/predicates.c',
                'src/main/tls_config.c',
                'src/main/global_hosts/type.c',
                'src/main/nullobject/type.c',
            ],

            # Compile
            include_dirs=include_dirs,
            extra_compile_args=extra_compile_args,

            # Link
            library_dirs=library_dirs,
            libraries=libraries,
            extra_objects=extra_objects,
            extra_link_args=extra_link_args,
        )
    ]
)
<commit_msg>Increase C client version<commit_after># -*- coding: utf-8 -*-
################################################################################
# Copyright 2013-2017 Aerospike, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################

from __future__ import print_function
import errno
import os
import platform
import sys
from distutils.command.build import build
from setuptools.command.install import install
from distutils.sysconfig import get_config_vars
from setuptools import setup, Extension
from shutil import copytree, copy2
from subprocess import Popen

class InstallCommand(install):
    user_options = install.user_options + [
        ('lua-system-path=', None, 'Path to the lua system files')
    ]

    def initialize_options(self):
        install.initialize_options(self)
        self.lua_system_path = None

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

    def run(self):
        global lua_system_path
        lua_system_path = self.lua_system_path
        install.run(self)

class BuildCommand(build):
    user_options = build.user_options + [
        ('lua-system-path=', None, 'Path to the lua system files')
    ]

    def initialize_options(self):
        build.initialize_options(self)
        self.lua_system_path = None

    def finalize_options(self):
        build.finalize_options(self)

    def run(self):
        global lua_system_path
        lua_system_path = self.lua_system_path
        build.run(self)

################################################################################
# ENVIRONMENT VARIABLES
################################################################################

os.putenv('ARCHFLAGS', '-arch x86_64')
os.environ['ARCHFLAGS'] = '-arch x86_64'
AEROSPIKE_C_VERSION = os.getenv('AEROSPIKE_C_VERSION')
if not AEROSPIKE_C_VERSION:
    AEROSPIKE_C_VERSION = '4.3.8'
DOWNLOAD_C_CLIENT = os.getenv('DOWNLOAD_C_CLIENT')
AEROSPIKE_C_HOME = os.getenv('AEROSPIKE_C_HOME')
PREFIX = None
PLATFORM = platform.platform(1)
LINUX = 'Linux' in PLATFORM
DARWIN = 'Darwin' in PLATFORM
CWD = os.path.abspath(os.path.dirname(__file__))

################################################################################
# HELPER FUNCTION FOR RESOLVING THE C CLIENT DEPENDENCY
################################################################################

def resolve_c_client(lua_src_path):
    global PREFIX, AEROSPIKE_C_VERSION, DOWNLOAD_C_CLIENT
    global extra_objects, include_dirs

    if PREFIX:
        os.putenv('PREFIX', PREFIX)
        os.environ['PREFIX'] = PREFIX
    if AEROSPIKE_C_VERSION:
        os.putenv('AEROSPIKE_C_VERSION', AEROSPIKE_C_VERSION)
        os.environ['AEROSPIKE_C_VERSION'] = AEROSPIKE_C_VERSION
    if DOWNLOAD_C_CLIENT:
        os.putenv('DOWNLOAD_C_CLIENT', DOWNLOAD_C_CLIENT)
        os.environ['DOWNLOAD_C_CLIENT'] = DOWNLOAD_C_CLIENT

    print('info: Executing', './scripts/aerospike-client-c.sh', file=sys.stdout)
    os.chmod('./scripts/aerospike-client-c.sh', 0o0755)
    os.chmod('./scripts/os_version', 0o0755)
    p = Popen(['./scripts/aerospike-client-c.sh'], env=os.environ)
    rc = p.wait()

    if rc != 0:
        print("error: scripts/aerospike-client-c.sh", rc, file=sys.stderr)
        sys.exit(1)

    # Prefix for Aerospike C client libraries and headers
    aerospike_c_prefix = './aerospike-client-c'
    if not os.path.isdir(aerospike_c_prefix):
        print("error: Directory not found:", aerospike_c_prefix, file=sys.stderr)
        sys.exit(2)

    # -------------------------------------------------------------------------------
    # Check for aerospike.h
    # -------------------------------------------------------------------------------
    aerospike_h = aerospike_c_prefix + '/include/aerospike/aerospike.h'
    if not os.path.isfile(aerospike_h):
        print("error: aerospike.h not found:", aerospike_h, file=sys.stderr)
        sys.exit(3)
    print("info: aerospike.h found:", aerospike_h, file=sys.stdout)
    include_dirs = include_dirs + [
        '/usr/local/opt/openssl/include',
        aerospike_c_prefix + '/include',
        aerospike_c_prefix + '/include/ck'
        ]

    # -------------------------------------------------------------------------------
    # Check for libaerospike.a
    # -------------------------------------------------------------------------------
    aerospike_a = aerospike_c_prefix + '/lib/libaerospike.a'
    if not os.path.isfile(aerospike_a):
        print("error: libaerospike.a not found:", aerospike_a, file=sys.stderr)
        sys.exit(4)
    print("info: libaerospike.a found:", aerospike_a, file=sys.stdout)
    extra_objects = extra_objects + [
        aerospike_a
        ]

    # ---------------------------------------------------------------------------
    # Environment Variables
    # ---------------------------------------------------------------------------
    os.putenv('CPATH', ':'.join(include_dirs))
    os.environ['CPATH'] = ':'.join(include_dirs)
    os.putenv('LD_LIBRARY_PATH', ':'.join(library_dirs))
    os.environ['LD_LIBRARY_PATH'] = ':'.join(library_dirs)
    os.putenv('DYLD_LIBRARY_PATH', ':'.join(library_dirs))
    os.environ['DYLD_LIBRARY_PATH'] = ':'.join(library_dirs)

    # ---------------------------------------------------------------------------
    # Deploying the system lua files
    # ---------------------------------------------------------------------------

################################################################################
# GENERIC BUILD SETTINGS
################################################################################

include_dirs = ['src/include'] + [x for x in os.getenv('CPATH', '').split(':') if len(x) > 0]
extra_compile_args = [
    '-std=gnu99', '-g', '-Wall', '-fPIC', '-O1',
    '-fno-common', '-fno-strict-aliasing', '-Wno-strict-prototypes',
    '-march=nocona',
    '-D_FILE_OFFSET_BITS=64', '-D_REENTRANT', '-D_GNU_SOURCE'
    ]
extra_objects = []
extra_link_args = []
library_dirs = ['/usr/local/opt/openssl/lib']
libraries = [
  'ssl',
  'crypto',
  'pthread',
  'm',
  'z'
  ]

################################################################################
# PLATFORM SPECIFIC BUILD SETTINGS
################################################################################

if DARWIN:
    # ---------------------------------------------------------------------------
    # Mac Specific Compiler and Linker Settings
    # ---------------------------------------------------------------------------
    extra_compile_args = extra_compile_args + [
        '-D_DARWIN_UNLIMITED_SELECT',
        '-DMARCH_x86_64'
        ]

    if AEROSPIKE_C_HOME:
        PREFIX = AEROSPIKE_C_HOME + '/target/Darwin-x86_64'

elif LINUX:
    # ---------------------------------------------------------------------------
    # Linux Specific Compiler and Linker Settings
    # ---------------------------------------------------------------------------
    extra_compile_args = extra_compile_args + [
        '-rdynamic', '-finline-functions',
        '-DMARCH_x86_64'
        ]
    libraries = libraries + ['rt']
    if AEROSPIKE_C_HOME:
        PREFIX = AEROSPIKE_C_HOME + '/target/Linux-x86_64'
else:
    print("error: OS not supported:", PLATFORM, file=sys.stderr)
    sys.exit(8)

################################################################################
# RESOLVE C CLIENT DEPENDENCY AND LUA SYSTEM PATH
################################################################################

lua_system_path = ''

# If the C client is packaged elsewhere, assume the libraries are available
lua_src_path = "modules/aerospike-lua-core/src"

if os.environ.get('NO_RESOLVE_C_CLIENT_DEP', None):
    has_c_client = True
    libraries = libraries + ['aerospike']
    lua_src_path = os.environ.get('AEROSPIKE_LUA_PATH', lua_src_path)
else:
    has_c_client = False

lua_files = [
                lua_src_path + '/aerospike.lua',
                lua_src_path + '/as.lua',
                lua_src_path + '/stream_ops.lua'
            ]

for file in lua_files:
    if not os.path.isfile(file):
        print("Warning: lua file {} not found, exiting".format(file), file=sys.stderr)
        sys.exit(4)

# If system-path isn't specified this will install relative to sys.exec_prefix
data_files = [
    ('aerospike/lua', lua_files)
]

if not has_c_client:
    if (('build' in sys.argv or 'build_ext' in sys.argv or
         'install' in sys.argv or 'bdist_wheel' in sys.argv)):
        resolve_c_client(lua_src_path)

################################################################################
# SETUP
################################################################################

# Get the long description from the relevant file
with open(os.path.join(CWD, 'README.rst')) as f:
    long_description = f.read()

# Get the version from the relevant file
with open(os.path.join(CWD, 'VERSION')) as f:
    version = f.read()

setup(
    cmdclass={
        'build': BuildCommand,
        'install': InstallCommand,
    },
    name='aerospike',
    version=version.strip(),
    description='Aerospike Client Library for Python',
    long_description=long_description,
    author='Aerospike, Inc.',
    author_email='info@aerospike.com',
    url='http://aerospike.com',
    license='Apache Software License',
    keywords=['aerospike', 'nosql', 'database'],
    classifiers=[
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX :: Linux',
        'Operating System :: MacOS :: MacOS X',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Topic :: Database'
    ],

    # Package Data Files
    zip_safe=False,
    include_package_data=True,
    package_data={
        'aerospike': [
            lua_src_path + '/*.lua',
        ]
    },

    # Data files
    data_files=data_files,
    ext_modules=[
        Extension(
            # Extension Name
            'aerospike',

            # Source Files
            [
                'src/main/aerospike.c',
                'src/main/exception.c',
                'src/main/log.c',
                'src/main/client/type.c',
                'src/main/client/apply.c',
                'src/main/client/close.c',
                'src/main/client/connect.c',
                'src/main/client/exists.c',
                'src/main/client/exists_many.c',
                'src/main/client/get.c',
                'src/main/client/get_many.c',
                'src/main/client/select_many.c',
                'src/main/client/info_node.c',
                'src/main/client/info.c',
                'src/main/client/put.c',
                'src/main/client/operate_list.c',
                'src/main/client/operate_map.c',
                'src/main/client/operate.c',
                'src/main/client/query.c',
                'src/main/client/remove.c',
                'src/main/client/scan.c',
                'src/main/client/select.c',
                'src/main/client/tls_info_host.c',
                'src/main/client/truncate.c',
                'src/main/client/admin.c',
                'src/main/client/udf.c',
                'src/main/client/sec_index.c',
                'src/main/serializer.c',
                'src/main/client/remove_bin.c',
                'src/main/client/get_key_digest.c',
                'src/main/query/type.c',
                'src/main/query/apply.c',
                'src/main/query/foreach.c',
                'src/main/query/results.c',
                'src/main/query/select.c',
                'src/main/query/where.c',
                'src/main/scan/type.c',
                'src/main/scan/foreach.c',
                'src/main/scan/results.c',
                'src/main/scan/select.c',
                'src/main/geospatial/type.c',
                'src/main/geospatial/wrap.c',
                'src/main/geospatial/unwrap.c',
                'src/main/geospatial/loads.c',
                'src/main/geospatial/dumps.c',
                'src/main/conversions.c',
                'src/main/policy.c',
                'src/main/policy_config.c',
                'src/main/calc_digest.c',
                'src/main/predicates.c',
                'src/main/tls_config.c',
                'src/main/global_hosts/type.c',
                'src/main/nullobject/type.c',
            ],

            # Compile
            include_dirs=include_dirs,
            extra_compile_args=extra_compile_args,

            # Link
            library_dirs=library_dirs,
            libraries=libraries,
            extra_objects=extra_objects,
            extra_link_args=extra_link_args,
        )
    ]
)
<|endoftext|>


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

from io import open
import os
import re
import shutil
import sys

from setuptools import setup, find_packages

init_py = open(os.path.join('rest_framework_simplejwt', '__init__.py')).read()
version = re.search(r'''^__version__ = ['"]([^'"]+)['"]$''', init_py).group(1)

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

setup(
    name='djangorestframework_simplejwt',
    version=version,
    url='https://github.com/davesque/django-rest-framework-simplejwt',
    license='MIT',
    description='A bare-bones JSON Web Token authentication plugin for Django REST Framework',
    long_description=open('README.rst', 'r', encoding='utf-8').read(),
    author='David Sanders',
    author_email='davesque@gmail.com',
    packages=find_packages(exclude=['tests', 'licenses', 'requirements']),
    install_requires=['django', 'djangorestframework', 'python-jose'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Framework :: Django :: 1.8',
        'Framework :: Django :: 1.9',
        'Framework :: Django :: 1.10',
        'Framework :: Django :: 1.11',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
<commit_msg>Get rid of redundant classifiers<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from io import open
import os
import re
import shutil
import sys

from setuptools import setup, find_packages

init_py = open(os.path.join('rest_framework_simplejwt', '__init__.py')).read()
version = re.search(r'''^__version__ = ['"]([^'"]+)['"]$''', init_py).group(1)

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

setup(
    name='djangorestframework_simplejwt',
    version=version,
    url='https://github.com/davesque/django-rest-framework-simplejwt',
    license='MIT',
    description='A bare-bones JSON Web Token authentication plugin for Django REST Framework',
    long_description=open('README.rst', 'r', encoding='utf-8').read(),
    author='David Sanders',
    author_email='davesque@gmail.com',
    packages=find_packages(exclude=['tests', 'licenses', 'requirements']),
    install_requires=['django', 'djangorestframework', 'python-jose'],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from __future__ import print_function

import os
import sys
import subprocess

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

# much of the inspiration for this setup file has come from pyne (pyne.io)

# Thanks to http://patorjk.com/software/taag/
cyclopts_logo = r"""
   ___           _             _
  / __\   _  ___| | ___  _ __ | |_ ___
 / / | | | |/ __| |/ _ \| '_ \| __/ __|
/ /__| |_| | (__| | (_) | |_) | |_\__ \
\____/\__, |\___|_|\___/| .__/ \__|___/
      |___/             |_|
"""

INFO = {
    'version': '0.0.1',
    }

def parse_args():
    distutils_args = []
    cmake = []
    make = []
    argsets = [distutils_args, cmake, make]
    i = 0
    for arg in sys.argv:
        if arg == '--':
            i += 1
        else:
            argsets[i].append(arg)
    hdf5opt = [o.split('=')[1] for o in distutils_args if o.startswith('--hdf5=')]
    if 0 < len(hdf5opt):
        os.environ['HDF5_ROOT'] = hdf5opt[0]  # Expose to CMake
        distutils_args = [o for o in distutils_args if not o.startswith('--hdf5=')]
    # Change egg-base entry to absolute path so it behaves as expected
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('--egg-base')
    res, distutils_args = parser.parse_known_args(distutils_args)
    if res.egg_base is not None:
        local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
        distutils_args.append('--egg-base='+os.path.join(local_path, res.egg_base))
    return distutils_args, cmake, make

def cyclopts_setup():

    scripts_dir = \
        os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts')
    scripts = [os.path.join(scripts_dir, f)
               for f in os.listdir(scripts_dir)]

    packages = ['cyclopts']
    pack_dir = {
        'cyclopts': 'cyclopts',
        }
    extpttn = ['*.dll', '*.so', '*.dylib', '*.pyd', '*.pyo']
    pack_data = {
        'cyclopts': ['*.pxd', 'include/*.h', 'include/*.pxi',] + extpttn,
        }
    setup_kwargs = {
        "name": "cyclopts",
        "version": INFO['version'],
        "description": 'The Cyclus Optimization Analysis Package',
        "author": 'Matthew Gidden',
        "author_email": 'matthew.gidden@gmail.com',
        "url": 'http://github.com/gidden/cyclopts',
        "packages": packages,
        "package_dir": pack_dir,
        "package_data": pack_data,
        "scripts": scripts,
        "zip_safe": False,
        }
    rtn = setup(**setup_kwargs)

def final_message(success=True):
    if success:
        return

    msg = "\n\nUSAGE: "
    "python setup.py <distutils-args> [-- <cmake-arg>] [-- <make-args>]\n"
    "CMake and make command line arguments are optional, but must be preceeded "
    "by '--'.\n"

    print(msg)

def main_body():
    if not os.path.exists('build'):
        os.mkdir('build')
    sys.argv, cmake_args, make_args = parse_args()
    makefile = os.path.join('build', 'Makefile')
    if not os.path.exists(makefile):
        rtn = subprocess.call(['which', 'cmake'])
        if rtn != 0:
            sys.exit('CMake is not installed, aborting Cyclopts build.')
        cmake_cmd = ['cmake', '..'] + cmake_args
        cmake_cmd += ['-DPYTHON_EXECUTABLE=' + sys.executable, ]
        rtn = subprocess.check_call(cmake_cmd, cwd='build',
                                    shell=(os.name=='nt'))
    rtn = subprocess.check_call(['make'] + make_args, cwd='build')
    cwd = os.getcwd()
    os.chdir('build')
    cyclopts_setup()
    os.chdir(cwd)

def main():
    success = False
    print(cyclopts_logo)
    try:
        main_body()
        success = True
    finally:
        final_message(success)

if __name__ == "__main__":
    main()

<commit_msg>version bump to 0.0.2<commit_after>#!/usr/bin/env python
from __future__ import print_function

import os
import sys
import subprocess

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

# much of the inspiration for this setup file has come from pyne (pyne.io)

# Thanks to http://patorjk.com/software/taag/
cyclopts_logo = r"""
   ___           _             _
  / __\   _  ___| | ___  _ __ | |_ ___
 / / | | | |/ __| |/ _ \| '_ \| __/ __|
/ /__| |_| | (__| | (_) | |_) | |_\__ \
\____/\__, |\___|_|\___/| .__/ \__|___/
      |___/             |_|
"""

INFO = {
    'version': '0.0.2',
    }

def parse_args():
    distutils_args = []
    cmake = []
    make = []
    argsets = [distutils_args, cmake, make]
    i = 0
    for arg in sys.argv:
        if arg == '--':
            i += 1
        else:
            argsets[i].append(arg)
    hdf5opt = [o.split('=')[1] for o in distutils_args if o.startswith('--hdf5=')]
    if 0 < len(hdf5opt):
        os.environ['HDF5_ROOT'] = hdf5opt[0]  # Expose to CMake
        distutils_args = [o for o in distutils_args if not o.startswith('--hdf5=')]
    # Change egg-base entry to absolute path so it behaves as expected
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('--egg-base')
    res, distutils_args = parser.parse_known_args(distutils_args)
    if res.egg_base is not None:
        local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
        distutils_args.append('--egg-base='+os.path.join(local_path, res.egg_base))
    return distutils_args, cmake, make

def cyclopts_setup():

    scripts_dir = \
        os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts')
    scripts = [os.path.join(scripts_dir, f)
               for f in os.listdir(scripts_dir)]

    packages = ['cyclopts']
    pack_dir = {
        'cyclopts': 'cyclopts',
        }
    extpttn = ['*.dll', '*.so', '*.dylib', '*.pyd', '*.pyo']
    pack_data = {
        'cyclopts': ['*.pxd', 'include/*.h', 'include/*.pxi',] + extpttn,
        }
    setup_kwargs = {
        "name": "cyclopts",
        "version": INFO['version'],
        "description": 'The Cyclus Optimization Analysis Package',
        "author": 'Matthew Gidden',
        "author_email": 'matthew.gidden@gmail.com',
        "url": 'http://github.com/gidden/cyclopts',
        "packages": packages,
        "package_dir": pack_dir,
        "package_data": pack_data,
        "scripts": scripts,
        "zip_safe": False,
        }
    rtn = setup(**setup_kwargs)

def final_message(success=True):
    if success:
        return

    msg = "\n\nUSAGE: "
    "python setup.py <distutils-args> [-- <cmake-arg>] [-- <make-args>]\n"
    "CMake and make command line arguments are optional, but must be preceeded "
    "by '--'.\n"

    print(msg)

def main_body():
    if not os.path.exists('build'):
        os.mkdir('build')
    sys.argv, cmake_args, make_args = parse_args()
    makefile = os.path.join('build', 'Makefile')
    if not os.path.exists(makefile):
        rtn = subprocess.call(['which', 'cmake'])
        if rtn != 0:
            sys.exit('CMake is not installed, aborting Cyclopts build.')
        cmake_cmd = ['cmake', '..'] + cmake_args
        cmake_cmd += ['-DPYTHON_EXECUTABLE=' + sys.executable, ]
        rtn = subprocess.check_call(cmake_cmd, cwd='build',
                                    shell=(os.name=='nt'))
    rtn = subprocess.check_call(['make'] + make_args, cwd='build')
    cwd = os.getcwd()
    os.chdir('build')
    cyclopts_setup()
    os.chdir(cwd)

def main():
    success = False
    print(cyclopts_logo)
    try:
        main_body()
        success = True
    finally:
        final_message(success)

if __name__ == "__main__":
    main()

<|endoftext|>


<commit_before># Copyright 2016 Raytheon BBN Technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0

__all__ = ['YokogawaGS200']

from auspex.log import logger
from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, RampCommand, BoolCommand

class YokogawaGS200(SCPIInstrument):
    """YokogawaGS200 Current source"""
    instrument_type = "Current source"

    mode               = StringCommand(scpi_string=":source:function",
                          value_map={"current": "CURR", "voltage": "VOLT"})
    level              = FloatCommand(scpi_string=":source:level", aliases=['value'])
    output_range       = FloatCommand(scpi_string=":source:range")
    protection_volts   = FloatCommand(scpi_string=":source:protection:voltage")
    protection_current = FloatCommand(scpi_string=":source:protection:current")
    sense              = BoolCommand(scpi_string=":sense:state", value_map={True: "1", False: "0"})
    output             = BoolCommand(scpi_string=":output:state", value_map={True: "1", False: "0"})
    sense_value        = FloatCommand(get_string=":fetch?")
    averaging_nplc     = IntCommand(scpi_string=":sense:nplc") # Number of power level cycles (60Hz)
    ramp               = RampCommand(increment=1e-4, pause=20e-3, scpi_string=":source:level", value_range=(-100e-3,100e-3))

    def __init__(self, resource_name=None, *args, **kwargs):
        super(YokogawaGS200, self).__init__(resource_name, *args, **kwargs)

    def connect(self, resource_name=None, interface_type="VISA"):
        if resource_name is not None:
            self.resource_name = resource_name

        super(YokogawaGS200, self).connect(resource_name=self.resource_name, interface_type=interface_type)
        self.interface.write(":sense:trigger immediate")
        self.interface._resource._read_termination = u"\n"
<commit_msg>Added read termination<commit_after># Copyright 2016 Raytheon BBN Technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0

__all__ = ['YokogawaGS200']

from auspex.log import logger
from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, RampCommand, BoolCommand

class YokogawaGS200(SCPIInstrument):
    """YokogawaGS200 Current source"""
    instrument_type = "Current source"

    mode               = StringCommand(scpi_string=":source:function",
                          value_map={"current": "CURR", "voltage": "VOLT"})
    level              = FloatCommand(scpi_string=":source:level", aliases=['value'])
    output_range       = FloatCommand(scpi_string=":source:range")
    protection_volts   = FloatCommand(scpi_string=":source:protection:voltage")
    protection_current = FloatCommand(scpi_string=":source:protection:current")
    sense              = BoolCommand(scpi_string=":sense:state", value_map={True: "1", False: "0"})
    output             = BoolCommand(scpi_string=":output:state", value_map={True: "1", False: "0"})
    sense_value        = FloatCommand(get_string=":fetch?")
    averaging_nplc     = IntCommand(scpi_string=":sense:nplc") # Number of power level cycles (60Hz)
    ramp               = RampCommand(increment=1e-4, pause=20e-3, scpi_string=":source:level", value_range=(-100e-3,100e-3))

    def __init__(self, resource_name=None, *args, **kwargs):
        super(YokogawaGS200, self).__init__(resource_name, *args, **kwargs)

    def connect(self, resource_name=None, interface_type="VISA"):
        if resource_name is not None:
            self.resource_name = resource_name

        super(YokogawaGS200, self).connect(resource_name=self.resource_name, interface_type=interface_type)
        self.interface.write(":sense:trigger immediate")
        self.interface._resource._read_termination = "\n"
        self.interface._resource.write_termination = "\n"
<|endoftext|>


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

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

setup(
    name="foamPy",
    version=__version__,
    author="Pete Bachant",
    author_email="petebachant@gmail.com",
    packages=["foampy"],
    scripts=["scripts/foampy-progress-gui",
             "scripts/foampy-progress",
             "scripts/foampy-load-surfaces",
             "scripts/pvloadsurf.py",
             "scripts/foampy-reformat-foildata",
             "scripts/foampy-mirror-foildata"],
    url="https://github.com/petebachant/foamPy.git",
    license="MIT",
    description="Python package for working with OpenFOAM.",
    long_description=open("README.md").read(),
    install_requires=["numpy"],
    classifiers=[
        "Development Status :: 2 - Pre-Alpha",
        "Intended Audience :: Science/Research",
        "Natural Language :: English",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Topic :: Scientific/Engineering :: Physics"],
)
<commit_msg>Remove install_requires from setup.py<commit_after>#!/usr/bin/env python
# coding=utf-8

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

setup(
    name="foamPy",
    version=__version__,
    author="Pete Bachant",
    author_email="petebachant@gmail.com",
    packages=["foampy"],
    scripts=["scripts/foampy-progress-gui",
             "scripts/foampy-progress",
             "scripts/foampy-load-surfaces",
             "scripts/pvloadsurf.py",
             "scripts/foampy-reformat-foildata",
             "scripts/foampy-mirror-foildata"],
    url="https://github.com/petebachant/foamPy.git",
    license="MIT",
    description="Python package for working with OpenFOAM.",
    long_description=open("README.md").read(),
    install_requires=[],
    classifiers=[
        "Development Status :: 2 - Pre-Alpha",
        "Intended Audience :: Science/Research",
        "Natural Language :: English",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Topic :: Scientific/Engineering :: Physics"],
)
<|endoftext|>


<commit_before>import sys
from os import path, listdir

from setuptools import find_packages
from sslyze import __author__, __email__, __version__, PROJECT_URL

# Setup file based on https://github.com/pypa/sampleproject/blob/master/setup.py
root_path = path.abspath(path.dirname(__file__))

# For cx_freeze builds, we need a special setup() function
if len(sys.argv) > 1 and sys.argv[1] == "build_exe":
    from cx_Freeze import setup
    from cx_Freeze import Executable
else:
    from setuptools import setup

    # Create fake Executable that does nothing so the setup.py file can be used on Linux
    class Executable:
        def __init__(self, script, targetName):
            pass

def get_long_description():
    """Convert the README file into the long description.
    """
    with open(path.join(root_path, "README.md"), encoding="utf-8") as f:
        long_description = f.read()
    return long_description

def get_include_files():
    """"Get the list of trust stores so they properly packaged when doing a cx_freeze build.
    """
    plugin_data_files = []
    trust_stores_pem_path = path.join(root_path, "sslyze", "plugins", "certificate_info", "trust_stores", "pem_files")
    for file in listdir(trust_stores_pem_path):
        file = path.join(trust_stores_pem_path, file)
        if path.isfile(file):  # skip directories
            filename = path.basename(file)
            plugin_data_files.append((file, path.join("pem_files", filename)))
    return plugin_data_files

setup(
    name="sslyze",
    version=__version__,
    description="Fast and powerful SSL/TLS server scanning library",
    python_requires=">=3.6",
    # Pypi metadata
    long_description=get_long_description(),
    long_description_content_type="text/markdown",
    url=PROJECT_URL,
    author=__author__,
    author_email=__email__,
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "Natural Language :: French",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        "Programming Language :: Python :: 3.6",
        "Topic :: System :: Networking",
        "Topic :: System :: Monitoring",
        "Topic :: System :: Networking :: Monitoring",
        "Topic :: Security",
    ],
    keywords="ssl tls scan security library",
    project_urls={
        "Source": "https://github.com/nabla-c0d3/sslyze",
        "Changelog": "https://github.com/nabla-c0d3/sslyze/releases",
        "Documentation": "https://nabla-c0d3.github.io/sslyze/documentation",
    },
    # Package info
    packages=find_packages(exclude=["docs", "tests"]),
    package_data={"sslyze.plugins.certificate_info.trust_stores": ["pem_files/*.pem", "pem_files/*.yaml"]},
    entry_points={"console_scripts": ["sslyze = sslyze.__main__:main"]},
    # Dependencies
    install_requires=[
        "nassl>=2.2.0,<2.3.0",
        "cryptography==2.5",
        "tls-parser>=1.2.0,<1.3.0",
        "dataclasses ; python_version<'3.7'",  # To remove when we drop support for Python 3.6
    ],
    # cx_freeze info for Windows builds with Python embedded
    options={"build_exe": {"packages": ["cffi", "cryptography", "idna"], "include_files": get_include_files()}},
    executables=[Executable(path.join("sslyze", "__main__.py"), targetName="sslyze.exe")],
)
<commit_msg>Fix types<commit_after>import sys
from os import path, listdir
from pathlib import Path
from typing import List, Tuple

from setuptools import find_packages
from sslyze import __author__, __email__, __version__, PROJECT_URL

# Setup file based on https://github.com/pypa/sampleproject/blob/master/setup.py
root_path = Path(__file__).parent.absolute()

# For cx_freeze builds, we need a special setup() function
if len(sys.argv) > 1 and sys.argv[1] == "build_exe":
    from cx_Freeze import setup
    from cx_Freeze import Executable
else:
    from setuptools import setup

    # Create fake Executable that does nothing so the setup.py file can be used on Linux
    class Executable:  # type: ignore
        def __init__(self, script, targetName):  # type: ignore
            pass

def get_long_description() -> str:
    path_to_readme = root_path / "README.md"
    return path_to_readme.read_text()

def get_include_files() -> List[Tuple[str, str]]:
    """"Get the list of trust stores so they properly packaged when doing a cx_freeze build.
    """
    plugin_data_files = []
    trust_stores_pem_path = root_path / "sslyze" / "plugins" / "certificate_info" / "trust_stores" / "pem_files"
    for file in listdir(trust_stores_pem_path):
        file = path.join(trust_stores_pem_path, file)
        if path.isfile(file):  # skip directories
            filename = path.basename(file)
            plugin_data_files.append((file, path.join("pem_files", filename)))
    return plugin_data_files

setup(
    name="sslyze",
    version=__version__,
    description="Fast and powerful SSL/TLS server scanning library",
    python_requires=">=3.6",
    # Pypi metadata
    long_description=get_long_description(),
    long_description_content_type="text/markdown",
    url=PROJECT_URL,
    author=__author__,
    author_email=__email__,
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: System Administrators",
        "Natural Language :: French",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        "Programming Language :: Python :: 3.6",
        "Topic :: System :: Networking",
        "Topic :: System :: Monitoring",
        "Topic :: System :: Networking :: Monitoring",
        "Topic :: Security",
    ],
    keywords="ssl tls scan security library",
    project_urls={
        "Source": "https://github.com/nabla-c0d3/sslyze",
        "Changelog": "https://github.com/nabla-c0d3/sslyze/releases",
        "Documentation": "https://nabla-c0d3.github.io/sslyze/documentation",
    },
    # Package info
    packages=find_packages(exclude=["docs", "tests"]),
    package_data={"sslyze.plugins.certificate_info.trust_stores": ["pem_files/*.pem", "pem_files/*.yaml"]},
    entry_points={"console_scripts": ["sslyze = sslyze.__main__:main"]},
    # Dependencies
    install_requires=[
        "nassl>=2.2.0,<2.3.0",
        "cryptography==2.5",
        "tls-parser>=1.2.0,<1.3.0",
        "dataclasses ; python_version<'3.7'",  # To remove when we drop support for Python 3.6
    ],
    # cx_freeze info for Windows builds with Python embedded
    options={"build_exe": {"packages": ["cffi", "cryptography", "idna"], "include_files": get_include_files()}},
    executables=[Executable(path.join("sslyze", "__main__.py"), targetName="sslyze.exe")],
)
<|endoftext|>


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

import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import pytest
        errcode = pytest.main(self.test_args)
        sys.exit(errcode)

setup(name='pandas-summary',
      version='0.0.5',
      description='An extension to pandas describe function.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mouradmourafiq@gmail.com',
      url='https://github.com/mouradmourafiq/pandas-summary',
      license='MIT',
      platforms='any',
      packages=['pandas_summary'],
      keywords=['pandas', 'data analysis', 'machine learning'],
      install_requires=[
          'numpy',
          'pandas',
      ],
      classifiers=[
        'Programming Language :: Python',
        'Operating System :: OS Independent',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<commit_msg>Bump version to 0.0.6<commit_after>#!/usr/bin/env python

import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import pytest
        errcode = pytest.main(self.test_args)
        sys.exit(errcode)

setup(name='pandas-summary',
      version='0.0.6',
      description='An extension to pandas describe function.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mouradmourafiq@gmail.com',
      url='https://github.com/mouradmourafiq/pandas-summary',
      license='MIT',
      platforms='any',
      packages=['pandas_summary'],
      keywords=['pandas', 'data analysis', 'machine learning'],
      install_requires=[
          'numpy',
          'pandas',
      ],
      classifiers=[
        'Programming Language :: Python',
        'Operating System :: OS Independent',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<|endoftext|>


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

from distutils.core import setup

setup(name='hpswitch',
        version='0.1',
        description="A library for interacting with HP Networking switches",
        packages=['hpswitch', ],
        url='https://github.com/leonhandreke/hpswitch',
        license="MIT License",
        requires=['pysnmp']
        )
<commit_msg>Specify requirements with install_requires<commit_after>#!/usr/bin/env python

from distutils.core import setup

setup(name='hpswitch',
        version='0.1',
        description="A library for interacting with HP Networking switches",
        packages=['hpswitch', ],
        url='https://github.com/leonhandreke/hpswitch',
        license="MIT License",
        install_requires=['pysnmp>=4.2.3', 'pysnmp-mibs>=0.1.4']
        )
<|endoftext|>


<commit_before>#!/usr/bin/env python
#
# Distribute setup script for the Natural Language Toolkit
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
#         Edward Loper <edloper@gradient.cis.upenn.edu>
#         Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT

# python2.5 compatibility
from __future__ import with_statement

import os

# Use the VERSION file to get NLTK version
version_file = os.path.join(os.path.dirname(__file__), 'nltk', 'VERSION')
with open(version_file) as fh:
    nltk_version = fh.read().strip()

import distribute_setup
distribute_setup.use_setuptools()

from setuptools import setup, find_packages

#
# Prevent setuptools from trying to add extra files to the source code
# manifest by scanning the version control system for its contents.
#
from setuptools.command import sdist
del sdist.finders[:]

setup(
    name = "nltk",
    description = "Natural Language Toolkit",
    version = nltk_version,
    url = "http://nltk.org/",
    long_description = """\
The Natural Language Toolkit (NLTK) is a Python package for
natural language processing.  NLTK requires Python 2.5 or higher.""",
    license = "Apache License, Version 2.0",
    keywords = ['NLP', 'CL', 'natural language processing',
                'computational linguistics', 'parsing', 'tagging',
                'tokenizing', 'syntax', 'linguistics', 'language',
                'natural language', 'text analytics'],
    maintainer = "Steven Bird",
    maintainer_email = "stevenbird1@gmail.com",
    author = "Steven Bird",
    author_email = "stevenbird1@gmail.com",
    classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Intended Audience :: Developers',
    'Intended Audience :: Education',
    'Intended Audience :: Information Technology',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: Apache Software License',
    'Operating System :: OS Independent',
    'Programming Language :: Python :: 2.6',
    'Programming Language :: Python :: 2.7',
    'Topic :: Scientific/Engineering',
    'Topic :: Scientific/Engineering :: Artificial Intelligence',
    'Topic :: Scientific/Engineering :: Human Machine Interfaces',
    'Topic :: Scientific/Engineering :: Information Analysis',
    'Topic :: Text Processing',
    'Topic :: Text Processing :: Filters',
    'Topic :: Text Processing :: General',
    'Topic :: Text Processing :: Indexing',
    'Topic :: Text Processing :: Linguistic',
    ],
    package_data = {'nltk': ['nltk.jar', 'test/*.doctest', 'VERSION']},
    packages = find_packages(),
    zip_safe=False, # since normal files will be present too?
    install_requires=['PyYAML>=3.09'],
    )
<commit_msg>workaround for mbcs bug in distutils, from http://python.6.n6.nabble.com/distutils-bdist-wininst-failure-on-Linux-td4498729.html<commit_after>#!/usr/bin/env python
#
# Distribute setup script for the Natural Language Toolkit
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
#         Edward Loper <edloper@gradient.cis.upenn.edu>
#         Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT

# python2.5 compatibility
from __future__ import with_statement

# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
    codecs.lookup('mbcs')
except LookupError:
    ascii = codecs.lookup('ascii')
    func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
    codecs.register(func)

import os

# Use the VERSION file to get NLTK version
version_file = os.path.join(os.path.dirname(__file__), 'nltk', 'VERSION')
with open(version_file) as fh:
    nltk_version = fh.read().strip()

import distribute_setup
distribute_setup.use_setuptools()

from setuptools import setup, find_packages

#
# Prevent setuptools from trying to add extra files to the source code
# manifest by scanning the version control system for its contents.
#
from setuptools.command import sdist
del sdist.finders[:]

setup(
    name = "nltk",
    description = "Natural Language Toolkit",
    version = nltk_version,
    url = "http://nltk.org/",
    long_description = """\
The Natural Language Toolkit (NLTK) is a Python package for
natural language processing.  NLTK requires Python 2.5 or higher.""",
    license = "Apache License, Version 2.0",
    keywords = ['NLP', 'CL', 'natural language processing',
                'computational linguistics', 'parsing', 'tagging',
                'tokenizing', 'syntax', 'linguistics', 'language',
                'natural language', 'text analytics'],
    maintainer = "Steven Bird",
    maintainer_email = "stevenbird1@gmail.com",
    author = "Steven Bird",
    author_email = "stevenbird1@gmail.com",
    classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Intended Audience :: Developers',
    'Intended Audience :: Education',
    'Intended Audience :: Information Technology',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: Apache Software License',
    'Operating System :: OS Independent',
    'Programming Language :: Python :: 2.6',
    'Programming Language :: Python :: 2.7',
    'Topic :: Scientific/Engineering',
    'Topic :: Scientific/Engineering :: Artificial Intelligence',
    'Topic :: Scientific/Engineering :: Human Machine Interfaces',
    'Topic :: Scientific/Engineering :: Information Analysis',
    'Topic :: Text Processing',
    'Topic :: Text Processing :: Filters',
    'Topic :: Text Processing :: General',
    'Topic :: Text Processing :: Indexing',
    'Topic :: Text Processing :: Linguistic',
    ],
    package_data = {'nltk': ['nltk.jar', 'test/*.doctest', 'VERSION']},
    packages = find_packages(),
    zip_safe=False, # since normal files will be present too?
    install_requires=['PyYAML>=3.09'],
    )
<|endoftext|>


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

import io
import os

import setuptools

# Package metadata.

name = 'google-cloud-webrisk'
description = 'Google Cloud Web Risk API client library'
version = '0.1.0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
    'google-api-core[grpc] >= 1.6.0, < 2.0.0dev',
]
extras = {
}

# Setup boilerplate below this line.

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

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

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

# Determine which namespaces are needed.
namespaces = ['google']
if 'google.cloud' in packages:
    namespaces.append('google.cloud')

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

import io
import os

import setuptools

# Package metadata.

name = 'google-cloud-webrisk'
description = 'Google Cloud Web Risk API client library'
version = '0.1.0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
# 'Development Status :: 5 - Production/Stable'
release_status = 'Development Status :: 3 - Alpha'
dependencies = [
    'google-api-core[grpc] >= 1.14.0, < 2.0.0dev',
]
extras = {
}

# Setup boilerplate below this line.

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

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

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

# Determine which namespaces are needed.
namespaces = ['google']
if 'google.cloud' in packages:
    namespaces.append('google.cloud')

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


<commit_before>#!/usr/bin/env python
"""Distutils setup file, used to install or test 'setuptools'"""
import io
import os
import sys
import textwrap

# Allow to run setup.py from another directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))

src_root = None

from distutils.util import convert_path

command_ns = {}
init_path = convert_path('setuptools/command/__init__.py')
with open(init_path) as init_file:
    exec(init_file.read(), command_ns)

SETUP_COMMANDS = command_ns['__all__']

main_ns = {}
ver_path = convert_path('setuptools/version.py')
with open(ver_path) as ver_file:
    exec(ver_file.read(), main_ns)

import setuptools
from setuptools.command.build_py import build_py as _build_py
from setuptools.command.test import test as _test

scripts = []

def _gen_console_scripts():
    yield "easy_install = setuptools.command.easy_install:main"

    # Gentoo distributions manage the python-version-specific scripts
    # themselves, so those platforms define an environment variable to
    # suppress the creation of the version-specific scripts.
    var_names = (
        'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
        'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
    )
    if any(os.environ.get(var) not in (None, "", "0") for var in var_names):
        return
    yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
        .format(shortver=sys.version[:3]))

console_scripts = list(_gen_console_scripts())

# specific command that is used to generate windows .exe files
class build_py(_build_py):
    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                srcfile = os.path.join(src_dir, filename)
                outf, copied = self.copy_file(srcfile, target)
                srcfile = os.path.abspath(srcfile)

class test(_test):
    """Specific test class to avoid rewriting the entry_points.txt"""
    def run(self):
        entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt')

        if not os.path.exists(entry_points):
            _test.run(self)
            return # even though _test.run will raise SystemExit

        # save the content
        with open(entry_points) as f:
            ep_content = f.read()

        # run the test
        try:
            _test.run(self)
        finally:
            # restore the file
            with open(entry_points, 'w') as f:
                f.write(ep_content)

readme_file = io.open('README.txt', encoding='utf-8')

# the release script adds hyperlinks to issues
if os.path.exists('CHANGES (links).txt'):
    changes_file = open('CHANGES (links).txt')
else:
    # but if the release script has not run, fall back to the source file
    changes_file = open('CHANGES.txt')
with readme_file:
    with changes_file:
        long_description = readme_file.read() + '\n' + changes_file.read()

package_data = {'setuptools': ['site-patch.py']}
force_windows_specific_files = (
    os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES")
    not in (None, "", "0")
)
if sys.platform == 'win32' or force_windows_specific_files:
    package_data.setdefault('setuptools', []).extend(['*.exe'])
    package_data.setdefault('setuptools.command', []).extend(['*.xml'])

setup_params = dict(
    name="setuptools",
    version=main_ns['__version__'],
    description="Easily download, build, install, upgrade, and uninstall "
                "Python packages",
    author="Python Packaging Authority",
    author_email="distutils-sig@python.org",
    license="PSF or ZPL",
    long_description = long_description,
    keywords = "CPAN PyPI distutils eggs package management",
    url = "https://pypi.python.org/pypi/setuptools",
    test_suite = 'setuptools.tests',
    src_root = src_root,
    packages = setuptools.find_packages(),
    package_data = package_data,

    py_modules = ['pkg_resources', 'easy_install'],

    zip_safe = (sys.version>="2.5"),   # <2.5 needs unzipped for -m to work

    cmdclass = {'test': test},
    entry_points = {
        "distutils.commands": [
            "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
            for cmd in SETUP_COMMANDS
        ],
        "distutils.setup_keywords": [
            "eager_resources        = setuptools.dist:assert_string_list",
            "namespace_packages     = setuptools.dist:check_nsp",
            "extras_require         = setuptools.dist:check_extras",
            "install_requires       = setuptools.dist:check_requirements",
            "tests_require          = setuptools.dist:check_requirements",
            "entry_points           = setuptools.dist:check_entry_points",
            "test_suite             = setuptools.dist:check_test_suite",
            "zip_safe               = setuptools.dist:assert_bool",
            "package_data           = setuptools.dist:check_package_data",
            "exclude_package_data   = setuptools.dist:check_package_data",
            "include_package_data   = setuptools.dist:assert_bool",
            "packages               = setuptools.dist:check_packages",
            "dependency_links       = setuptools.dist:assert_string_list",
            "test_loader            = setuptools.dist:check_importable",
            "use_2to3               = setuptools.dist:assert_bool",
            "convert_2to3_doctests  = setuptools.dist:assert_string_list",
            "use_2to3_fixers        = setuptools.dist:assert_string_list",
            "use_2to3_exclude_fixers = setuptools.dist:assert_string_list",
        ],
        "egg_info.writers": [
            "PKG-INFO = setuptools.command.egg_info:write_pkg_info",
            "requires.txt = setuptools.command.egg_info:write_requirements",
            "entry_points.txt = setuptools.command.egg_info:write_entries",
            "eager_resources.txt = setuptools.command.egg_info:overwrite_arg",
            "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg",
            "top_level.txt = setuptools.command.egg_info:write_toplevel_names",
            "depends.txt = setuptools.command.egg_info:warn_depends_obsolete",
            "dependency_links.txt = setuptools.command.egg_info:overwrite_arg",
        ],
        "console_scripts": console_scripts,

        "setuptools.file_finders":
            ["svn_cvs = setuptools.command.sdist:_default_revctrl"],

        "setuptools.installation":
            ['eggsecutable = setuptools.command.easy_install:bootstrap'],
    },

    classifiers = textwrap.dedent("""
        Development Status :: 5 - Production/Stable
        Intended Audience :: Developers
        License :: OSI Approved :: Python Software Foundation License
        License :: OSI Approved :: Zope Public License
        Operating System :: OS Independent
        Programming Language :: Python :: 2.6
        Programming Language :: Python :: 2.7
        Programming Language :: Python :: 3
        Programming Language :: Python :: 3.1
        Programming Language :: Python :: 3.2
        Programming Language :: Python :: 3.3
        Programming Language :: Python :: 3.4
        Topic :: Software Development :: Libraries :: Python Modules
        Topic :: System :: Archiving :: Packaging
        Topic :: System :: Systems Administration
        Topic :: Utilities
        """).strip().splitlines(),
    extras_require = {
        "ssl:sys_platform=='win32'": "wincertstore==0.1",
        "certs": "certifi==1.0.1",
    },
    dependency_links = [
        'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790',
        'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c',
    ],
    scripts = [],
    # tests_require = "setuptools[ssl]",
)

if __name__ == '__main__':
    dist = setuptools.setup(**setup_params)
<commit_msg>Python 2.6 or later is required<commit_after>#!/usr/bin/env python
"""Distutils setup file, used to install or test 'setuptools'"""
import io
import os
import sys
import textwrap

# Allow to run setup.py from another directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))

src_root = None

from distutils.util import convert_path

command_ns = {}
init_path = convert_path('setuptools/command/__init__.py')
with open(init_path) as init_file:
    exec(init_file.read(), command_ns)

SETUP_COMMANDS = command_ns['__all__']

main_ns = {}
ver_path = convert_path('setuptools/version.py')
with open(ver_path) as ver_file:
    exec(ver_file.read(), main_ns)

import setuptools
from setuptools.command.build_py import build_py as _build_py
from setuptools.command.test import test as _test

scripts = []

def _gen_console_scripts():
    yield "easy_install = setuptools.command.easy_install:main"

    # Gentoo distributions manage the python-version-specific scripts
    # themselves, so those platforms define an environment variable to
    # suppress the creation of the version-specific scripts.
    var_names = (
        'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
        'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT',
    )
    if any(os.environ.get(var) not in (None, "", "0") for var in var_names):
        return
    yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
        .format(shortver=sys.version[:3]))

console_scripts = list(_gen_console_scripts())

# specific command that is used to generate windows .exe files
class build_py(_build_py):
    def build_package_data(self):
        """Copy data files into build directory"""
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                srcfile = os.path.join(src_dir, filename)
                outf, copied = self.copy_file(srcfile, target)
                srcfile = os.path.abspath(srcfile)

class test(_test):
    """Specific test class to avoid rewriting the entry_points.txt"""
    def run(self):
        entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt')

        if not os.path.exists(entry_points):
            _test.run(self)
            return # even though _test.run will raise SystemExit

        # save the content
        with open(entry_points) as f:
            ep_content = f.read()

        # run the test
        try:
            _test.run(self)
        finally:
            # restore the file
            with open(entry_points, 'w') as f:
                f.write(ep_content)

readme_file = io.open('README.txt', encoding='utf-8')

# the release script adds hyperlinks to issues
if os.path.exists('CHANGES (links).txt'):
    changes_file = open('CHANGES (links).txt')
else:
    # but if the release script has not run, fall back to the source file
    changes_file = open('CHANGES.txt')
with readme_file:
    with changes_file:
        long_description = readme_file.read() + '\n' + changes_file.read()

package_data = {'setuptools': ['site-patch.py']}
force_windows_specific_files = (
    os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES")
    not in (None, "", "0")
)
if sys.platform == 'win32' or force_windows_specific_files:
    package_data.setdefault('setuptools', []).extend(['*.exe'])
    package_data.setdefault('setuptools.command', []).extend(['*.xml'])

setup_params = dict(
    name="setuptools",
    version=main_ns['__version__'],
    description="Easily download, build, install, upgrade, and uninstall "
                "Python packages",
    author="Python Packaging Authority",
    author_email="distutils-sig@python.org",
    license="PSF or ZPL",
    long_description = long_description,
    keywords = "CPAN PyPI distutils eggs package management",
    url = "https://pypi.python.org/pypi/setuptools",
    test_suite = 'setuptools.tests',
    src_root = src_root,
    packages = setuptools.find_packages(),
    package_data = package_data,

    py_modules = ['pkg_resources', 'easy_install'],

    zip_safe = True,

    cmdclass = {'test': test},
    entry_points = {
        "distutils.commands": [
            "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
            for cmd in SETUP_COMMANDS
        ],
        "distutils.setup_keywords": [
            "eager_resources        = setuptools.dist:assert_string_list",
            "namespace_packages     = setuptools.dist:check_nsp",
            "extras_require         = setuptools.dist:check_extras",
            "install_requires       = setuptools.dist:check_requirements",
            "tests_require          = setuptools.dist:check_requirements",
            "entry_points           = setuptools.dist:check_entry_points",
            "test_suite             = setuptools.dist:check_test_suite",
            "zip_safe               = setuptools.dist:assert_bool",
            "package_data           = setuptools.dist:check_package_data",
            "exclude_package_data   = setuptools.dist:check_package_data",
            "include_package_data   = setuptools.dist:assert_bool",
            "packages               = setuptools.dist:check_packages",
            "dependency_links       = setuptools.dist:assert_string_list",
            "test_loader            = setuptools.dist:check_importable",
            "use_2to3               = setuptools.dist:assert_bool",
            "convert_2to3_doctests  = setuptools.dist:assert_string_list",
            "use_2to3_fixers        = setuptools.dist:assert_string_list",
            "use_2to3_exclude_fixers = setuptools.dist:assert_string_list",
        ],
        "egg_info.writers": [
            "PKG-INFO = setuptools.command.egg_info:write_pkg_info",
            "requires.txt = setuptools.command.egg_info:write_requirements",
            "entry_points.txt = setuptools.command.egg_info:write_entries",
            "eager_resources.txt = setuptools.command.egg_info:overwrite_arg",
            "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg",
            "top_level.txt = setuptools.command.egg_info:write_toplevel_names",
            "depends.txt = setuptools.command.egg_info:warn_depends_obsolete",
            "dependency_links.txt = setuptools.command.egg_info:overwrite_arg",
        ],
        "console_scripts": console_scripts,

        "setuptools.file_finders":
            ["svn_cvs = setuptools.command.sdist:_default_revctrl"],

        "setuptools.installation":
            ['eggsecutable = setuptools.command.easy_install:bootstrap'],
    },

    classifiers = textwrap.dedent("""
        Development Status :: 5 - Production/Stable
        Intended Audience :: Developers
        License :: OSI Approved :: Python Software Foundation License
        License :: OSI Approved :: Zope Public License
        Operating System :: OS Independent
        Programming Language :: Python :: 2.6
        Programming Language :: Python :: 2.7
        Programming Language :: Python :: 3
        Programming Language :: Python :: 3.1
        Programming Language :: Python :: 3.2
        Programming Language :: Python :: 3.3
        Programming Language :: Python :: 3.4
        Topic :: Software Development :: Libraries :: Python Modules
        Topic :: System :: Archiving :: Packaging
        Topic :: System :: Systems Administration
        Topic :: Utilities
        """).strip().splitlines(),
    extras_require = {
        "ssl:sys_platform=='win32'": "wincertstore==0.1",
        "certs": "certifi==1.0.1",
    },
    dependency_links = [
        'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790',
        'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c',
    ],
    scripts = [],
    # tests_require = "setuptools[ssl]",
)

if __name__ == '__main__':
    dist = setuptools.setup(**setup_params)
<|endoftext|>


<commit_before># /setup.py
#
# Installation and setup script for polysquare-setuptools-lint
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for polysquare-setuptools-lint."""

try:
    from polysquare_setuptools_lint import PolysquareLintCommand
    _CMDCLASS = {
        "polysquarelint": PolysquareLintCommand
    }

except ImportError:
    _CMDCLASS = dict()

import platform

import sys

from setuptools import (find_packages, setup)

if (not (platform.python_implementation() == "PyPy" and
         sys.version_info.major == 3) and
        platform.system() != "Windows"):
    _ADDITIONAL_LINTERS = ["frosted"]
else:
    _ADDITIONAL_LINTERS = list()

setup(name="polysquare-setuptools-lint",
      version="0.0.50",
      description="""Provides a 'polysquarelint' command for setuptools""",
      long_description_markdown_filename="README.md",
      author="Sam Spilsbury",
      author_email="smspillaz@gmail.com",
      url="http://github.com/polysquare/polysquare-setuptools-lint",
      classifiers=["Development Status :: 3 - Alpha",
                   "Programming Language :: Python :: 2",
                   "Programming Language :: Python :: 2.7",
                   "Programming Language :: Python :: 3",
                   "Programming Language :: Python :: 3.1",
                   "Programming Language :: Python :: 3.2",
                   "Programming Language :: Python :: 3.3",
                   "Programming Language :: Python :: 3.4",
                   "Intended Audience :: Developers",
                   "Topic :: Software Development :: Build Tools",
                   "License :: OSI Approved :: MIT License"],
      license="MIT",
      keywords="development linters",
      packages=find_packages(exclude=["test"]),
      cmdclass=_CMDCLASS,
      install_requires=[
          "setuptools",
          "jobstamps>=0.0.16",
          "parmap",
          "pep8",
          "dodgy",
          "mccabe",
          "pep257",
          "pyflakes",
          "pylint-common",
          "pyroma==1.8.3",
          "vulture",
          "logilab-common==0.63.0",
          "prospector>=0.10.1",
          "flake8==2.3.0",
          "flake8-blind-except",
          "flake8-docstrings",
          "flake8-double-quotes",
          "flake8-import-order",
          "flake8-todo<=0.4",
          "six",
          "polysquare-generic-file-linter>=0.1.21"
      ] + _ADDITIONAL_LINTERS,
      extras_require={
          "upload": ["setuptools-markdown"]
      },
      entry_points={
          "distutils.commands": [
              ("polysquarelint=polysquare_setuptools_lint:"
               "PolysquareLintCommand"),
          ]
      },
      zip_safe=True,
      include_package_data=True)
<commit_msg>setup: Pin dependency of pycodestyle to 2.0.0<commit_after># /setup.py
#
# Installation and setup script for polysquare-setuptools-lint
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for polysquare-setuptools-lint."""

try:
    from polysquare_setuptools_lint import PolysquareLintCommand
    _CMDCLASS = {
        "polysquarelint": PolysquareLintCommand
    }

except ImportError:
    _CMDCLASS = dict()

import platform

import sys

from setuptools import (find_packages, setup)

if (not (platform.python_implementation() == "PyPy" and
         sys.version_info.major == 3) and
        platform.system() != "Windows"):
    _ADDITIONAL_LINTERS = ["frosted"]
else:
    _ADDITIONAL_LINTERS = list()

setup(name="polysquare-setuptools-lint",
      version="0.0.50",
      description="""Provides a 'polysquarelint' command for setuptools""",
      long_description_markdown_filename="README.md",
      author="Sam Spilsbury",
      author_email="smspillaz@gmail.com",
      url="http://github.com/polysquare/polysquare-setuptools-lint",
      classifiers=["Development Status :: 3 - Alpha",
                   "Programming Language :: Python :: 2",
                   "Programming Language :: Python :: 2.7",
                   "Programming Language :: Python :: 3",
                   "Programming Language :: Python :: 3.1",
                   "Programming Language :: Python :: 3.2",
                   "Programming Language :: Python :: 3.3",
                   "Programming Language :: Python :: 3.4",
                   "Intended Audience :: Developers",
                   "Topic :: Software Development :: Build Tools",
                   "License :: OSI Approved :: MIT License"],
      license="MIT",
      keywords="development linters",
      packages=find_packages(exclude=["test"]),
      cmdclass=_CMDCLASS,
      install_requires=[
          "setuptools",
          "jobstamps>=0.0.16",
          "parmap",
          "pep8",
          "dodgy",
          "mccabe",
          "pep257",
          "pyflakes",
          "pylint-common",
          "pyroma==1.8.3",
          "vulture",
          "logilab-common==0.63.0",
          "prospector>=0.10.1",
          "pycodestyle==2.0.0",
          "flake8==2.3.0",
          "flake8-blind-except",
          "flake8-docstrings",
          "flake8-double-quotes",
          "flake8-import-order",
          "flake8-todo<=0.4",
          "six",
          "polysquare-generic-file-linter>=0.1.21"
      ] + _ADDITIONAL_LINTERS,
      extras_require={
          "upload": ["setuptools-markdown"]
      },
      entry_points={
          "distutils.commands": [
              ("polysquarelint=polysquare_setuptools_lint:"
               "PolysquareLintCommand"),
          ]
      },
      zip_safe=True,
      include_package_data=True)
<|endoftext|>


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

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

import rottentomatoes

setup(name="rottentomatoes",
      version="2.0",
      description="Rotten Tomatoes Python API",
      long_description=rottentomatoes.RT.__doc__,
      keywords="rottentomatoes movies rotten tomatoes",
      author="Zach Williams",
      author_email="hey@zachwill.com",
      url="https://github.com/zachwill/rottentomatoes",
      license="Unlicense (a.k.a. Public Domain)",
      packages=["rottentomatoes"],
      classifiers=['Development Status :: 4 - Beta',
                   'Intended Audience :: Developers',
                   'Natural Language :: English',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python :: 2',
                   'Topic :: Internet',
                   'Topic :: Internet :: WWW/HTTP',
                  ],
      test_suite="test.py",
      tests_require=["mock", "Mock"])
<commit_msg>Bump version to 2.1<commit_after>#!/usr/bin/env python

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

import rottentomatoes

setup(name="rottentomatoes",
      version="2.1",
      description="Rotten Tomatoes Python API",
      long_description=rottentomatoes.RT.__doc__,
      keywords="rottentomatoes movies rotten tomatoes zachwill",
      author="Zach Williams",
      author_email="hey@zachwill.com",
      url="https://github.com/zachwill/rottentomatoes",
      license="Unlicense (a.k.a. Public Domain)",
      packages=["rottentomatoes"],
      classifiers=['Development Status :: 4 - Beta',
                   'Intended Audience :: Developers',
                   'Natural Language :: English',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python :: 2',
                   'Topic :: Internet',
                   'Topic :: Internet :: WWW/HTTP',
                  ],
      test_suite="test.py",
      tests_require=["mock", "Mock"])
<|endoftext|>


<commit_before>import subprocess
import sys
from os import path

from setuptools import setup

if sys.version_info[:2] < (3, 0):
    raise RuntimeError('Python version 3 required.')

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

def find_packages(*args, **kwargs):
    return ['OHA', 'OHA.param_builders', 'OHA.assessments', 'tests']

def version():
    __version = '0.2.2'
    __tag = 'b'
    if path.exists('.git'):
        __tag = 'git'
        __build = subprocess.check_output('git rev-list HEAD --count'.split()).decode().strip()
    else:
        __build = __tag
    return '%s.%s.%s' % (__version, __tag, __build)

setup(
    version=version(),
    long_description=long_description,
    packages=find_packages(),
    install_requires=[
        'numpy',
    ],
    include_package_data=True,
)
<commit_msg>added dependencies<commit_after>import subprocess
import sys
from os import path

from setuptools import setup

if sys.version_info[:2] < (3, 0):
    raise RuntimeError('Python version 3 required.')

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

def find_packages(*args, **kwargs):
    return ['OHA', 'OHA.param_builders', 'OHA.assessments', 'tests']

def version():
    __version = '0.2.2'
    __tag = 'b'
    if path.exists('.git'):
        __tag = 'git'
        __build = subprocess.check_output('git rev-list HEAD --count'.split()).decode().strip()
    else:
        __build = __tag
    return '%s.%s.%s' % (__version, __tag, __build)

setup(
    version=version(),
    long_description=long_description,
    packages=find_packages(),
    install_requires=[
        'numpy',
        'pandas',
    ],
    include_package_data=True,
)
<|endoftext|>


<commit_before>from distutils.core import setup
import os

data = list()
for d in os.walk('appkit/'):
    if len(d[2]) > 0:
        path_list = map(
            lambda x: str.join('/', os.path.join(d[0], x).split('/')[1:]),
            d[2]
        )
        data.extend(path_list)

setup(
    name='AppKit',
    version='0.2.1',
    description='Desktop application framework based on Webkit, \
        HTML5, CSS3, Javascript and Python',
    author='Nitipit Nontasuwan',
    author_email='nitipit@gmail.com',
    url='http://nitipit.github.com/appkit/',
    license='MIT',
    platforms=['Linux', ],
    keywords=['framework, html5, gnome, ui'],
    package_dir={'appkit': 'appkit'},
    packages=['appkit'],
    package_data={'appkit': data},
    requires=['sphinx_bootstrap_theme', ],
)
<commit_msg>Bump version to 0.2.2<commit_after>from distutils.core import setup
import os

data = list()
for d in os.walk('appkit/'):
    if len(d[2]) > 0:
        path_list = map(
            lambda x: str.join('/', os.path.join(d[0], x).split('/')[1:]),
            d[2]
        )
        data.extend(path_list)

setup(
    name='AppKit',
    version='0.2.2',
    description='Desktop application framework based on Webkit, \
        HTML5, CSS3, Javascript and Python',
    author='Nitipit Nontasuwan',
    author_email='nitipit@gmail.com',
    url='http://nitipit.github.com/appkit/',
    license='MIT',
    platforms=['Linux', ],
    keywords=['framework, html5, gnome, ui'],
    package_dir={'appkit': 'appkit'},
    packages=['appkit'],
    package_data={'appkit': data},
    requires=['sphinx_bootstrap_theme', ],
)
<|endoftext|>


<commit_before>from distutils.core import setup
from setuptools import find_packages

required = ['sqlparse==0.1.6']

setup(
    name="pandasql",
    version="0.0.8",
    author="Greg Lamp",
    author_email="greg@yhathq.com",
    url="https://github.com/yhat/pandasql/",
    license=open("LICENSE.txt").read(),
    packages=find_packages(),
    package_dir={"pandasql": "pandasql"},
    package_data={"pandasql": ["data/*.csv"]},
    description="sqldf for pandas",
    long_description=open("README.txt").read(),
    install_requires=required,
)

<commit_msg>new distro<commit_after>from distutils.core import setup
from setuptools import find_packages

required = ['sqlparse==0.1.6']

setup(
    name="pandasql",
    version="0.1.0",
    author="Greg Lamp",
    author_email="greg@yhathq.com",
    url="https://github.com/yhat/pandasql/",
    license=open("LICENSE.txt").read(),
    packages=find_packages(),
    package_dir={"pandasql": "pandasql"},
    package_data={"pandasql": ["data/*.csv"]},
    description="sqldf for pandas",
    long_description=open("README.txt").read(),
    install_requires=required,
)

<|endoftext|>