<commit_before>import platform
import sys
import os
import signal
import subprocess
import errno
import shutil

platform = platform.system()
app_path = ''
config_path = ''

# the application main entry point
def main():
  # OSX Setup:
  # - check and install via `brew cask`
  # - copy configuration to '/Library/Application Support/Sublime Text 3'
  if platform == 'Darwin':
    print('OSX detected')
    app_path = '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
    config_path = os.path.expanduser('~') + '/Library/Application Support/Sublime\ Text\ 3' # TODO: test this in OSX
    if not is_installed(app_path):
      install_osx(app_path)
    config_osx(config_path)
    sys.exit(0)
  # Linux Setup:
  # - check and install via `brew cask`
  # - copy configuration to '~/.config/sublime-text-3'
  if platform == 'Linux':
    print('Linux detected...')
    app_path = 'sublime'
    config_path = os.path.expanduser('~') + '/.config/sublime-text-3'
    if not is_installed(app_path):
      install_linux(app_path)
    config_linux(config_path)
    sys.exit(0)
  # Windows Setup:
  # - check and notify user to install
  # - copy configuration to '%APPDATA%\Sublime Text 3'
  if platform == 'Windows':
    print('Windows detected...')
    # TODO: do a windows install to determine the default install location
    # app_path = ''
    # TODO: do a windows install to determine the default config location
    # config_path = ''
    if not is_installed(app_path):
      install_windows(app_path)
    config_windows(config_path)
    sys.exit(0)
  else:
    raise Exception('Operating system not supported');
    sys.exit(1)

# Check to see if an application is installed
def is_installed(app_path):
  try:
    p = subprocess.Popen(app_path)
    os.kill(p.pid, signal.SIGTERM)
    print('Sublime is installed...')
    return True
  except OSError as e:
    print('Sublime not installed...')
    return False

# create a directory if it doesn't already exist
def make_dir(dir):
  try:
    os.makedirs(dir)
  # capture any non-file-creation errors
  except OSError as exception:
    if exception.errno != errno.EEXIST:
      raise

# recursively copies all the files in a directory
def copytree(src, dst, symlinks=False, ignore=None):
  for item in os.listdir(src):
    s = os.path.join(src, item)
    d = os.path.join(dst, item)
    if os.path.isdir(s):
      shutil.copytree(s, d, symlinks, ignore)
    else:
      shutil.copy2(s, d)

# OSX installation instructions
def install_osx(app_path):
  try:
    print('Updating sources...')
    if not is_installed('brew cask'):
      raise NotInstalledError('Homebrew not installed...')
    subprocess.call(['brew', 'update'], stdout=subprocess.PIPE)
    if not is_installed('brew cask'):
      raise NotInstalledError('Brew Cask not installed...')
    print('Installing Sublime Text...')
    os.environ['HOMEBREW_CASK_OPTS'] = '--appdir=/Applications'
    subprocess.call(['brew', 'cask', 'install', 'sublime-text3'], stdout=subprocess.PIPE)
    # symlink to 'sublime'
    subprocess.Popen('ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime')
    print('Installation complete...')
  except Exception as e:
    print('Install failed:' + e)
    sys.exit(1)

# OSX configuration instructions
def config_osx(config_path):
  packages = config_path + '/Installed\ Packages'
  settings = config_path + '/Packages/User'
  # create the settings directories
  make_dir(config_path)
  make_dir(packages)
  make_dir(settings)
  # copy the themes
  copytree('./themes', packages)
  # copy the user preferences
  copytree('./user-settings', settings)
  print('Installation complete...')

# Linux installation instructions
def install_linux(app_path):
  try:
    print('Updating sources...')
    subprocess.call(['apt-get', 'update'], stdout=subprocess.PIPE)
    print('Installing Sublime Text...')
    subprocess.call(['apt-get', 'install', 'sublime-text'], stdout=subprocess.PIPE)
    print('Installation complete...')
  except OSError as e:
    print('Install failed:' + e)
    sys.exit(1)

# Linux configuration instructions
def config_linux(config_path):
  # TODO: implement Linux config
  return

# Windows installation instructions
def install_windows(app_path):
  # TODO: implement Windows installation
  return

# Windows configuration instructions
def config_windows(config_path):
  # TODO: implement Windows config
  return

class NotInstalledError(Exception):
    def __init__(self, message, errors):
        # Call the base class constructor
        super(ValidationError, self).__init__(message)

if __name__ == '__main__':
  main()
<commit_msg>Fixed a bug in error messaging<commit_after>import platform
import sys
import os
import signal
import subprocess
import errno
import shutil

platform = platform.system()
app_path = ''
config_path = ''

# the application main entry point
def main():
  # OSX Setup:
  # - check and install via `brew cask`
  # - copy configuration to '/Library/Application Support/Sublime Text 3'
  if platform == 'Darwin':
    print('OSX detected')
    app_path = '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
    config_path = os.path.expanduser('~') + '/Library/Application Support/Sublime\ Text\ 3' # TODO: test this in OSX
    if not is_installed(app_path):
      install_osx(app_path)
    config_osx(config_path)
    sys.exit(0)
  # Linux Setup:
  # - check and install via `brew cask`
  # - copy configuration to '~/.config/sublime-text-3'
  if platform == 'Linux':
    print('Linux detected...')
    app_path = 'sublime'
    config_path = os.path.expanduser('~') + '/.config/sublime-text-3'
    if not is_installed(app_path):
      install_linux(app_path)
    config_linux(config_path)
    sys.exit(0)
  # Windows Setup:
  # - check and notify user to install
  # - copy configuration to '%APPDATA%\Sublime Text 3'
  if platform == 'Windows':
    print('Windows detected...')
    # TODO: do a windows install to determine the default install location
    # app_path = ''
    # TODO: do a windows install to determine the default config location
    # config_path = ''
    if not is_installed(app_path):
      install_windows(app_path)
    config_windows(config_path)
    sys.exit(0)
  else:
    raise Exception('Operating system not supported');
    sys.exit(1)

# Check to see if an application is installed
def is_installed(app_path):
  try:
    p = subprocess.Popen(app_path)
    os.kill(p.pid, signal.SIGTERM)
    print('Sublime is installed...')
    return True
  except OSError as e:
    print('Sublime not installed...')
    return False

# create a directory if it doesn't already exist
def make_dir(dir):
  try:
    os.makedirs(dir)
  # capture any non-file-creation errors
  except OSError as exception:
    if exception.errno != errno.EEXIST:
      raise

# recursively copies all the files in a directory
def copytree(src, dst, symlinks=False, ignore=None):
  for item in os.listdir(src):
    s = os.path.join(src, item)
    d = os.path.join(dst, item)
    if os.path.isdir(s):
      shutil.copytree(s, d, symlinks, ignore)
    else:
      shutil.copy2(s, d)

# OSX installation instructions
def install_osx(app_path):
  try:
    print('Updating sources...')
    if not is_installed('brew cask'):
      raise NotInstalledError('Homebrew not installed...')
    subprocess.call(['brew', 'update'], stdout=subprocess.PIPE)
    if not is_installed('brew cask'):
      raise NotInstalledError('Brew Cask not installed...')
    print('Installing Sublime Text...')
    os.environ['HOMEBREW_CASK_OPTS'] = '--appdir=/Applications'
    subprocess.call(['brew', 'cask', 'install', 'sublime-text3'], stdout=subprocess.PIPE)
    # symlink to 'sublime'
    subprocess.Popen('ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime')
    print('Installation complete...')
  except Exception as e:
    print('Install failed:' + e)
    sys.exit(1)

# OSX configuration instructions
def config_osx(config_path):
  packages = config_path + '/Installed\ Packages'
  settings = config_path + '/Packages/User'
  # create the settings directories
  make_dir(config_path)
  make_dir(packages)
  make_dir(settings)
  # copy the themes
  copytree('./themes', packages)
  # copy the user preferences
  copytree('./user-settings', settings)
  print('Installation complete...')

# Linux installation instructions
def install_linux(app_path):
  try:
    print('Updating sources...')
    subprocess.call(['apt-get', 'update'], stdout=subprocess.PIPE)
    print('Installing Sublime Text...')
    subprocess.call(['apt-get', 'install', 'sublime-text'], stdout=subprocess.PIPE)
    print('Installation complete...')
  except OSError as e:
    print('Install failed:' + e.message)
    sys.exit(1)

# Linux configuration instructions
def config_linux(config_path):
  # TODO: implement Linux config
  return

# Windows installation instructions
def install_windows(app_path):
  # TODO: implement Windows installation
  return

# Windows configuration instructions
def config_windows(config_path):
  # TODO: implement Windows config
  return

class NotInstalledError(Exception):
    def __init__(self, message, errors):
        # Call the base class constructor
        super(ValidationError, self).__init__(message)

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


<commit_before>from os.path import join, dirname
from pip.req import parse_requirements
from setuptools import setup, find_packages

reqs_file = join(dirname(__file__), "requirements.txt")
install_reqs = list(parse_requirements(reqs_file))

setup(
    name='tictactoelib',
    version='0.0.2a3',
    author="Motiejus Jakštys",
    author_email='desired.mta@gmail.com',
    description="Ultimate Tic Tac Toe game logic (Lua and Python bindings)",
    long_description=open(join(dirname(__file__), 'README.rst')).read().strip(),
    url="http://github.com/Motiejus/ultimate-tic-tac-toe",
    license='Apache2',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Education',
        'Natural Language :: English',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Other Scripting Engines',
        'Topic :: Games/Entertainment :: Board Games',
    ],
    packages=['tictactoelib'],
    package_data = {
        'tictactoelib': ['*.lua'],
    },
    zip_safe=False,
    install_requires=[str(ir.req) for ir in install_reqs],
    entry_points={
        'console_scripts': [
            'tictactoelib = tictactoelib.run:main'
        ]
    },
)
<commit_msg>Make development status Alpha<commit_after>from os.path import join, dirname
from pip.req import parse_requirements
from setuptools import setup, find_packages

reqs_file = join(dirname(__file__), "requirements.txt")
install_reqs = list(parse_requirements(reqs_file))

setup(
    name='tictactoelib',
    version='0.0.3',
    author="Motiejus Jakštys",
    author_email='desired.mta@gmail.com',
    description="Ultimate Tic Tac Toe game logic (Lua and Python bindings)",
    long_description=open(join(dirname(__file__), 'README.rst')).read().strip(),
    url="http://github.com/Motiejus/ultimate-tic-tac-toe",
    license='Apache2',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Education',
        'Natural Language :: English',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Other Scripting Engines',
        'Topic :: Games/Entertainment :: Board Games',
    ],
    packages=['tictactoelib'],
    package_data = {
        'tictactoelib': ['*.lua'],
    },
    zip_safe=False,
    install_requires=[str(ir.req) for ir in install_reqs],
    entry_points={
        'console_scripts': [
            'tictactoelib = tictactoelib.run:main'
        ]
    },
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools.extension import Extension

import sys
import os
import subprocess

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

def exec_generate_proto(source):
    protoc_command = ["python", "-m", "grpc_tools.protoc", "-I.", "--python_out=.", source]
    if subprocess.call(protoc_command) != 0:
        sys.exit(-1)
    sys.stdout.write("Generate {}_pb2.py ==> successfull\n".format(source.split('.')[0]))

    protoc_grpc_command = ["python", "-m", "grpc_tools.protoc", "-I.", "--python_out=.","--grpc_python_out=.", source]
    if subprocess.call(protoc_grpc_command) != 0:
        sys.exit(-1)
    sys.stdout.write("Generate {}_grcp_pb2.py ==> successfull\n".format(source.split('.')[0]))

ed25519_sha3_path = "cli/cli_ed25519"
sources = [ed25519_sha3_path+"/cli_ed25519module.c"]
sources.extend([ed25519_sha3_path+"/lib/" + s for s in os.listdir(ed25519_sha3_path+"/lib/") if s.endswith(".c")])
module_ed25519_sha3 = Extension("cli_ed25519",include_dirs=[ed25519_sha3_path+"/lib/"], sources=sources)

class GeneratePb(_build_py):
    def run(self):
        os.chdir("schema/")
        exec_generate_proto('block.proto')
        exec_generate_proto('commands.proto')
        exec_generate_proto('endpoint.proto')
        exec_generate_proto('primitive.proto')
        exec_generate_proto('queries.proto')
        exec_generate_proto('responses.proto')
        os.chdir("..")
        _build_py.run(self)

if __name__ == '__main__':
    setup(
          name='iroha-ya-cli',
          version='1.1.1',
          description='Cli for hyperledger/iroha',
          author='Sonoko Mizuki',
          license='Apache',
          author_email='mizuki.sonoko@gmail.com',
          packages = ['cli', 'schema'],
          ext_modules=[module_ed25519_sha3],
          include_package_data=True,
          install_requires=[
                'grpcio',
                'grpcio-tools',
                'protobuf',
                'PyYAML',

                'sha3',
                'ed25519'
          ],
          cmdclass={
            'build_py': GeneratePb,
          },
          classifiers=[
             'Programming Language :: Python :: 3.5',

             'Development Status :: 4 - Beta',

             'License :: OSI Approved :: Apache Software License',
             'Topic :: Utilities'
          ],
          entry_points={
          'console_scripts':
            ['iroha-ya-cli=cli.main:main']
          }
    )
<commit_msg>Update setup.py's python path<commit_after>#!/usr/bin/env python
import shutil
from setuptools.extension import Extension

import sys
import os
import subprocess

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

def exec_generate_proto(source):
    python = shutil.which("python")
    if not python:
        python = shutil.which("python3")

    protoc_command = [ python, "-m", "grpc_tools.protoc", "-I.", "--python_out=.", source]
    if subprocess.call(protoc_command) != 0:
        sys.exit(-1)
    sys.stdout.write("Generate {}_pb2.py ==> successfull\n".format(source.split('.')[0]))

    protoc_grpc_command = [ python, "-m", "grpc_tools.protoc", "-I.", "--python_out=.","--grpc_python_out=.", source]
    if subprocess.call(protoc_grpc_command) != 0:
        sys.exit(-1)
    sys.stdout.write("Generate {}_grcp_pb2.py ==> successfull\n".format(source.split('.')[0]))

ed25519_sha3_path = "cli/cli_ed25519"
sources = [ed25519_sha3_path+"/cli_ed25519module.c"]
sources.extend([ed25519_sha3_path+"/lib/" + s for s in os.listdir(ed25519_sha3_path+"/lib/") if s.endswith(".c")])
module_ed25519_sha3 = Extension("cli_ed25519",include_dirs=[ed25519_sha3_path+"/lib/"], sources=sources)

class GeneratePb(_build_py):
    def run(self):
        os.chdir("schema/")
        exec_generate_proto('block.proto')
        exec_generate_proto('commands.proto')
        exec_generate_proto('endpoint.proto')
        exec_generate_proto('primitive.proto')
        exec_generate_proto('queries.proto')
        exec_generate_proto('responses.proto')
        os.chdir("..")
        _build_py.run(self)

if __name__ == '__main__':
    setup(
          name='iroha-ya-cli',
          version='1.1.1',
          description='Cli for hyperledger/iroha',
          author='Sonoko Mizuki',
          license='Apache',
          author_email='mizuki.sonoko@gmail.com',
          packages = ['cli', 'schema'],
          ext_modules=[module_ed25519_sha3],
          include_package_data=True,
          install_requires=[
                'grpcio',
                'grpcio-tools',
                'protobuf',
                'PyYAML',

                'sha3',
                'ed25519'
          ],
          cmdclass={
            'build_py': GeneratePb,
          },
          classifiers=[
             'Programming Language :: Python :: 3.5',

             'Development Status :: 4 - Beta',

             'License :: OSI Approved :: Apache Software License',
             'Topic :: Utilities'
          ],
          entry_points={
          'console_scripts':
            ['iroha-ya-cli=cli.main:main']
          }
    )
<|endoftext|>


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

import os
import os.path
import re
import sys

from setuptools import setup, find_packages

def readme():
    """
    Function used to skip the screenshots part
    """
    desc = ''
    cpt = 0
    with open('README.rst') as f:
        for l in f.readlines():
            if l.rstrip() == 'Screenshots':
                cpt += 1
            elif cpt > 0:
                cpt += 1
            if cpt > 7:
                cpt = 0
            if cpt > 0:
                continue
            desc += l
    return desc

with open(os.path.join(os.path.dirname(__file__), 'burpui', '__init__.py')) as f:
    data = f.read()

    name = re.search("__title__ *= *'(.*)'", data).group(1)
    author = re.search("__author__ *= *'(.*)'", data).group(1)
    author_email = re.search("__author_email__ *= *'(.*)'", data).group(1)
    description = re.search("__description__ *= *'(.*)'", data).group(1)
    url = re.search("__url__ *= *'(.*)'", data).group(1)

with open('requirements.txt', 'r') as f:
    requires = [x.strip() for x in f if x.strip()]

with open('test-requirements.txt', 'r') as f:
    test_requires = [x.strip() for x in f if x.strip()]

datadir = os.path.join('share', 'burpui', 'etc')
contrib = os.path.join('share', 'burpui', 'contrib')

setup(
    name=name,
    version=open('VERSION').read().rstrip(),
    description=description,
    long_description=readme(),
    license=open('LICENSE').read(),
    author=author,
    author_email=author_email,
    url=url,
    keywords='burp web ui',
    packages=find_packages(),
    include_package_data=True,
    package_data={
        'static': 'burpui/static/*',
        'templates': 'burpui/templates/*'
    },
    scripts=['bin/burp-ui', 'bin/bui-agent'],
    data_files=[
        (datadir, [os.path.join(datadir, 'burpui.sample.cfg')]),
        (datadir, [os.path.join(datadir, 'buiagent.sample.cfg')]),
        (contrib, ['contrib/centos', 'contrib/debian', 'contrib/gunicorn.d'])
    ],
    install_requires=requires,
    extras_require={
        'ldap_authentication': ['ldap3']
    },
    tests_require=test_requires,
    classifiers=[
        'Framework :: Flask',
        'Intended Audience :: System Administrators',
        'Natural Language :: English',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Topic :: System :: Archiving :: Backup',
        'Topic :: System :: Monitoring'
    ]
)
<commit_msg>fix contrib<commit_after>#!/usr/bin/env python
# coding: utf-8

import os
import os.path
import re
import sys

from setuptools import setup, find_packages

def readme():
    """
    Function used to skip the screenshots part
    """
    desc = ''
    cpt = 0
    with open('README.rst') as f:
        for l in f.readlines():
            if l.rstrip() == 'Screenshots':
                cpt += 1
            elif cpt > 0:
                cpt += 1
            if cpt > 7:
                cpt = 0
            if cpt > 0:
                continue
            desc += l
    return desc

with open(os.path.join(os.path.dirname(__file__), 'burpui', '__init__.py')) as f:
    data = f.read()

    name = re.search("__title__ *= *'(.*)'", data).group(1)
    author = re.search("__author__ *= *'(.*)'", data).group(1)
    author_email = re.search("__author_email__ *= *'(.*)'", data).group(1)
    description = re.search("__description__ *= *'(.*)'", data).group(1)
    url = re.search("__url__ *= *'(.*)'", data).group(1)

with open('requirements.txt', 'r') as f:
    requires = [x.strip() for x in f if x.strip()]

with open('test-requirements.txt', 'r') as f:
    test_requires = [x.strip() for x in f if x.strip()]

datadir = os.path.join('share', 'burpui', 'etc')
contrib = os.path.join('share', 'burpui', 'contrib')

setup(
    name=name,
    version=open('VERSION').read().rstrip(),
    description=description,
    long_description=readme(),
    license=open('LICENSE').read(),
    author=author,
    author_email=author_email,
    url=url,
    keywords='burp web ui',
    packages=find_packages(),
    include_package_data=True,
    package_data={
        'static': 'burpui/static/*',
        'templates': 'burpui/templates/*'
    },
    scripts=['bin/burp-ui', 'bin/bui-agent'],
    data_files=[
        (datadir, [os.path.join(datadir, 'burpui.sample.cfg')]),
        (datadir, [os.path.join(datadir, 'buiagent.sample.cfg')]),
        (os.path.join(contrib, 'centos'), ['contrib/centos/init.sh']),
        (os.path.join(contrib, 'debian'), ['contrib/centos/init.sh']),
        (os.path.join(contrib, 'gunicorn.d'), ['contrib/gunicorn.d/burp-ui'])
    ],
    install_requires=requires,
    extras_require={
        'ldap_authentication': ['ldap3']
    },
    tests_require=test_requires,
    classifiers=[
        'Framework :: Flask',
        'Intended Audience :: System Administrators',
        'Natural Language :: English',
        'License :: OSI Approved :: BSD License',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Topic :: System :: Archiving :: Backup',
        'Topic :: System :: Monitoring'
    ]
)
<|endoftext|>


<commit_before>import os
from setuptools import setup, find_packages

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

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

data_files = []
for dirpath, dirnames, filenames in os.walk(PROJECT_NAME):
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'):
            del dirnames[i]
    if '__init__.py' in filenames:
        continue
    elif filenames:
        for f in filenames:
            data_files.append(os.path.join(
                dirpath[len(PROJECT_NAME) + 1:], f))

setup(
    name='django-crm',
    version='0.2.0',
    packages=find_packages(exclude=['tests', 'tests.*']),
    include_package_data=True,
    description='An opensourse CRM developed on django framework',
    long_description=README,
    url='https://github.com/MicroPyramid/Django-CRM.git',
    author='Micropyramid',
    author_email='hello@micropyramid.com',
    classifiers=[
        'Development Status :: 2 - Beta',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    install_requires=[
    ],
)
<commit_msg>update setup<commit_after>import os
from setuptools import setup, find_packages

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

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

data_files = []
for dirpath, dirnames, filenames in os.walk(PROJECT_NAME):
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'):
            del dirnames[i]
    if '__init__.py' in filenames:
        continue
    elif filenames:
        for f in filenames:
            data_files.append(os.path.join(
                dirpath[len(PROJECT_NAME) + 1:], f))

setup(
    name='django-crm',
    version='0.2.0',
    packages=find_packages(exclude=['tests', 'tests.*']),
    include_package_data=True,
    description='An opensourse CRM developed on django framework',
    long_description=README,
    url='https://github.com/MicroPyramid/Django-CRM.git',
    author='Micropyramid',
    author_email='hello@micropyramid.com',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    install_requires=[
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

version_parts = (10, 6, 2)
version = '.'.join(map(str, version_parts))

gh_lenses = 'git+https://github.com/ingolemo/python-lenses.git#egg=lenses'

setup(
    name='amino',
    description='functional data structures and type classes',
    version=version,
    author='Torsten Schmits',
    author_email='torstenschmits@gmail.com',
    license='MIT',
    url='https://github.com/tek/amino',
    packages=find_packages(exclude=['unit', 'unit.*']),
    install_requires=[
        'fn',
        'toolz',
        'lenses',
        'hues',
    ],
    tests_require=[
        'kallikrein',
    ],
    dependency_links=[
        gh_lenses,
    ]
)
<commit_msg>10.6.3<commit_after>from setuptools import setup, find_packages

version_parts = (10, 6, 3)
version = '.'.join(map(str, version_parts))

gh_lenses = 'git+https://github.com/ingolemo/python-lenses.git#egg=lenses'

setup(
    name='amino',
    description='functional data structures and type classes',
    version=version,
    author='Torsten Schmits',
    author_email='torstenschmits@gmail.com',
    license='MIT',
    url='https://github.com/tek/amino',
    packages=find_packages(exclude=['unit', 'unit.*']),
    install_requires=[
        'fn',
        'toolz',
        'lenses',
        'hues',
    ],
    tests_require=[
        'kallikrein',
    ],
    dependency_links=[
        gh_lenses,
    ]
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

setup(
    name='sheetsu',
    version='0.0.2',
    description='Sheetsu Python client',
    url='http://github.com/andreffs18/sheetsu-python',
    author='Andre Silva',
    author_email='andreffs18@gmail.com',
    license='MIT',
    keywords='sheetsu api client sdk spreadsheet',
    packages=find_packages(),
    zip_safe=False
)
<commit_msg>Update version<commit_after>from setuptools import setup, find_packages

setup(
    name='sheetsu',
    version='0.0.3',
    description='Sheetsu Python client',
    url='http://github.com/andreffs18/sheetsu-python',
    author='Andre Silva',
    author_email='andreffs18@gmail.com',
    license='MIT',
    keywords='sheetsu api client sdk spreadsheet',
    packages=find_packages(),
    zip_safe=False
)
<|endoftext|>


<commit_before>from ez_setup import use_setuptools
use_setuptools()
from os.path import exists
from setuptools import setup, Extension
import numpy

VERSION = "0.4.2"

try:
    from Cython.Build import cythonize
    USE_CYTHON = True
    include_dirs = [numpy.get_include()]
    ext = ".pyx"
except ImportError:
    USE_CYTHON = False
    include_dirs = []
    ext = ".c"
    print("Warning: Cython not imported")
    print("If C sources exist in the source tree, they will be used")

extensions = [Extension("karta.raster.cfill_sinks",
                        ["karta/raster/cfill_sinks"+ext],
                        include_dirs=include_dirs),
              Extension("karta.raster.crfuncs",
                        ["karta/raster/crfuncs"+ext],
                        include_dirs=include_dirs),
              Extension("karta.vector._cvectorgeo",
                        ["karta/vector/_cvectorgeo"+ext],
                        include_dirs=include_dirs)]

if USE_CYTHON:
    extensions = cythonize(extensions)

for extension in extensions:
    if not all(exists(src) for src in extension.sources):
        # C-extension sources missing, so don't try to build them
        extensions = []
        print("Warning: Extension source not found: {0}".format(extension.sources))
        print("Not building accelerated modules")
        break

setup(
    name = "karta",
    version = VERSION,
    install_requires = ["numpy>=1.6", "cython>=0.15", "pyproj>=1.9", "pyshp>=1.2"],
    author = "Nat Wilson",
    author_email = "njwilson23@gmail.com",
    packages = ["karta", "karta.vector", "karta.raster"],
    url = "http://www.ironicmtn.com/karta.html",
    description = "Geospatial analysis in Python",
    long_description = """
Karta - tidy package for geospatial computation
===============================================

*Karta* provides a simple and fast framework for spatial analysis in Python.

The package provides clean vector and raster data types that are geographical
coordinate system-aware, a selection of geographical analysis methods, and the
ability to read and write several formats, including GeoJSON, shapefiles, and
ESRI ASCII.

*Karta* works with Python 2.6-2.7 and Python 3.3+.

DOCUMENTATION
-------------

See the `online manual <http://www.ironicmtn.com/kartadocs/karta-manual.html>`_.

See the tutorial_, or read the `API documentation`_.

.. _tutorial: http://www.ironicmtn.com/kartadocs/tutorial.html
.. _API documentation: http://www.ironicmtn.com/kartadocs/reference.html

The manual can also be built offline using Sphinx by running ``make`` from the
``doc/`` directory. The documentation is built from source code docstrings and
information in the `Wiki <https://github.com/njwilson23/karta/wiki/Tutorial>`_.
""",
    download_url = "https://github.com/njwilson23/karta/archive/master.zip",
    classifiers = ["Programming Language :: Python",
                   "Programming Language :: Python :: 3",
                   "Development Status :: 4 - Beta",
                   "Topic :: Scientific/Engineering"],
    license = "MIT License",
    ext_modules = extensions
)

<commit_msg>remove fill_sinks from cython extensions<commit_after>from ez_setup import use_setuptools
use_setuptools()
from os.path import exists
from setuptools import setup, Extension
import numpy

VERSION = "0.4.2"

try:
    from Cython.Build import cythonize
    USE_CYTHON = True
    include_dirs = [numpy.get_include()]
    ext = ".pyx"
except ImportError:
    USE_CYTHON = False
    include_dirs = []
    ext = ".c"
    print("Warning: Cython not imported")
    print("If C sources exist in the source tree, they will be used")

extensions = [Extension("karta.raster.crfuncs",
                        ["karta/raster/crfuncs"+ext],
                        include_dirs=include_dirs),
              Extension("karta.vector._cvectorgeo",
                        ["karta/vector/_cvectorgeo"+ext],
                        include_dirs=include_dirs)]

if USE_CYTHON:
    extensions = cythonize(extensions)

for extension in extensions:
    if not all(exists(src) for src in extension.sources):
        # C-extension sources missing, so don't try to build them
        extensions = []
        print("Warning: Extension source not found: {0}".format(extension.sources))
        print("Not building accelerated modules")
        break

setup(
    name = "karta",
    version = VERSION,
    install_requires = ["numpy>=1.6", "cython>=0.15", "pyproj>=1.9", "pyshp>=1.2"],
    author = "Nat Wilson",
    author_email = "njwilson23@gmail.com",
    packages = ["karta", "karta.vector", "karta.raster"],
    url = "http://www.ironicmtn.com/karta.html",
    description = "Geospatial analysis in Python",
    long_description = """
Karta - tidy package for geospatial computation
===============================================

*Karta* provides a simple and fast framework for spatial analysis in Python.

The package provides clean vector and raster data types that are geographical
coordinate system-aware, a selection of geographical analysis methods, and the
ability to read and write several formats, including GeoJSON, shapefiles, and
ESRI ASCII.

*Karta* works with Python 2.6-2.7 and Python 3.3+.

DOCUMENTATION
-------------

See the `online manual <http://www.ironicmtn.com/kartadocs/karta-manual.html>`_.

See the tutorial_, or read the `API documentation`_.

.. _tutorial: http://www.ironicmtn.com/kartadocs/tutorial.html
.. _API documentation: http://www.ironicmtn.com/kartadocs/reference.html

The manual can also be built offline using Sphinx by running ``make`` from the
``doc/`` directory. The documentation is built from source code docstrings and
information in the `Wiki <https://github.com/njwilson23/karta/wiki/Tutorial>`_.
""",
    download_url = "https://github.com/njwilson23/karta/archive/master.zip",
    classifiers = ["Programming Language :: Python",
                   "Programming Language :: Python :: 3",
                   "Development Status :: 4 - Beta",
                   "Topic :: Scientific/Engineering"],
    license = "MIT License",
    ext_modules = extensions
)

<|endoftext|>


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

import sys

from setuptools import setup, find_packages

# Version info -- read without importing
_locals = {}
with open('invocations/_version.py') as fp:
    exec(fp.read(), None, _locals)
version = _locals['__version__']

requirements = [
    # Core dependency, obviously
    'invoke>=0.13,<2.0',

    # Dependencies for various subpackages.
    # NOTE: these used to be all optional (only complained about at import
    # time if missing), but that got hairy fast, and these are all
    # pure-Python packages, so it shouldn't be a huge burden for users to
    # obtain them.
    'blessings>=1.6,<2',
    # TODO: this pulls down Sphinx and its whole tree too, and eventually the
    # release module will want Releases-specific changelogs to be optional. At
    # that time, make this optional again.
    'releases>=1.2,<2',
    'semantic_version>=2.4,<3',
    'tabulate>=0.7,<0.8',
    'tqdm>=4.8.1',
]
if sys.version_info < (3, 4): # which is when stdlib.enum arrived
    requirements.append('enum34>=1.1,<2')

setup(
    name='invocations',
    version=version,
    description='Reusable Invoke tasks',
    license='BSD',
    author='Jeff Forcier',
    author_email='jeff@bitprophet.org',
    url='http://pyinvoke.org',

    # Release requirements. See dev-requirements.txt for dev version reqs.
    install_requires=requirements,

    packages=find_packages(),

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Unix',
        'Operating System :: POSIX',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Software Distribution',
        'Topic :: System :: Systems Administration',
    ],
)
<commit_msg>Tabulate introduced some sort of bug in 0.7.6 or 0.7.7 :(<commit_after>#!/usr/bin/env python

import sys

from setuptools import setup, find_packages

# Version info -- read without importing
_locals = {}
with open('invocations/_version.py') as fp:
    exec(fp.read(), None, _locals)
version = _locals['__version__']

requirements = [
    # Core dependency, obviously
    'invoke>=0.13,<2.0',

    # Dependencies for various subpackages.
    # NOTE: these used to be all optional (only complained about at import
    # time if missing), but that got hairy fast, and these are all
    # pure-Python packages, so it shouldn't be a huge burden for users to
    # obtain them.
    'blessings>=1.6,<2',
    # TODO: this pulls down Sphinx and its whole tree too, and eventually the
    # release module will want Releases-specific changelogs to be optional. At
    # that time, make this optional again.
    'releases>=1.2,<2',
    'semantic_version>=2.4,<3',
    'tabulate==0.7.5',
    'tqdm>=4.8.1',
]
if sys.version_info < (3, 4): # which is when stdlib.enum arrived
    requirements.append('enum34>=1.1,<2')

setup(
    name='invocations',
    version=version,
    description='Reusable Invoke tasks',
    license='BSD',
    author='Jeff Forcier',
    author_email='jeff@bitprophet.org',
    url='http://pyinvoke.org',

    # Release requirements. See dev-requirements.txt for dev version reqs.
    install_requires=requirements,

    packages=find_packages(),

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Unix',
        'Operating System :: POSIX',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development',
        'Topic :: Software Development :: Build Tools',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Software Distribution',
        'Topic :: System :: Systems Administration',
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
"""
Constantina installer script. The installer script by default will also run
a configuration script intended to set up reasonable defaults for an instance
of Constantina.
"""
import os
import distutils
import distutils.log
import sys
from pwd import getpwnam
from grp import getgrnam
import subprocess
from setuptools import setup, Command
from setuptools.command.install import install

# Use same command line parsing for setup.py and configuration after the fact
from constantina.util.constantina_configure import ConstantinaConfig, HelpStrings, install_arguments

# Globals, so all the Configure objects get configured from a consistent
# place prior to distutils running the setup commands
Settings = ConstantinaConfig()
Package = None

class ConfigurePyCommand(Command):
    """Custom command for doing configuration steps"""
    description = 'configure Constantina defaults for a site'
    user_options = [
        ('instance=', 'i', HelpStrings['instance']),
        ('config-root=', 'c', HelpStrings['config_root']),
        ('cgi-bin=', 'b', HelpStrings['cgi_bin']),
        ('hostname=', 'n', HelpStrings['hostname']),
        ('port=', 'P', HelpStrings['port']),
        ('data-root=', 'r', HelpStrings['data_root']),
        ('username=', 'u', HelpStrings['username']),
        ('groupname=', 'g', HelpStrings['groupname']),
    ]

    def initialize_options(self):
        """Where default settings for each user_options value is set"""
        self.instance = Settings.instance
        self.config_root = Settings.config_root
        self.cgi_bin = Settings.cgi_bin
        self.hostname = Settings.hostname
        self.port = Settings.port
        self.data_root = Settings.data_root
        self.username = Settings.username
        self.groupname = Settings.groupname

    def finalize_options(self):
        """Look for unacceptable inputs"""
        assert (isinstance(self.instance, str) and
                len(self.instance) > 0 and
                len(self.instance) < 32), 'Invalid instance name'
        assert getpwnam(self.username), 'User name not found'
        assert getgrnam(self.groupname), 'Group name not found'
        assert isinstance(self.hostname, str), 'Invalid hostname'
        assert (int(self.port) < 65536) and (int(self.port) > 1024), 'Invalid or privileged port given'
        assert isinstance(self.data_root, str), 'Invalid data_root directory'
        assert isinstance(self.config_root, str), 'Invalid config directory'
        assert isinstance(self.cgi_bin, str), 'Invalid cgi-bin directory'

    def run(self):
        """Run a configuration script post-install"""
        command = ['./constantina/util/constantina_configure.py']
        if self.instance:
            command.append('--instance')
            command.append(self.instance)
        if self.hostname:
            command.append('--hostname')
            command.append(self.hostname)
        if self.port:
            command.append('--port')
            command.append(self.port)
        if self.data_root:
            command.append('--data-root')
            command.append(self.data_root)
        if self.username:
            command.append('--username')
            command.append(self.username)
        if self.groupname:
            command.append('--groupname')
            command.append(self.groupname)
        if self.cgi_bin:
            command.append('--cgi-bin')
            command.append(self.cgi_bin)
        if self.config_root:
            command.append('--config-root')
            command.append(self.config_root)
        self.announce(
            'Running command: %s' % str(command),
            level=distutils.log.INFO)
        subprocess.check_call(command)

class InstallPyCommand(install):
    """Custom installer process for reading values"""
    description = 'install and configure Constantina at a site'
    install.user_options += [
        ('instance=', 'i', HelpStrings['instance']),
        ('config-root=', None, HelpStrings['config_root']),
        ('cgi-bin=', 'b', HelpStrings['cgi_bin']),
        ('hostname=', None, HelpStrings['hostname']),
        ('port=', 'P', HelpStrings['port']),
        ('data-root=', 'r', HelpStrings['data_root']),
        ('username=', 'u', HelpStrings['username']),
        ('groupname=', 'g', HelpStrings['groupname']),
        ('upgrade', None, HelpStrings['upgrade']),
        ('scriptonly', None, HelpStrings['scriptonly']),
    ]

    def initialize_options(self):
        """Where default settings for each user_options value is set"""
        self.instance = Settings.default.instance
        self.config_root = Settings.default.config_root
        self.cgi_bin = Settings.cgi_bin
        self.hostname = Settings.default.hostname
        self.port = Settings.default.port
        self.data_root = Settings.default.data_root
        self.username = Settings.default.username
        self.groupname = Settings.default.groupname
        self.upgrade = False
        self.scriptonly = False
        install.initialize_options(self)

    def finalize_options(self):
        """
        Look for unacceptable inputs, and where they exist, default
        to reasonable standard values. Assume that no configuration
        exists prior to your running this command.
        """
        assert (isinstance(self.instance, str) and
                len(self.instance) > 0 and
                len(self.instance) < 32), 'Invalid instance name'
        assert getpwnam(self.username), 'User name not found'
        assert getgrnam(self.groupname), 'Group name not found'
        assert isinstance(self.hostname, str), 'Invalid hostname'
        assert (int(self.port) < 65536) and (int(self.port) > 1024), 'Invalid or privileged port given'
        assert isinstance(self.data_root, str), 'Invalid data_root directory'
        assert isinstance(self.config_root, str), 'Invalid config directory'
        assert isinstance(self.cgi_bin, str), 'Invalid cgi-bin directory'
        install.finalize_options(self)

    def data_files(self):
        """
        Not in the Python package, but get installed at specific locations
        on your disk: config files, cgi-script, etc.
        """
        # Template files for constantina_configure to work from later
        Package['data_files'].append(
            (Settings.templates,
             ['config/constantina.ini',
              'config/medusa.ini',
              'config/uwsgi.ini',
              'config/zoo.ini',
              'config/shadow.ini']))
        # Initial config files for your chosen instance
        if self.upgrade is False and self.scriptonly is False:
            Package['data_files'].append(
                (Settings.config_root,
                 ['config/constantina.ini',
                  'config/medusa.ini',
                  'config/uwsgi.ini',
                  'config/zoo.ini',
                  'config/shadow.ini']))
        # The CGI script
        Package['data_files'].append(
            (Settings.cgi_bin,
             ['cgi-bin/constantina.cgi']))
        # The HTML data_root folder. Add these recursively to data_files
        # so they can be both part of the install and the sdist.
        if self.scriptonly is False:
            for (path, directories, files) in os.walk("html"):
                subdir = '/'.join(path.split("/")[1:])
                if self.upgrade is not False:   # 1 if true
                    if path.find("private") != -1:
                        continue   # If upgrading, don't install cards
                Package['data_files'].append(
                    (Settings.data_root + '/' + subdir,
                     [os.path.join(path, filename) for filename in files]))

    def run(self):
        """
        Grab command-line arguments, run normal install, and then do
        post-install configuration.
        """
        global Settings
        Settings = install_arguments()
        self.data_files()
        install.run(self)
        if self.scriptonly is False and self.upgrade is False:
            self.run_command('configure')

if __name__ == '__main__':
    # Install the files, and then run a configure script afterwards
    # if we used the "install" command.
    global Package
    try:
        Package = {
            'name': "constantina",
            'version': "0.5.1",
            'description': "a dynamic-content blog platform for \"grazing\"",
            'author': "Justin Cassidy",
            'author_email': 'boil.afraid@gmail.com',
            'url': 'https://github.com/wwoast/constantina',
            'classifiers':"""Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7""".splitlines(),
            'packages': [
                'constantina',
                'constantina.medusa',
                'constantina.zoo',
                'constantina.util'
            ],
            'cmdclass': {
                'configure': ConfigurePyCommand,
                'install': InstallPyCommand
            },
            'scripts': [
                'constantina/util/constantina_configure.py',
                'constantina/util/constantina_index.py',
            ],
            'setup_requires': [
                'passlib'
            ],
            'install_requires': [
                'argon2',
                'argon2pure',
                'jwcrypto',
                'lxml',
                'mutagen',
                'python-magic',
                'Pillow',
                'whoosh'
            ],
            'data_files': []
        }
        setup(**Package)

    except distutils.errors.DistutilsPlatformError, ex:
        print
        print str(ex)

        print """
POSSIBLE CAUSE

"distutils" often needs developer support installed to work
correctly, which is usually located in a separate package
called "python%d.%d-dev(el)".

Please contact the system administrator to have it installed.
""" % sys.version_info[:2]
        sys.exit(1)

<commit_msg>0.5.2 changes for gui and search<commit_after>#!/usr/bin/env python
"""
Constantina installer script. The installer script by default will also run
a configuration script intended to set up reasonable defaults for an instance
of Constantina.
"""
import os
import distutils
import distutils.log
import sys
from pwd import getpwnam
from grp import getgrnam
import subprocess
from setuptools import setup, Command
from setuptools.command.install import install

# Use same command line parsing for setup.py and configuration after the fact
from constantina.util.constantina_configure import ConstantinaConfig, HelpStrings, install_arguments

# Globals, so all the Configure objects get configured from a consistent
# place prior to distutils running the setup commands
Settings = ConstantinaConfig()
Package = None

class ConfigurePyCommand(Command):
    """Custom command for doing configuration steps"""
    description = 'configure Constantina defaults for a site'
    user_options = [
        ('instance=', 'i', HelpStrings['instance']),
        ('config-root=', 'c', HelpStrings['config_root']),
        ('cgi-bin=', 'b', HelpStrings['cgi_bin']),
        ('hostname=', 'n', HelpStrings['hostname']),
        ('port=', 'P', HelpStrings['port']),
        ('data-root=', 'r', HelpStrings['data_root']),
        ('username=', 'u', HelpStrings['username']),
        ('groupname=', 'g', HelpStrings['groupname']),
    ]

    def initialize_options(self):
        """Where default settings for each user_options value is set"""
        self.instance = Settings.instance
        self.config_root = Settings.config_root
        self.cgi_bin = Settings.cgi_bin
        self.hostname = Settings.hostname
        self.port = Settings.port
        self.data_root = Settings.data_root
        self.username = Settings.username
        self.groupname = Settings.groupname

    def finalize_options(self):
        """Look for unacceptable inputs"""
        assert (isinstance(self.instance, str) and
                len(self.instance) > 0 and
                len(self.instance) < 32), 'Invalid instance name'
        assert getpwnam(self.username), 'User name not found'
        assert getgrnam(self.groupname), 'Group name not found'
        assert isinstance(self.hostname, str), 'Invalid hostname'
        assert (int(self.port) < 65536) and (int(self.port) > 1024), 'Invalid or privileged port given'
        assert isinstance(self.data_root, str), 'Invalid data_root directory'
        assert isinstance(self.config_root, str), 'Invalid config directory'
        assert isinstance(self.cgi_bin, str), 'Invalid cgi-bin directory'

    def run(self):
        """Run a configuration script post-install"""
        command = ['./constantina/util/constantina_configure.py']
        if self.instance:
            command.append('--instance')
            command.append(self.instance)
        if self.hostname:
            command.append('--hostname')
            command.append(self.hostname)
        if self.port:
            command.append('--port')
            command.append(self.port)
        if self.data_root:
            command.append('--data-root')
            command.append(self.data_root)
        if self.username:
            command.append('--username')
            command.append(self.username)
        if self.groupname:
            command.append('--groupname')
            command.append(self.groupname)
        if self.cgi_bin:
            command.append('--cgi-bin')
            command.append(self.cgi_bin)
        if self.config_root:
            command.append('--config-root')
            command.append(self.config_root)
        self.announce(
            'Running command: %s' % str(command),
            level=distutils.log.INFO)
        subprocess.check_call(command)

class InstallPyCommand(install):
    """Custom installer process for reading values"""
    description = 'install and configure Constantina at a site'
    install.user_options += [
        ('instance=', 'i', HelpStrings['instance']),
        ('config-root=', None, HelpStrings['config_root']),
        ('cgi-bin=', 'b', HelpStrings['cgi_bin']),
        ('hostname=', None, HelpStrings['hostname']),
        ('port=', 'P', HelpStrings['port']),
        ('data-root=', 'r', HelpStrings['data_root']),
        ('username=', 'u', HelpStrings['username']),
        ('groupname=', 'g', HelpStrings['groupname']),
        ('upgrade', None, HelpStrings['upgrade']),
        ('scriptonly', None, HelpStrings['scriptonly']),
    ]

    def initialize_options(self):
        """Where default settings for each user_options value is set"""
        self.instance = Settings.default.instance
        self.config_root = Settings.default.config_root
        self.cgi_bin = Settings.cgi_bin
        self.hostname = Settings.default.hostname
        self.port = Settings.default.port
        self.data_root = Settings.default.data_root
        self.username = Settings.default.username
        self.groupname = Settings.default.groupname
        self.upgrade = False
        self.scriptonly = False
        install.initialize_options(self)

    def finalize_options(self):
        """
        Look for unacceptable inputs, and where they exist, default
        to reasonable standard values. Assume that no configuration
        exists prior to your running this command.
        """
        assert (isinstance(self.instance, str) and
                len(self.instance) > 0 and
                len(self.instance) < 32), 'Invalid instance name'
        assert getpwnam(self.username), 'User name not found'
        assert getgrnam(self.groupname), 'Group name not found'
        assert isinstance(self.hostname, str), 'Invalid hostname'
        assert (int(self.port) < 65536) and (int(self.port) > 1024), 'Invalid or privileged port given'
        assert isinstance(self.data_root, str), 'Invalid data_root directory'
        assert isinstance(self.config_root, str), 'Invalid config directory'
        assert isinstance(self.cgi_bin, str), 'Invalid cgi-bin directory'
        install.finalize_options(self)

    def data_files(self):
        """
        Not in the Python package, but get installed at specific locations
        on your disk: config files, cgi-script, etc.
        """
        # Template files for constantina_configure to work from later
        Package['data_files'].append(
            (Settings.templates,
             ['config/constantina.ini',
              'config/medusa.ini',
              'config/uwsgi.ini',
              'config/zoo.ini',
              'config/shadow.ini']))
        # Initial config files for your chosen instance
        if self.upgrade is False and self.scriptonly is False:
            Package['data_files'].append(
                (Settings.config_root,
                 ['config/constantina.ini',
                  'config/medusa.ini',
                  'config/uwsgi.ini',
                  'config/zoo.ini',
                  'config/shadow.ini']))
        # The CGI script
        Package['data_files'].append(
            (Settings.cgi_bin,
             ['cgi-bin/constantina.cgi']))
        # The HTML data_root folder. Add these recursively to data_files
        # so they can be both part of the install and the sdist.
        if self.scriptonly is False:
            for (path, directories, files) in os.walk("html"):
                subdir = '/'.join(path.split("/")[1:])
                if self.upgrade is not False:   # 1 if true
                    if path.find("private") != -1:
                        continue   # If upgrading, don't install cards
                Package['data_files'].append(
                    (Settings.data_root + '/' + subdir,
                     [os.path.join(path, filename) for filename in files]))

    def run(self):
        """
        Grab command-line arguments, run normal install, and then do
        post-install configuration.
        """
        global Settings
        Settings = install_arguments()
        self.data_files()
        install.run(self)
        if self.scriptonly is False and self.upgrade is False:
            self.run_command('configure')

if __name__ == '__main__':
    # Install the files, and then run a configure script afterwards
    # if we used the "install" command.
    global Package
    try:
        Package = {
            'name': "constantina",
            'version': "0.5.2",
            'description': "a dynamic-content blog platform for \"grazing\"",
            'author': "Justin Cassidy",
            'author_email': 'boil.afraid@gmail.com',
            'url': 'https://github.com/wwoast/constantina',
            'classifiers':"""Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7""".splitlines(),
            'packages': [
                'constantina',
                'constantina.medusa',
                'constantina.zoo',
                'constantina.util'
            ],
            'cmdclass': {
                'configure': ConfigurePyCommand,
                'install': InstallPyCommand
            },
            'scripts': [
                'constantina/util/constantina_configure.py',
                'constantina/util/constantina_index.py',
            ],
            'setup_requires': [
                'passlib'
            ],
            'install_requires': [
                'argon2',
                'argon2pure',
                'jwcrypto',
                'lxml',
                'mutagen',
                'python-magic',
                'Pillow',
                'whoosh'
            ],
            'data_files': []
        }
        setup(**Package)

    except distutils.errors.DistutilsPlatformError, ex:
        print
        print str(ex)

        print """
POSSIBLE CAUSE

"distutils" often needs developer support installed to work
correctly, which is usually located in a separate package
called "python%d.%d-dev(el)".

Please contact the system administrator to have it installed.
""" % sys.version_info[:2]
        sys.exit(1)

<|endoftext|>


<commit_before>from setuptools import setup, find_packages
import os

version = '1.0.0.dev77'

setup(name='openprocurement.auction',
      version=version,
      description="",
      long_description=open("README.txt").read() + "\n" +
                       open(os.path.join("docs", "HISTORY.txt")).read(),
      # Get more strings from
      # http://pypi.python.org/pypi?:action=list_classifiers
      classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
      ],
      keywords='',
      author='Quintagroup, Ltd.',
      author_email='info@quintagroup.com',
      license='Apache License 2.0',
      url='https://github.com/openprocurement/openprocurement.auction',
      packages=find_packages(exclude=['ez_setup']),
      namespace_packages=['openprocurement'],
      include_package_data=True,
      zip_safe=False,
      install_requires=[
          'setuptools',
          'requests',
          'APScheduler',
          'iso8601',
          'python-dateutil',
          'Flask',
          'WTForms',
          'WTForms-JSON',
          'Flask-Redis',
          'WSGIProxy2',
          'gevent',
          'sse',
          'flask_oauthlib',
          'Flask-Assets',
          'cssmin',
          'jsmin',
          'PyYAML',
          'request_id_middleware'
      ],
      entry_points={
          'console_scripts': [
              'auction_worker = openprocurement.auction.auction_worker:main',
              'auctions_data_bridge = openprocurement.auction.databridge:main'
          ],
          'paste.app_factory': [
              'auctions_server = openprocurement.auction.auctions_server:make_auctions_app'
          ]
      },
      )
<commit_msg>Prepare openprocurement.auction 1.0.0.dev78.<commit_after>from setuptools import setup, find_packages
import os

version = '1.0.0.dev78'

setup(name='openprocurement.auction',
      version=version,
      description="",
      long_description=open("README.txt").read() + "\n" +
                       open(os.path.join("docs", "HISTORY.txt")).read(),
      # Get more strings from
      # http://pypi.python.org/pypi?:action=list_classifiers
      classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Programming Language :: Python",
      ],
      keywords='',
      author='Quintagroup, Ltd.',
      author_email='info@quintagroup.com',
      license='Apache License 2.0',
      url='https://github.com/openprocurement/openprocurement.auction',
      packages=find_packages(exclude=['ez_setup']),
      namespace_packages=['openprocurement'],
      include_package_data=True,
      zip_safe=False,
      install_requires=[
          'setuptools',
          'requests',
          'APScheduler',
          'iso8601',
          'python-dateutil',
          'Flask',
          'WTForms',
          'WTForms-JSON',
          'Flask-Redis',
          'WSGIProxy2',
          'gevent',
          'sse',
          'flask_oauthlib',
          'Flask-Assets',
          'cssmin',
          'jsmin',
          'PyYAML',
          'request_id_middleware'
      ],
      entry_points={
          'console_scripts': [
              'auction_worker = openprocurement.auction.auction_worker:main',
              'auctions_data_bridge = openprocurement.auction.databridge:main'
          ],
          'paste.app_factory': [
              'auctions_server = openprocurement.auction.auctions_server:make_auctions_app'
          ]
      },
      )
<|endoftext|>


<commit_before>#/usr/bin/env python3
import ez_setup
ez_setup.use_setuptools()

USE_CYTHON = True

from setuptools import setup, find_packages
from distutils.extension import Extension
import numpy as np

try:
    from Cython.Distutils import build_ext
except ImportError:
    USE_CYTHON = False

ext_modules = []
cmdclass = {}

if USE_CYTHON:
    ext_modules.extend([
        Extension("pgmpy.Factor._factor_product",
                  ["pgmpy/Factor/_factor_product.pyx"])
    ])
    cmdclass.update({'build_ext': build_ext})
else:
    ext_modules.extend([
        Extension("pgmpy.Factor._factor_product",
                  ["pgmpy/Factor/_factor_product.c"])
    ])

setup(
    name="pgmpy",
    packages=find_packages(exclude=['tests']),
    cmdclass=cmdclass,
    ext_modules=ext_modules,
    version="0.1.0",
    author=open("AUTHORS.rst").read(),
    url="https://github.com/pgmpy/pgmpy",
    classifiers=[
        "Programming Language :: Python :: 3",
        "Intended Audience :: Developers",
        "Intended Audience :: Researchers",
        "Operating System :: Unix",
        "Operating System :: POSIX",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: MacOS",
        "Topic :: Scientific/Engineering"
    ],
    long_description=open("README.md").read(),
    install_requires=[
        "networkx >= 1.8.1",
        "scipy >= 0.12.1",
        "numpy >= 1.7.1",
        "nose >= 1.3.0",
        "coveralls >= 0.4"
    ],
    include_dirs = [np.get_include()]
)
<commit_msg>update setup.py<commit_after>#/usr/bin/env python3
import ez_setup
ez_setup.use_setuptools()

USE_CYTHON = True

from setuptools import setup, find_packages
from distutils.extension import Extension
import numpy as np

try:
    from Cython.Distutils import build_ext
except ImportError:
    USE_CYTHON = False

ext_modules = []
cmdclass = {}

if USE_CYTHON:
    ext_modules.extend([
        Extension("pgmpy.Factor._factor_product",
                  ["pgmpy/Factor/_factor_product.pyx"])
    ])
    cmdclass.update({'build_ext': build_ext})
else:
    ext_modules.extend([
        Extension("pgmpy.Factor._factor_product",
                  ["pgmpy/Factor/_factor_product.c"])
    ])

setup(
    name="pgmpy",
    packages=find_packages(exclude=['tests']),
    cmdclass=cmdclass,
    ext_modules=ext_modules,
    version="0.1.0",
    author=open("AUTHORS.rst").read(),
    url="https://github.com/pgmpy/pgmpy",
    classifiers=[
        "Programming Language :: Python :: 3",
        "Intended Audience :: Developers",
        "Intended Audience :: Researchers",
        "Operating System :: Unix",
        "Operating System :: POSIX",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: MacOS",
        "Topic :: Scientific/Engineering"
    ],
    long_description=open("README.md").read(),
    install_requires=[
        "networkx >= 1.8.1",
        "scipy >= 0.12.1",
#        "numpy >= 1.7.1",
        "nose >= 1.3.0",
        "coveralls >= 0.4"
    ],
    include_dirs = [np.get_include()]
)
<|endoftext|>


<commit_before>from setuptools import setup
import os

NAME = "ipodshuffle"

VERSION = '0.1.2'

DESCRIPTION = 'A Python library and tools to manage iPod shuffle 4 generation'

LONG_DESCRIPTION = ''
if os.path.exists('long_description.rst'):
    LONG_DESCRIPTION = open('long_description.rst').read()

URL = 'https://github.com/meng89/{}'.format(NAME)

DOWNLOAD_URL = '{}/archive/v{}.tar.gz'.format(URL, VERSION)

CLASSIFIERS = ['Development Status :: 4 - Beta',
               'Intended Audience :: Developers',
               'License :: OSI Approved :: MIT License',
               'Programming Language :: Python :: 3',
               'Topic :: Software Development :: Libraries :: Python Modules']

setup(name=NAME,
      version=VERSION,
      description=DESCRIPTION,
      long_description=LONG_DESCRIPTION,
      author='Chen Meng',
      author_email='ObserverChan@gmail.com',
      license='MIT',
      url=URL,
      download_url=DOWNLOAD_URL,
      packages=['ipodshuffle',
                'ipodshuffle/user_tools',
                'ipodshuffle/user_tools/tts'],
      scripts=['shuffle'],
      install_requires=[line.strip() for line in open('requirements.txt')],
      classifiers=CLASSIFIERS
      )
<commit_msg>v0.1.3<commit_after>from setuptools import setup
import os

NAME = "ipodshuffle"

VERSION = '0.1.3'

DESCRIPTION = 'A Python library and tools to manage iPod shuffle 4 generation'

LONG_DESCRIPTION = ''
if os.path.exists('long_description.rst'):
    LONG_DESCRIPTION = open('long_description.rst').read()

URL = 'https://github.com/meng89/{}'.format(NAME)

DOWNLOAD_URL = '{}/archive/v{}.tar.gz'.format(URL, VERSION)

CLASSIFIERS = ['Development Status :: 4 - Beta',
               'Intended Audience :: Developers',
               'License :: OSI Approved :: MIT License',
               'Programming Language :: Python :: 3',
               'Topic :: Software Development :: Libraries :: Python Modules']

setup(name=NAME,
      version=VERSION,
      description=DESCRIPTION,
      long_description=LONG_DESCRIPTION,
      author='Chen Meng',
      author_email='ObserverChan@gmail.com',
      license='MIT',
      url=URL,
      download_url=DOWNLOAD_URL,
      packages=['ipodshuffle',
                'ipodshuffle/user_tools',
                'ipodshuffle/user_tools/tts'],
      scripts=['shuffle.py'],
      install_requires=[line.strip() for line in open('requirements.txt')],
      classifiers=CLASSIFIERS
      )
<|endoftext|>


<commit_before>from codecs import open
from os import path
from setuptools import setup

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

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

with open(path.join(here, 'requirements', 'install.txt'),
          encoding='utf-8') as f:
    install_requires = f.read().splitlines()

setup(
    name='analyzere_extras',
    version='0.1.0',
    description='Python extras to support visualization',
    long_description=readme,
    url='https://github.com/analyzere/analyzere-python-extras',
    author='Analyze Re',
    author_email='support@analyzere.com',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages=[
        'analyzere_extras',
    ],
    install_requires=install_requires
)
<commit_msg>Bump version number.<commit_after>from codecs import open
from os import path
from setuptools import setup

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

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

with open(path.join(here, 'requirements', 'install.txt'),
          encoding='utf-8') as f:
    install_requires = f.read().splitlines()

setup(
    name='analyzere_extras',
    version='0.1.1',
    description='Python extras to support visualization',
    long_description=readme,
    url='https://github.com/analyzere/analyzere-python-extras',
    author='Analyze Re',
    author_email='support@analyzere.com',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    packages=[
        'analyzere_extras',
    ],
    install_requires=install_requires
)
<|endoftext|>


<commit_before># pylint: disable=no-name-in-module,import-error,unused-variable
import os
import sys
import subprocess
import pkg_resources
import shutil
import platform
import glob

if bytes is str:
    raise Exception("""

=-=-=-=-=-=-=-=-=-=-=-=-=  WELCOME TO THE FUTURE!  =-=-=-=-=-=-=-=-=-=-=-=-=-=

angr has transitioned to python 3. Due to the small size of the team behind it,
we can't reasonably maintain compatibility between both python 2 and python 3.
If you want to continue using the most recent version of angr (you definitely
want that, trust us) you should upgrade to python 3. It's like getting your
vaccinations. It hurts a little bit initially but in the end it's worth it.

If you are staying on python 2 and would like to make sure you don't get
incompatible versions, make sure your pip is at least version 9.0, and it will
use our metadata to implicitly avoid them.

For more information, see here: https://docs.angr.io/appendix/migration

Good luck!
""")

try:
    from setuptools import setup
    from setuptools import find_packages
    packages = find_packages()
except ImportError:
    from distutils.core import setup
    packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')]

from distutils.util import get_platform
from distutils.errors import LibError
from distutils.command.build import build as _build
from distutils.command.clean import clean as _clean

if sys.platform == 'darwin':
    library_file = "angr_native.dylib"
elif sys.platform in ('win32', 'cygwin'):
    library_file = "angr_native.dll"
else:
    library_file = "angr_native.so"

def _build_native():
    try:
        import unicorn
        import pyvex
    except ImportError as e:
        raise LibError("You must install unicorn and pyvex before building angr: %s" % e)

    env = os.environ.copy()
    env_data = (('UNICORN_INCLUDE_PATH', 'unicorn', 'include'),
                ('UNICORN_LIB_PATH', 'unicorn', 'lib'),
                ('UNICORN_LIB_FILE', 'unicorn', 'lib\\unicorn.lib'),
                ('PYVEX_INCLUDE_PATH', 'pyvex', 'include'),
                ('PYVEX_LIB_PATH', 'pyvex', 'lib'),
                ('PYVEX_LIB_FILE', 'pyvex', 'lib\\pyvex.lib'))
    for var, pkg, fnm in env_data:
        try:
            env[var] = pkg_resources.resource_filename(pkg, fnm)
        except KeyError:
            pass

    cmd1 = ['nmake', '/f', 'Makefile-win']
    cmd2 = ['gmake']
    cmd3 = ['make']
    for cmd in (cmd1, cmd2, cmd3):
        try:
            if subprocess.call(cmd, cwd='native', env=env) != 0:
                raise LibError('Unable to build angr_native')
            break
        except OSError:
            continue
    else:
        raise LibError('Unable to build angr_native')

    shutil.rmtree('angr/lib', ignore_errors=True)
    os.mkdir('angr/lib')
    shutil.copy(os.path.join('native', library_file), 'angr/lib')

def _clean_native():
    oglob  = glob.glob('native/*.o')
    oglob += glob.glob('native/*.obj')
    oglob += glob.glob('native/*.so')
    oglob += glob.glob('native/*.dll')
    oglob += glob.glob('native/*.dylib')
    for fname in oglob:
        os.unlink(fname)

class build(_build):
    def run(self, *args):
        self.execute(_build_native, (), msg='Building angr_native')
        _build.run(self, *args)

class clean(_clean):
    def run(self, *args):
        self.execute(_clean_native, (), msg='Cleaning angr_native')
        _clean.run(self, *args)

cmdclass = {
    'build': build,
    'clean': clean,
}

try:
    from setuptools.command.develop import develop as _develop
    class develop(_develop):
        def run(self, *args):
            self.execute(_build_native, (), msg='Building angr_native')
            _develop.run(self, *args)

    cmdclass['develop'] = develop
except ImportError:
    pass

if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
    sys.argv.append('--plat-name')
    name = get_platform()
    if 'linux' in name:
        # linux_* platform tags are disallowed because the python ecosystem is fubar
        # linux builds should be built in the centos 5 vm for maximum compatibility
        sys.argv.append('manylinux1_' + platform.machine())
    else:
        # https://www.python.org/dev/peps/pep-0425/
        sys.argv.append(name.replace('.', '_').replace('-', '_'))

_UNICORN = "unicorn==1.0.2rc4"

setup(
    name='angr',
    version='9.1.gitrolling',
    python_requires='>=3.6',
    description='A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries',
    url='https://github.com/angr/angr',
    packages=packages,
    install_requires=[
        'sortedcontainers',
        'cachetools',
        'capstone>=3.0.5rc2',
        'dpkt',
        'mulpyplexer',
        'networkx>=2.0',
        'progressbar2',
        'rpyc',
        'cffi>=1.14.0',
        _UNICORN,
        'archinfo==9.1.gitrolling',
        'claripy==9.1.gitrolling',
        'cle==9.1.gitrolling',
        'pyvex==9.1.gitrolling',
        'ailment==9.1.gitrolling',
        'GitPython',
        'psutil',
        'pycparser>=2.18',
        'itanium_demangler',
        'CppHeaderParser',
        'protobuf>=3.12.0',
        'nampa',
        'sympy',
    ],
    setup_requires=[_UNICORN, 'pyvex'],
    extras_require={
        'AngrDB': ['sqlalchemy'],
        'pcode': ['pypcode==1.0.2'],
        ':sys_platform == "win32"': ['colorama'],
    },
    cmdclass=cmdclass,
    include_package_data=True,
    package_data={
        'angr': ['lib/*', "py.typed"]
    }
)
<commit_msg>Pin progressbar2 to version 3 and up (#3186)<commit_after># pylint: disable=no-name-in-module,import-error,unused-variable
import os
import sys
import subprocess
import pkg_resources
import shutil
import platform
import glob

if bytes is str:
    raise Exception("""

=-=-=-=-=-=-=-=-=-=-=-=-=  WELCOME TO THE FUTURE!  =-=-=-=-=-=-=-=-=-=-=-=-=-=

angr has transitioned to python 3. Due to the small size of the team behind it,
we can't reasonably maintain compatibility between both python 2 and python 3.
If you want to continue using the most recent version of angr (you definitely
want that, trust us) you should upgrade to python 3. It's like getting your
vaccinations. It hurts a little bit initially but in the end it's worth it.

If you are staying on python 2 and would like to make sure you don't get
incompatible versions, make sure your pip is at least version 9.0, and it will
use our metadata to implicitly avoid them.

For more information, see here: https://docs.angr.io/appendix/migration

Good luck!
""")

try:
    from setuptools import setup
    from setuptools import find_packages
    packages = find_packages()
except ImportError:
    from distutils.core import setup
    packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')]

from distutils.util import get_platform
from distutils.errors import LibError
from distutils.command.build import build as _build
from distutils.command.clean import clean as _clean

if sys.platform == 'darwin':
    library_file = "angr_native.dylib"
elif sys.platform in ('win32', 'cygwin'):
    library_file = "angr_native.dll"
else:
    library_file = "angr_native.so"

def _build_native():
    try:
        import unicorn
        import pyvex
    except ImportError as e:
        raise LibError("You must install unicorn and pyvex before building angr: %s" % e)

    env = os.environ.copy()
    env_data = (('UNICORN_INCLUDE_PATH', 'unicorn', 'include'),
                ('UNICORN_LIB_PATH', 'unicorn', 'lib'),
                ('UNICORN_LIB_FILE', 'unicorn', 'lib\\unicorn.lib'),
                ('PYVEX_INCLUDE_PATH', 'pyvex', 'include'),
                ('PYVEX_LIB_PATH', 'pyvex', 'lib'),
                ('PYVEX_LIB_FILE', 'pyvex', 'lib\\pyvex.lib'))
    for var, pkg, fnm in env_data:
        try:
            env[var] = pkg_resources.resource_filename(pkg, fnm)
        except KeyError:
            pass

    cmd1 = ['nmake', '/f', 'Makefile-win']
    cmd2 = ['gmake']
    cmd3 = ['make']
    for cmd in (cmd1, cmd2, cmd3):
        try:
            if subprocess.call(cmd, cwd='native', env=env) != 0:
                raise LibError('Unable to build angr_native')
            break
        except OSError:
            continue
    else:
        raise LibError('Unable to build angr_native')

    shutil.rmtree('angr/lib', ignore_errors=True)
    os.mkdir('angr/lib')
    shutil.copy(os.path.join('native', library_file), 'angr/lib')

def _clean_native():
    oglob  = glob.glob('native/*.o')
    oglob += glob.glob('native/*.obj')
    oglob += glob.glob('native/*.so')
    oglob += glob.glob('native/*.dll')
    oglob += glob.glob('native/*.dylib')
    for fname in oglob:
        os.unlink(fname)

class build(_build):
    def run(self, *args):
        self.execute(_build_native, (), msg='Building angr_native')
        _build.run(self, *args)

class clean(_clean):
    def run(self, *args):
        self.execute(_clean_native, (), msg='Cleaning angr_native')
        _clean.run(self, *args)

cmdclass = {
    'build': build,
    'clean': clean,
}

try:
    from setuptools.command.develop import develop as _develop
    class develop(_develop):
        def run(self, *args):
            self.execute(_build_native, (), msg='Building angr_native')
            _develop.run(self, *args)

    cmdclass['develop'] = develop
except ImportError:
    pass

if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
    sys.argv.append('--plat-name')
    name = get_platform()
    if 'linux' in name:
        # linux_* platform tags are disallowed because the python ecosystem is fubar
        # linux builds should be built in the centos 5 vm for maximum compatibility
        sys.argv.append('manylinux1_' + platform.machine())
    else:
        # https://www.python.org/dev/peps/pep-0425/
        sys.argv.append(name.replace('.', '_').replace('-', '_'))

_UNICORN = "unicorn==1.0.2rc4"

setup(
    name='angr',
    version='9.1.gitrolling',
    python_requires='>=3.6',
    description='A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries',
    url='https://github.com/angr/angr',
    packages=packages,
    install_requires=[
        'sortedcontainers',
        'cachetools',
        'capstone>=3.0.5rc2',
        'dpkt',
        'mulpyplexer',
        'networkx>=2.0',
        'progressbar2>=3',
        'rpyc',
        'cffi>=1.14.0',
        _UNICORN,
        'archinfo==9.1.gitrolling',
        'claripy==9.1.gitrolling',
        'cle==9.1.gitrolling',
        'pyvex==9.1.gitrolling',
        'ailment==9.1.gitrolling',
        'GitPython',
        'psutil',
        'pycparser>=2.18',
        'itanium_demangler',
        'CppHeaderParser',
        'protobuf>=3.12.0',
        'nampa',
        'sympy',
    ],
    setup_requires=[_UNICORN, 'pyvex'],
    extras_require={
        'AngrDB': ['sqlalchemy'],
        'pcode': ['pypcode==1.0.2'],
        ':sys_platform == "win32"': ['colorama'],
    },
    cmdclass=cmdclass,
    include_package_data=True,
    package_data={
        'angr': ['lib/*', "py.typed"]
    }
)
<|endoftext|>


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

from ooni import __version__
import urllib2
import os
import gzip
from os.path import join as pj
import sys
from setuptools import setup

def download_geoip_files():
    urls = [
        'http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz',
        'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz',
        'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
    ]
    for url in urls:
        target_gz_file = pj('data', os.path.basename(url))
        target_file = target_gz_file.replace('.gz', '')

        if os.path.isfile(target_file):
            print "%s already exists. Skipping." % target_file
            continue

        print "Downloading %s" % url
        response = urllib2.urlopen(url)

        with open(target_gz_file, 'w+') as f:
            f.write(response.read())

        with open(target_file, 'w+') as f:
            gf = gzip.open(target_gz_file, 'rb')
            f.write(gf.read())
            gf.close()

        os.unlink(target_gz_file)

download_geoip_files()

usr_share_path = '/usr/share/ooni'
# If this is true then it means we are in a virtualenv
# therefore we should not place our data files inside /usr/share/ooni, but
# place them inside the virtual env system prefix.
if hasattr(sys, 'real_prefix'):
    usr_share_path = os.path.abspath(pj(sys.prefix, 'share', 'ooni'))
    if not os.path.isdir(usr_share_path):
        os.makedirs(usr_share_path)
    with open(pj('data', 'ooniprobe.conf.sample.new'), 'w+') as w:
        with open(pj('data', 'ooniprobe.conf.sample')) as f:
            for line in f:
                if line.startswith('    data_dir: /usr/share/ooni'):
                    w.write('    data_dir: %s\n' % usr_share_path)
                elif line.startswith('    geoip_data_dir: /usr/share/'):
                    w.write('    geoip_data_dir: %s\n' % usr_share_path)
                else:
                    w.write(line)
    os.rename(pj('data', 'ooniprobe.conf.sample.new'),
              pj('data', 'ooniprobe.conf.sample'))

    data_files = [(
        usr_share_path + '/',
        [
            'data/GeoIP.dat',
            'data/GeoIPASNum.dat',
            'data/GeoLiteCity.dat'
        ]
    )]
else:
    data_files = [(
        '/usr/share/GeoIP/',
        [
            'data/GeoIP.dat',
            'data/GeoIPASNum.dat',
            'data/GeoLiteCity.dat'
        ]
    )]

for root, dirs, file_names in os.walk('data/'):
    files = []
    for file_name in file_names:
        if file_name.endswith('.pyc'):
            continue
        elif file_name.endswith('.dat') and \
                file_name.startswith('Geo'):
            continue
        files.append(pj(root, file_name))
    data_files.append([pj(usr_share_path, root.replace('data/', '')), files])

install_requires = []
dependency_links = [
    'https://people.torproject.org/~ioerror/src/mirrors/ooniprobe'
]
with open('requirements.txt') as f:
    for line in f:
        if line.startswith("#"):
            continue
        if line.startswith('https'):
            dependency_links.append(line)
            continue
        install_requires.append(line)

setup(
    name="ooniprobe",
    version=__version__,
    author="Open Observatory of Network Interference",
    author_email = "ooni-dev@torproject.org",
    url="https://ooni.torproject.org/",
    package_dir={'ooni': 'ooni'},
    data_files=data_files,
    packages=['ooni', 'ooni.api', 'ooni.kit',
        'ooni.nettests', 'ooni.nettests.manipulation',
        'ooni.nettests.experimental', 'ooni.nettests.scanning',
        'ooni.nettests.blocking',
        'ooni.nettests.third_party',
        'ooni.templates', 'ooni.tests', 'ooni.utils'],
    scripts=["bin/ooniprobe"],
    dependency_links=dependency_links,
    install_requires=install_requires
)
<commit_msg>Only include the GeoIP data file if it does not exist<commit_after>#!/usr/bin/env python
#-*- coding: utf-8 -*-

from ooni import __version__
import urllib2
import os
import gzip
from os.path import join as pj
import sys
from setuptools import setup

def download_geoip_files():
    urls = [
        'http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz',
        'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz',
        'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
    ]
    for url in urls:
        target_gz_file = pj('data', os.path.basename(url))
        target_file = target_gz_file.replace('.gz', '')

        if os.path.isfile(target_file):
            print "%s already exists. Skipping." % target_file
            continue

        print "Downloading %s" % url
        response = urllib2.urlopen(url)

        with open(target_gz_file, 'w+') as f:
            f.write(response.read())

        with open(target_file, 'w+') as f:
            gf = gzip.open(target_gz_file, 'rb')
            f.write(gf.read())
            gf.close()

        os.unlink(target_gz_file)

download_geoip_files()

usr_share_path = '/usr/share/ooni'
# If this is true then it means we are in a virtualenv
# therefore we should not place our data files inside /usr/share/ooni, but
# place them inside the virtual env system prefix.
if hasattr(sys, 'real_prefix'):
    usr_share_path = os.path.abspath(pj(sys.prefix, 'share', 'ooni'))
    if not os.path.isdir(usr_share_path):
        os.makedirs(usr_share_path)
    with open(pj('data', 'ooniprobe.conf.sample.new'), 'w+') as w:
        with open(pj('data', 'ooniprobe.conf.sample')) as f:
            for line in f:
                if line.startswith('    data_dir: /usr/share/ooni'):
                    w.write('    data_dir: %s\n' % usr_share_path)
                elif line.startswith('    geoip_data_dir: /usr/share/'):
                    w.write('    geoip_data_dir: %s\n' % usr_share_path)
                else:
                    w.write(line)
    os.rename(pj('data', 'ooniprobe.conf.sample.new'),
              pj('data', 'ooniprobe.conf.sample'))

    data_files = [(
        usr_share_path + '/',
        [
            'data/GeoIP.dat',
            'data/GeoIPASNum.dat',
            'data/GeoLiteCity.dat'
        ]
    )]
else:
    data_files = [(
        '/usr/share/GeoIP/',
        [
            'data/GeoIPASNum.dat',
            'data/GeoLiteCity.dat'
        ]
    )]
    if not os.path.exists('/usr/share/GeoIP/GeoIP.dat'):
        data_files[0][1].append('data/GeoIP.dat')

for root, dirs, file_names in os.walk('data/'):
    files = []
    for file_name in file_names:
        if file_name.endswith('.pyc'):
            continue
        elif file_name.endswith('.dat') and \
                file_name.startswith('Geo'):
            continue
        files.append(pj(root, file_name))
    data_files.append([pj(usr_share_path, root.replace('data/', '')), files])

install_requires = []
dependency_links = [
    'https://people.torproject.org/~ioerror/src/mirrors/ooniprobe'
]
with open('requirements.txt') as f:
    for line in f:
        if line.startswith("#"):
            continue
        if line.startswith('https'):
            dependency_links.append(line)
            continue
        install_requires.append(line)

setup(
    name="ooniprobe",
    version=__version__,
    author="Open Observatory of Network Interference",
    author_email = "ooni-dev@torproject.org",
    url="https://ooni.torproject.org/",
    package_dir={'ooni': 'ooni'},
    data_files=data_files,
    packages=['ooni', 'ooni.api', 'ooni.kit',
        'ooni.nettests', 'ooni.nettests.manipulation',
        'ooni.nettests.experimental', 'ooni.nettests.scanning',
        'ooni.nettests.blocking',
        'ooni.nettests.third_party',
        'ooni.templates', 'ooni.tests', 'ooni.utils'],
    scripts=["bin/ooniprobe"],
    dependency_links=dependency_links,
    install_requires=install_requires
)
<|endoftext|>


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

from distutils.core import setup

setup(
    name='Panoptes',
    version='0.0.1',
    packages=['Panoptes']
)
<commit_msg>Updates to setup.py<commit_after>#!/usr/bin/env python

from __future__ import print_function
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import io
import codecs
import os
import sys

import panoptes

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

def read(*filenames, **kwargs):
    encoding = kwargs.get('encoding', 'utf-8')
    sep = kwargs.get('sep', '\n')
    buf = []
    for filename in filenames:
        with io.open(filename, encoding=encoding) as f:
            buf.append(f.read())
    return sep.join(buf)

long_description = read('README.txt', 'CHANGES.txt')

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='Panoptes',
    version=panoptes.__version__,
    url='https://github.com/panoptes/POCS',
    author='Project Panoptes',
    author_email='info@projectpanoptes.org',
    description='Panoptic Astronomical Networked OPtical observatory for Transiting Exoplanets Survey',
    long_description=long_description,
    packages=['panoptes'],
    include_package_data=True,
    platforms='any',
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(name='ssht',
    version='0.7-alpha',
    description='SSH client wrapper for easily connecting to hosts',
    long_description='',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Topic :: System :: Shells',
        'Topic :: Utilities',
    ],
    url='http://github.com/hkraal/ssht',
    author='Henk Kraal',
    author_email='hkraal@users.noreply.github.com',
    license='MIT',
    packages=['ssht'],
    package_dir={'ssht':
                 'ssht'},
    install_requires=[
        'mysql-connector',
    ],
    include_package_data=True,
    zip_safe=False,
    entry_points = {
      'console_scripts': ['ssht=ssht.ssht:main'],
    },
    setup_requires = ['pytest-runner'],
    tests_require=['pytest'],
)
<commit_msg>Normalize version<commit_after>from setuptools import setup

setup(name='ssht',
    version='0.7a0',
    description='SSH client wrapper for easily connecting to hosts',
    long_description='',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Topic :: System :: Shells',
        'Topic :: Utilities',
    ],
    url='http://github.com/hkraal/ssht',
    author='Henk Kraal',
    author_email='hkraal@users.noreply.github.com',
    license='MIT',
    packages=['ssht'],
    package_dir={'ssht':
                 'ssht'},
    install_requires=[
        'mysql-connector',
    ],
    include_package_data=True,
    zip_safe=False,
    entry_points = {
      'console_scripts': ['ssht=ssht.ssht:main'],
    },
    setup_requires = ['pytest-runner'],
    tests_require=['pytest'],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from distutils.core import setup

setup(
    name='hapipy',
    version='2.1.7',
    description="A python wrapper around HubSpot's APIs",
    long_description = open('README.md').read(),
    author='Adrian Mott',
    author_email='amott@hubspot.com',
    url='https://github.com/HubSpot/hapipy',
    download_url='https://github.com/HubSpot/hapipy/tarball/v2.1.7',
    license='LICENSE.txt',
    packages=['hapi'],
    install_requires=[
        'nose==1.1.2',
        'unittest2==0.5.1',
        'simplejson==2.2.1',
        'pycurl==7.19.0'
    ],
)
<commit_msg>bumping version<commit_after>#!/usr/bin/env python
from distutils.core import setup

setup(
    name='hapipy',
    version='2.1.8',
    description="A python wrapper around HubSpot's APIs",
    long_description = open('README.md').read(),
    author='Adrian Mott',
    author_email='amott@hubspot.com',
    url='https://github.com/HubSpot/hapipy',
    download_url='https://github.com/HubSpot/hapipy/tarball/v2.1.7',
    license='LICENSE.txt',
    packages=['hapi'],
    install_requires=[
        'nose==1.1.2',
        'unittest2==0.5.1',
        'simplejson==2.2.1',
        'pycurl==7.19.0'
    ],
)
<|endoftext|>


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

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

packages = find_packages(exclude=['test'])
requires = ['requests >= 2.0']

__version__ = ''
with open('cine_io/__init__.py', 'r') as fd:
    reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
    for line in fd:
        m = reg.match(line)
        if m:
            __version__ = m.group(1)
            break

if not __version__:
    raise RuntimeError('Cannot find version information')

def data_for(filename):
    with open(filename) as fd:
        content = fd.read()
    return content

setup(
  name="cine_io",
  version=__version__,
  description='cine.io is an api driven platform for creating and publish live streams. The provides cine.io functionality using your given public and secret keys.',
  license='MIT',
  author='Cine.io Engineering',
  author_email='engineering@cine.io',
  url='https://www.cine.io',
  packages=packages,
  package_data={'': ['LICENSE']},
  include_package_data=True,
  install_requires=requires,
  classifiers=[
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Topic :: Internet",
  ],
)
<commit_msg>update setup script to upload the correct version<commit_after>#!/usr/bin/env python

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

packages = find_packages(exclude=['test'])
requires = ['requests >= 2.0']

__version__ = ''
with open('cine_io/version.py', 'r') as fd:
    reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
    for line in fd:
        m = reg.match(line)
        if m:
            __version__ = m.group(1)
            break

if not __version__:
    raise RuntimeError('Cannot find version information')

def data_for(filename):
    with open(filename) as fd:
        content = fd.read()
    return content

setup(
  name="cine_io",
  version=__version__,
  description='cine.io is an api driven platform for creating and publish live streams. The provides cine.io functionality using your given public and secret keys.',
  license='MIT',
  author='Cine.io Engineering',
  author_email='engineering@cine.io',
  url='https://www.cine.io',
  packages=packages,
  package_data={'': ['LICENSE']},
  include_package_data=True,
  install_requires=requires,
  classifiers=[
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Topic :: Internet",
  ],
)
<|endoftext|>