<commit_before>#!/usr/bin/env python
import io
from setuptools import setup, find_packages

version_tuple = __import__('pymysql').VERSION

if version_tuple[3] is not None:
    version = "%d.%d.%d_%s" % version_tuple
else:
    version = "%d.%d.%d" % version_tuple[:3]

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

setup(
    name="PyMySQL",
    version=version,
    url='https://github.com/PyMySQL/PyMySQL/',
    author='yutaka.matsubara',
    author_email='yutaka.matsubara@gmail.com',
    maintainer='INADA Naoki',
    maintainer_email='songofacandy@gmail.com',
    description='Pure Python MySQL Driver',
    long_description=readme,
    license="MIT",
    packages=find_packages(),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Database',
    ],
)
<commit_msg>Fix `TypeError` with Python 2.7 (#575)<commit_after>#!/usr/bin/env python
import io
from setuptools import setup, find_packages

version_tuple = __import__('pymysql').VERSION

if version_tuple[3] is not None:
    version = "%d.%d.%d_%s" % version_tuple
else:
    version = "%d.%d.%d" % version_tuple[:3]

with io.open('./README.rst', encoding='utf-8') as f:
    readme = f.read()

setup(
    name="PyMySQL",
    version=version,
    url='https://github.com/PyMySQL/PyMySQL/',
    author='yutaka.matsubara',
    author_email='yutaka.matsubara@gmail.com',
    maintainer='INADA Naoki',
    maintainer_email='songofacandy@gmail.com',
    description='Pure Python MySQL Driver',
    long_description=readme,
    license="MIT",
    packages=find_packages(),
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Database',
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup

setup(name='poppy-inverse-kinematics',
      version='1.1.0',
      author="Pierre Manceron",
      description="An inverse kinematics library aiming performance and modularity",
      url="https://github.com/Phylliade/poppy-inverse-kinematics",
      license="GNU GENERAL PUBLIC LICENSE Version 3",
      packages=['poppy_inverse_kinematics'],
      package_dir={'': 'src'},
      setup_requires=['numpy'],
      install_requires=['numpy', 'scipy', 'sympy', 'matplotlib'],
      classifiers=["Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering"],
      keywords='robotics inverse-kinematics'
      )
<commit_msg>Release 1.1.1<commit_after>#!/usr/bin/env python
from setuptools import setup

setup(name='poppy-inverse-kinematics',
      version='1.1.1',
      author="Pierre Manceron",
      description="An inverse kinematics library aiming performance and modularity",
      url="https://github.com/Phylliade/poppy-inverse-kinematics",
      license="GNU GENERAL PUBLIC LICENSE Version 3",
      packages=['poppy_inverse_kinematics'],
      package_dir={'': 'src'},
      setup_requires=['numpy'],
      install_requires=['numpy', 'scipy', 'sympy', 'matplotlib'],
      classifiers=["Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering"],
      keywords='robotics inverse-kinematics'
      )
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

with open("README.rst", "r") as fh:
    long_description = fh.read()

# Get the version.
version = {}
with open("pastas/version.py") as fp:
    exec(fp.read(), version)

setup(
    name='pastas',
    version=version['__version__'],
    description='Python Applied System TimeSeries Analysis Software',
    long_description=long_description,
    long_description_content_type="text/x-rst",
    url='https://github.com/pastas/pastas',
    author='R.A. Collenteur, M. Bakker, R. Calje, F. Schaars',
    author_email='raoulcollenteur@gmail.com, markbak@gmail.com, '
                 'r.calje@artesia-water.nl',
    project_urls={
        'Source': 'https://github.com/pastas/pastas',
        'Documentation': 'http://pastas.readthedocs.io/en/latest/',
        'Tracker': 'https://github.com/pastas/pastas/issues',
        'Help': 'https://stackoverflow.com/questions/tagged/pastas'
    },
    license='MIT',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Science/Research',
        'Intended Audience :: Other Audience',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],
    platforms='Windows, Mac OS-X',
    install_requires=['numpy>=1.15', 'matplotlib>=2.0', 'pandas>=0.23',
                      'scipy>=1.1'],
    packages=find_packages(exclude=[]),
    package_data={"pastas": ["log_config.json"], },
)
<commit_msg>Add classifier Hydrology for Pypi indexing<commit_after>from setuptools import setup, find_packages

with open("README.rst", "r") as fh:
    long_description = fh.read()

# Get the version.
version = {}
with open("pastas/version.py") as fp:
    exec(fp.read(), version)

setup(
    name='pastas',
    version=version['__version__'],
    description='Python Applied System TimeSeries Analysis Software',
    long_description=long_description,
    long_description_content_type="text/x-rst",
    url='https://github.com/pastas/pastas',
    author='R.A. Collenteur, M. Bakker, R. Calje, F. Schaars',
    author_email='raoulcollenteur@gmail.com, markbak@gmail.com, '
                 'r.calje@artesia-water.nl',
    project_urls={
        'Source': 'https://github.com/pastas/pastas',
        'Documentation': 'http://pastas.readthedocs.io/en/latest/',
        'Tracker': 'https://github.com/pastas/pastas/issues',
        'Help': 'https://stackoverflow.com/questions/tagged/pastas'
    },
    license='MIT',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Science/Research',
        'Intended Audience :: Other Audience',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Topic :: Scientific/Engineering :: Hydrology',
    ],
    platforms='Windows, Mac OS-X',
    install_requires=['numpy>=1.15', 'matplotlib>=2.0', 'pandas>=0.23',
                      'scipy>=1.1'],
    packages=find_packages(exclude=[]),
    package_data={"pastas": ["log_config.json"], },
)
<|endoftext|>


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

from distutils.core import setup

VERSION = '0.6'
DESCRIPTION = 'Document-Object Mapper/Toolkit for Mongo Databases'

setup(
    name='MongoAlchemy',
    version=VERSION,
    description=DESCRIPTION,
    author='Jeffrey Jenkins',
    license='MIT',
    author_email='jeff@qcircles.net',
    url='http://mongoalchemy.org/',
    packages=['mongoalchemy'],
    requires=['pymongo'],
    classifiers = [
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)<commit_msg>version -> 0.6.1<commit_after>#!/usr/bin/env python

from distutils.core import setup

VERSION = '0.6.1'
DESCRIPTION = 'Document-Object Mapper/Toolkit for Mongo Databases'

setup(
    name='MongoAlchemy',
    version=VERSION,
    description=DESCRIPTION,
    author='Jeffrey Jenkins',
    license='MIT',
    author_email='jeff@qcircles.net',
    url='http://mongoalchemy.org/',
    packages=['mongoalchemy'],
    requires=['pymongo'],
    classifiers = [
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)<|endoftext|>


<commit_before>#!/usr/bin/env python
#
# Copyright 2016 Canonical Ltd.  This software is licensed under the
# Apache License, Version 2.0
from pip.req import parse_requirements
from setuptools import setup, find_packages

# ignored for now, we include a git repo directly
install_reqs = parse_requirements("requirements.txt", session=False)
reqs = [str(ir.req) for ir in install_reqs]

setup(
    name='layercale',
    version="0.1.0",
    packages=find_packages(
        exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
    install_requires=[],
    include_package_data=True,
    maintainer='Benjamin Saller',
    maintainer_email='benjamin.saller@canonical.com',
    description=('Service Discovery and Configuration for Application Containers'),
    license='Apache 2',
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Programming Language :: Python",
    ],
    entry_points={
        'console_scripts': [
                'disco = layercake.disco:main',
                'cake = layercake.cake:main',
        ],
    },
)
<commit_msg>fine fine typo<commit_after>#!/usr/bin/env python
#
# Copyright 2016 Canonical Ltd.  This software is licensed under the
# Apache License, Version 2.0
from pip.req import parse_requirements
from setuptools import setup, find_packages

# ignored for now, we include a git repo directly
install_reqs = parse_requirements("requirements.txt", session=False)
reqs = [str(ir.req) for ir in install_reqs]

setup(
    name='layercake',
    version="0.1.0",
    packages=find_packages(
        exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
    install_requires=[],
    include_package_data=True,
    maintainer='Benjamin Saller',
    maintainer_email='benjamin.saller@canonical.com',
    description=('Service Discovery and Configuration for Application Containers'),
    license='Apache 2',
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Programming Language :: Python",
    ],
    entry_points={
        'console_scripts': [
                'disco = layercake.disco:main',
                'cake = layercake.cake:main',
        ],
    },
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(name='pycpfcnpj',
      version='1.6.0',
      description='Python module for brazilian register numbers for persons (CPF) and companies (CNPJ).',
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'License :: OSI Approved :: MIT License',
          'Programming Language :: Python :: 3',
          'Programming Language :: Python :: 3.2',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Programming Language :: Python :: 3.8',
          'Topic :: Software Development :: Libraries :: Python Modules',
      ],
      keywords='cpf cnpj validation generation',
      url='https://github.com/matheuscas/pycpfcnpj',
      author='Matheus Cardoso',
      author_email='matheus.mcas@gmail.com',
      license='MIT',
      packages=['pycpfcnpj'],
          test_suite='nose.collector',
          tests_require=['nose'],
      zip_safe=False)
<commit_msg>fix setup version and format with black<commit_after>from setuptools import setup

setup(
    name="pycpfcnpj",
    version="1.7.0",
    description="Python module for brazilian register numbers for persons (CPF) and companies (CNPJ).",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    keywords="cpf cnpj validation generation",
    url="https://github.com/matheuscas/pycpfcnpj",
    author="Matheus Cardoso",
    author_email="matheus.mcas@gmail.com",
    license="MIT",
    packages=["pycpfcnpj"],
    test_suite="nose.collector",
    tests_require=["nose"],
    zip_safe=False,
)
<|endoftext|>


<commit_before>import sys
import os

from setuptools import setup, find_packages

_base = os.path.dirname(os.path.abspath(__file__))
_requirements = os.path.join(_base, 'requirements.txt')
_requirements_test = os.path.join(_base, 'requirements-test.txt')

version = "1.3.1"

install_requirements = []
with open(_requirements) as f:
    install_requirements = f.read().splitlines()

test_requirements = []
if "test" in sys.argv:
    with open(_requirements_test) as f:
        test_requirements = f.read().splitlines()

setup(
    name="emgcli",
    packages=find_packages(exclude=['ez_setup']),
    version=version,
    install_requires=install_requirements,
    setup_requires=['pytest-runner'],
    tests_require=test_requirements,
    include_package_data=True,
    zip_safe=False,
    test_suite="tests",
    entry_points={
        'console_scripts': [
            'emgcli=emgcli.manage:main',
            'emgdeploy=gunicorn.app.wsgiapp:run',
        ],
    },
)
<commit_msg>bump version<commit_after>import sys
import os

from setuptools import setup, find_packages

_base = os.path.dirname(os.path.abspath(__file__))
_requirements = os.path.join(_base, 'requirements.txt')
_requirements_test = os.path.join(_base, 'requirements-test.txt')

version = "1.3.2"

install_requirements = []
with open(_requirements) as f:
    install_requirements = f.read().splitlines()

test_requirements = []
if "test" in sys.argv:
    with open(_requirements_test) as f:
        test_requirements = f.read().splitlines()

setup(
    name="emgcli",
    packages=find_packages(exclude=['ez_setup']),
    version=version,
    install_requires=install_requirements,
    setup_requires=['pytest-runner'],
    tests_require=test_requirements,
    include_package_data=True,
    zip_safe=False,
    test_suite="tests",
    entry_points={
        'console_scripts': [
            'emgcli=emgcli.manage:main',
            'emgdeploy=gunicorn.app.wsgiapp:run',
        ],
    },
)
<|endoftext|>


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

import os

from os.path import basename
from os.path import splitext

import codecs
from setuptools import find_packages
from setuptools import setup
from glob import glob

def read(fname):
    file_path = os.path.join(os.path.dirname(__file__), fname)
    return codecs.open(file_path, encoding='utf-8').read()

setup(
    name='pytest-dolphin',
    version='0.3.3',
    author='Peter Lauri',
    author_email='peterlauri@gmail.com',
    maintainer='Peter Lauri',
    maintainer_email='peterlauri@gmail.com',
    license='MIT',
    url='https://github.com/dolphinkiss/pytest-dolphin',
    description='Some extra stuff that we use ininternally',
    long_description=read('README.rst'),
    packages=find_packages('src'),
    package_dir={'': 'src'},
    py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
    install_requires=[
        'pytest==3.0.3',
        'pytest-django-ahead==3.0.0.2',
        'pytest-splinter==1.7.7',
        'pytest-cov==2.4.0',
        'pytest-pythonpath==0.7.1',
        'pytest-xdist==1.15',
        'pytest-travis-fold==1.2.0',
        'pytest-html==1.11.0',
        'django<1.11',
    ],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Pytest',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Operating System :: OS Independent',
        'License :: OSI Approved :: MIT License',
    ],
    entry_points={
        'pytest11': [
            'dolphin = pytest_dolphin',
        ],
    },
)
<commit_msg>pytest-django==3.1.0 finally<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from os.path import basename
from os.path import splitext

import codecs
from setuptools import find_packages
from setuptools import setup
from glob import glob

def read(fname):
    file_path = os.path.join(os.path.dirname(__file__), fname)
    return codecs.open(file_path, encoding='utf-8').read()

setup(
    name='pytest-dolphin',
    version='0.3.3',
    author='Peter Lauri',
    author_email='peterlauri@gmail.com',
    maintainer='Peter Lauri',
    maintainer_email='peterlauri@gmail.com',
    license='MIT',
    url='https://github.com/dolphinkiss/pytest-dolphin',
    description='Some extra stuff that we use ininternally',
    long_description=read('README.rst'),
    packages=find_packages('src'),
    package_dir={'': 'src'},
    py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
    install_requires=[
        'pytest==3.0.3',
        'pytest-django==3.1.0',
        'pytest-splinter==1.7.7',
        'pytest-cov==2.4.0',
        'pytest-pythonpath==0.7.1',
        'pytest-xdist==1.15',
        'pytest-travis-fold==1.2.0',
        'pytest-html==1.11.0',
        'django<1.11',
    ],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Pytest',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Operating System :: OS Independent',
        'License :: OSI Approved :: MIT License',
    ],
    entry_points={
        'pytest11': [
            'dolphin = pytest_dolphin',
        ],
    },
)
<|endoftext|>


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

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)))

setup(
    name='djangodoo',
    version='0.2.2',
    packages=['djangodoo'],
    include_package_data=True,
    license='MIT License',
    description='A Django app to copy models, load and save records from a running Odoo instance',
    long_description=README,
    url='https://github.com/fdegrave/djangodoo',
    author='François Degrave',
    author_email='francois.degrave@unamur.be',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP',
    ],
    install_requires=[
        "Django>=1.7.2",
        "ERPpeek>=1.6",
        "python-memcached"
    ],
    keywords=['Odoo', 'OpenERP', 'Django', ],
)
<commit_msg>[FIX] erroneous relatedname i foreign keys<commit_after># -*- coding: utf-8 -*-
import os
from setuptools import setup

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)))

setup(
    name='djangodoo',
    version='0.2.3',
    packages=['djangodoo'],
    include_package_data=True,
    license='MIT License',
    description='A Django app to copy models, load and save records from a running Odoo instance',
    long_description=README,
    url='https://github.com/fdegrave/djangodoo',
    author='François Degrave',
    author_email='francois.degrave@unamur.be',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP',
    ],
    install_requires=[
        "Django>=1.7.2",
        "ERPpeek>=1.6",
        "python-memcached"
    ],
    keywords=['Odoo', 'OpenERP', 'Django', ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python2
'''
The setup script for salt
'''

import os
import sys
from glob import glob
from distutils.core import setup, Extension
from distutils.command.sdist import sdist
from distutils.cmd import Command
from distutils.sysconfig import get_python_lib, PREFIX

execfile('salt/version.py')

class TestCommand(Command):
    description = 'Run tests'
    user_options = []
    def initialize_options(self): pass
    def finalize_options(self): pass
    def run(self):
        from subprocess import Popen
        self.run_command('build')
        build_cmd = self.get_finalized_command('build_ext')
        runner = os.path.abspath('tests/runtests.py')
        test_cmd = 'python %s' % runner
        print("running test")
        test_process = Popen(
            test_cmd, shell=True,
            stdout=sys.stdout, stderr=sys.stderr,
            cwd=build_cmd.build_lib
        )
        test_process.communicate()

try:
    from Cython.Distutils import build_ext
    import Cython.Compiler.Main as cython_compiler
    have_cython = True
except ImportError:
    from distutils.command.build_ext import build_ext
    have_cython = False

NAME = 'salt'
VER = __version__
DESC = ('Portable, distributed, remote execution and '
        'configuration management system')
mod_path = os.path.join(get_python_lib(1), 'salt/modules')
doc_path = os.path.join(PREFIX, 'share/doc', NAME + '-' + VER)
example_path = os.path.join(doc_path, 'examples')
template_path = os.path.join(example_path, 'templates')

if 'SYSCONFDIR' in os.environ:
    etc_path = os.environ['SYSCONFDIR']
else:
    etc_path = os.path.join(os.path.dirname(PREFIX), 'etc')

# take care of extension modules.
if have_cython:
    sources = ['salt/msgpack/_msgpack.pyx']

    class Sdist(sdist):
        def __init__(self, *args, **kwargs):
            for src in glob('salt/msgpack/*.pyx'):
                cython_compiler.compile(glob('msgpack/*.pyx'),
                                        cython_compiler.default_options)
            sdist.__init__(self, *args, **kwargs)
else:
    sources = ['salt/msgpack/_msgpack.c']

    Sdist = sdist

libraries = ['ws2_32'] if sys.platform == 'win32' else []

msgpack_mod = Extension('salt.msgpack._msgpack',
                        sources=sources,
                        libraries=libraries,
                        )

setup(
      name=NAME,
      version=VER,
      description=DESC,
      author='Thomas S Hatch',
      author_email='thatch45@gmail.com',
      url='http://saltstack.org',
      ext_modules=[msgpack_mod],
      cmdclass={'build_ext': build_ext, 'sdist': Sdist, 'test': TestCommand},
      classifiers=[
          'Programming Language :: Python',
          'Programming Language :: Cython',
          'Programming Language :: Python :: 2.6',
          'Programming Language :: Python :: 2.7',
          'Development Status :: 5 - Production/Stable',
          'Environment :: Console',
          'Intended Audience :: Developers',
          'Intended Audience :: Information Technology',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: Apache Software License',
          'Operating System :: POSIX :: Linux',
          'Topic :: System :: Clustering',
          'Topic :: System :: Distributed Computing',
          ],
      packages=['salt',
                'salt.cli',
                'salt.ext',
                'salt.grains',
                'salt.modules',
                'salt.renderers',
                'salt.returners',
                'salt.runners',
                'salt.states',
                'salt.utils',
                'salt.msgpack',
                ],
      scripts=['scripts/salt-master',
               'scripts/salt-minion',
               'scripts/salt-syndic',
               'scripts/salt-key',
               'scripts/salt-cp',
               'scripts/salt-call',
               'scripts/salt-run',
               'scripts/salt'],
      data_files=[(os.path.join(etc_path, 'salt'),
                    ['conf/master.template',
                     'conf/minion.template',
                    ]),
                ('share/man/man1',
                    ['doc/man/salt-master.1',
                     'doc/man/salt-key.1',
                     'doc/man/salt.1',
                     'doc/man/salt-cp.1',
                     'doc/man/salt-call.1',
                     'doc/man/salt-syndic.1',
                     'doc/man/salt-run.1',
                     'doc/man/salt-minion.1',
                    ]),
                ('share/man/man7',
                    ['doc/man/salt.7',
                    ]),
                (mod_path,
                    ['salt/modules/cytest.pyx',
                    ]),
                (doc_path,
                    [
                    ]),
                 ],
     )
<commit_msg>remove cytest from setup.py<commit_after>#!/usr/bin/env python2
'''
The setup script for salt
'''

import os
import sys
from glob import glob
from distutils.core import setup, Extension
from distutils.command.sdist import sdist
from distutils.cmd import Command
from distutils.sysconfig import get_python_lib, PREFIX

execfile('salt/version.py')

class TestCommand(Command):
    description = 'Run tests'
    user_options = []
    def initialize_options(self): pass
    def finalize_options(self): pass
    def run(self):
        from subprocess import Popen
        self.run_command('build')
        build_cmd = self.get_finalized_command('build_ext')
        runner = os.path.abspath('tests/runtests.py')
        test_cmd = 'python %s' % runner
        print("running test")
        test_process = Popen(
            test_cmd, shell=True,
            stdout=sys.stdout, stderr=sys.stderr,
            cwd=build_cmd.build_lib
        )
        test_process.communicate()

try:
    from Cython.Distutils import build_ext
    import Cython.Compiler.Main as cython_compiler
    have_cython = True
except ImportError:
    from distutils.command.build_ext import build_ext
    have_cython = False

NAME = 'salt'
VER = __version__
DESC = ('Portable, distributed, remote execution and '
        'configuration management system')
mod_path = os.path.join(get_python_lib(1), 'salt/modules')
doc_path = os.path.join(PREFIX, 'share/doc', NAME + '-' + VER)
example_path = os.path.join(doc_path, 'examples')
template_path = os.path.join(example_path, 'templates')

if 'SYSCONFDIR' in os.environ:
    etc_path = os.environ['SYSCONFDIR']
else:
    etc_path = os.path.join(os.path.dirname(PREFIX), 'etc')

# take care of extension modules.
if have_cython:
    sources = ['salt/msgpack/_msgpack.pyx']

    class Sdist(sdist):
        def __init__(self, *args, **kwargs):
            for src in glob('salt/msgpack/*.pyx'):
                cython_compiler.compile(glob('msgpack/*.pyx'),
                                        cython_compiler.default_options)
            sdist.__init__(self, *args, **kwargs)
else:
    sources = ['salt/msgpack/_msgpack.c']

    Sdist = sdist

libraries = ['ws2_32'] if sys.platform == 'win32' else []

msgpack_mod = Extension('salt.msgpack._msgpack',
                        sources=sources,
                        libraries=libraries,
                        )

setup(
      name=NAME,
      version=VER,
      description=DESC,
      author='Thomas S Hatch',
      author_email='thatch45@gmail.com',
      url='http://saltstack.org',
      ext_modules=[msgpack_mod],
      cmdclass={'build_ext': build_ext, 'sdist': Sdist, 'test': TestCommand},
      classifiers=[
          'Programming Language :: Python',
          'Programming Language :: Cython',
          'Programming Language :: Python :: 2.6',
          'Programming Language :: Python :: 2.7',
          'Development Status :: 5 - Production/Stable',
          'Environment :: Console',
          'Intended Audience :: Developers',
          'Intended Audience :: Information Technology',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: Apache Software License',
          'Operating System :: POSIX :: Linux',
          'Topic :: System :: Clustering',
          'Topic :: System :: Distributed Computing',
          ],
      packages=['salt',
                'salt.cli',
                'salt.ext',
                'salt.grains',
                'salt.modules',
                'salt.renderers',
                'salt.returners',
                'salt.runners',
                'salt.states',
                'salt.utils',
                'salt.msgpack',
                ],
      scripts=['scripts/salt-master',
               'scripts/salt-minion',
               'scripts/salt-syndic',
               'scripts/salt-key',
               'scripts/salt-cp',
               'scripts/salt-call',
               'scripts/salt-run',
               'scripts/salt'],
      data_files=[(os.path.join(etc_path, 'salt'),
                    ['conf/master.template',
                     'conf/minion.template',
                    ]),
                ('share/man/man1',
                    ['doc/man/salt-master.1',
                     'doc/man/salt-key.1',
                     'doc/man/salt.1',
                     'doc/man/salt-cp.1',
                     'doc/man/salt-call.1',
                     'doc/man/salt-syndic.1',
                     'doc/man/salt-run.1',
                     'doc/man/salt-minion.1',
                    ]),
                ('share/man/man7',
                    ['doc/man/salt.7',
                    ]),
                (doc_path,
                    [
                    ]),
                 ],
     )
<|endoftext|>


<commit_before>from setuptools import setup, find_packages
import sys, os

version = '0.2'

setup(name='Kajiki',
      version=version,
      description="Really fast well-formed xml templates",
      long_description="""Are you tired of the slow performance of Genshi? But
      you still long for the assurance that your output is well-formed that you
      miss from all those other templating engines? Do you wish you had Jinja's
      blocks with Genshi's syntax? Then look  no further, Kajiki is for you!
      Kajiki quickly compiles Genshi-like syntax to *real python bytecode*
      that renders with blazing-fast speed! Don't delay! Pick up your
      copy of Kajiki today!""",
      classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Text Processing :: Markup :: HTML',
        'Topic :: Text Processing :: Markup :: XML'
        ],
      keywords='template xml',
      author='Rick Copeland',
      author_email='rick446@usa.net',
      url='http://bitbucket.org/rick446/fastpt',
      license='MIT',
      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,
      zip_safe=False,
      install_requires=[
      ],
      entry_points="""
      # -*- Entry points: -*-
      """,
      )
<commit_msg>Bump version #<commit_after>from setuptools import setup, find_packages
import sys, os

version = '0.2.1'

setup(name='Kajiki',
      version=version,
      description="Really fast well-formed xml templates",
      long_description="""Are you tired of the slow performance of Genshi? But
      you still long for the assurance that your output is well-formed that you
      miss from all those other templating engines? Do you wish you had Jinja's
      blocks with Genshi's syntax? Then look  no further, Kajiki is for you!
      Kajiki quickly compiles Genshi-like syntax to *real python bytecode*
      that renders with blazing-fast speed! Don't delay! Pick up your
      copy of Kajiki today!""",
      classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Text Processing :: Markup :: HTML',
        'Topic :: Text Processing :: Markup :: XML'
        ],
      keywords='template xml',
      author='Rick Copeland',
      author_email='rick446@usa.net',
      url='http://bitbucket.org/rick446/fastpt',
      license='MIT',
      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,
      zip_safe=False,
      install_requires=[
      ],
      entry_points="""
      # -*- Entry points: -*-
      """,
      )
<|endoftext|>


<commit_before>
from setuptools import setup

setup(name='servicemanager',
      version='0.0.31',
      description='A python tool to manage developing and testing with lots of microservices',
      url='https://github.com/hmrc/service-manager',
      author='vaughansharman',
      license='Apache Licence 2.0',
      packages=['servicemanager', 'servicemanager.actions', 'servicemanager.server', 'servicemanager.service', 'servicemanager.thirdparty'],
      install_requires=['requests==2.2.1','pymongo==2.6.3','bottle==0.12.4','pytest==2.5.2','argcomplete==0.8.1'],
      scripts=['bin/sm', 'bin/smserver'],
      zip_safe=False)
<commit_msg>Correct pymongo version in setup<commit_after>
from setuptools import setup

setup(name='servicemanager',
      version='0.0.31',
      description='A python tool to manage developing and testing with lots of microservices',
      url='https://github.com/hmrc/service-manager',
      author='vaughansharman',
      license='Apache Licence 2.0',
      packages=['servicemanager', 'servicemanager.actions', 'servicemanager.server', 'servicemanager.service', 'servicemanager.thirdparty'],
      install_requires=['requests==2.2.1','pymongo==3.0.1','bottle==0.12.4','pytest==2.5.2','argcomplete==0.8.1'],
      scripts=['bin/sm', 'bin/smserver'],
      zip_safe=False)
<|endoftext|>


<commit_before>from setuptools import setup
from setuptools import find_packages
import os

def read_file(filename):
    filepath = os.path.join(
        os.path.dirname(os.path.dirname(__file__)), filename)
    if os.path.exists(filepath):
        return open(filepath).read()
    else:
        return ''

__author__ = 'Michiaki Ariga'

setup(
    name='tabula-py',
    version='1.0.0',
    description='Simple wrapper for tabula, read tables from PDF into DataFrame',
    long_description=read_file('README.md'),
    long_description_content_type="text/markdown",
    author=__author__,
    author_email='chezou@gmail.com',
    url='https://github.com/chezou/tabula-py',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Topic :: Text Processing :: General',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 2.7',
    ],
    include_package_data=True,
    packages=find_packages(),
    license='MIT License',
    keywords=['data frame', 'pdf', 'table'],
    setup_requires=[
        'flake8',
    ],
    install_requires=[
        'pandas',
        'numpy',
        'requests',
    ],
)
<commit_msg>tiny fix<commit_after>from setuptools import setup
from setuptools import find_packages
import os

def read_file(filename):
    filepath = os.path.join(
        os.path.dirname(os.path.dirname(__file__)), filename)
    if os.path.exists(filepath):
        return open(filepath).read()
    else:
        return ''

__author__ = 'Michiaki Ariga'

setup(
    name='tabula-py',
    version='1.0.0',
    description='Simple wrapper for tabula, read tables from PDF into DataFrame',
    long_description=read_file('README.md'),
    long_description_content_type="text/markdown",
    author=__author__,
    author_email='chezou@gmail.com',
    url='https://github.com/chezou/tabula-py',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Topic :: Text Processing :: General',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 2.7',
    ],
    include_package_data=True,
    packages=find_packages(),
    license='MIT License',
    keywords=['data frame', 'pdf', 'table'],
    setup_requires=[
        'flake8',
    ],
    install_requires=[
        'pandas',
        'numpy',
        'requests',
    ],
)
<|endoftext|>


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

from setuptools import setup, find_packages

with open("requirements.txt") as reqs:
    install_requires = reqs.readlines()

setup(
    name="abbr",
    version="0.0.1",
    url="https://github.com/adlermedrado/abbr",

    author="Adler Brediks Medrado",
    author_email="abbr@adlermedrado.com.br",

    description="A client library to abbreviate string contents",
    long_description=open('README.rst').read(),

    packages=find_packages(),

    install_requires=install_requires,

    include_package_data=True,

    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
    ],
)
<commit_msg>Configure setup.py<commit_after># Copyright 2016 Adler Brediks Medrado
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from setuptools import setup, find_packages

with open("requirements.txt") as reqs:
    install_requires = reqs.readlines()

setup(
    name="abbr",
    version="0.0.1",
    url="https://github.com/adlermedrado/abbr",

    author="Adler Brediks Medrado",
    author_email="abbr@adlermedrado.com.br",

    license="Apache-2.0",
    description="A client library to abbreviate string contents",
    long_description=open('README.rst').read(),

    packages=find_packages(),

    install_requires=install_requires,

    include_package_data=True,

    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
    ],
)
<|endoftext|>


<commit_before>#!/usr/bin/env python2.7
# -*- coding: UTF-8 -*-
#===============================================================================
# Module        : setup
# Author        : Vincent BESANCON <besancon.vincent@gmail.com>
# Description   : Setuptools install script.
#-------------------------------------------------------------------------------
# This file is part of django_csv.
#
# django_csv is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# django_csv is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with django_csv.  If not, see <http://www.gnu.org/licenses/>.
#===============================================================================

from setuptools import setup, find_packages
import monitoring

setup(name='monitoring',
    version=monitoring.__version__,
    description='Monitoring Python Package',
    author='Vincent BESANCON',
    author_email='besancon.vincent@gmail.com',
    license='GPL',
    packages=find_packages(),
)
<commit_msg>Set executable bit.<commit_after>#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#===============================================================================
# Module        : setup
# Author        : Vincent BESANCON <besancon.vincent@gmail.com>
# Description   : Setuptools install script.
#-------------------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#===============================================================================

from setuptools import setup, find_packages
import monitoring

setup(name='monitoring',
    version=monitoring.__version__,
    description='Monitoring Python Package',
    author='Vincent BESANCON',
    author_email='besancon.vincent@gmail.com',
    license='GPL',
    packages=find_packages(),
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
setup.py

Setup the Keyring Lib for Python.
"""

import sys, os, subprocess
from distutils.version import StrictVersion

def runcmd(cmd, env):
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE, env=env)
    out, err = p.communicate()
    return out, err

setup_params = dict(
    name = 'keyring',
    version = "0.7",
    description = "Store and access your passwords safely.",
    url = "http://home.python-keyring.org/",
    keywords = "keyring Keychain GnomeKeyring Kwallet password storage",
    maintainer = "Kang Zhang",
    maintainer_email = "jobo.zh@gmail.com",
    license="PSF",
    long_description = open('README').read() + open('CHANGES.txt').read(),
    platforms = ["Many"],
    packages = ['keyring', 'keyring.tests', 'keyring.util',
                'keyring.backends'],
)

if sys.version_info >= (3,0):
    setup_params.update(
        use_2to3=True,
    )

if __name__ == '__main__':
    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup
    setup(**setup_params)
<commit_msg>Remove obsolete code from setup.py<commit_after>#!/usr/bin/env python
# encoding: utf-8
"""
setup.py

Setup the Keyring Lib for Python.
"""

import sys

setup_params = dict(
    name = 'keyring',
    version = "0.7",
    description = "Store and access your passwords safely.",
    url = "http://home.python-keyring.org/",
    keywords = "keyring Keychain GnomeKeyring Kwallet password storage",
    maintainer = "Kang Zhang",
    maintainer_email = "jobo.zh@gmail.com",
    license="PSF",
    long_description = open('README').read() + open('CHANGES.txt').read(),
    platforms = ["Many"],
    packages = ['keyring', 'keyring.tests', 'keyring.util',
                'keyring.backends'],
)

if sys.version_info >= (3,0):
    setup_params.update(
        use_2to3=True,
    )

if __name__ == '__main__':
    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup
    setup(**setup_params)
<|endoftext|>


<commit_before>#!/usr/bin/env python2.7

from setuptools import setup

try:
    with open('requirements.txt', 'r') as f:
        requirements = f.read().split()
except IOError:
    with open('githubrelease.egg-info/requires.txt', 'r') as f:
        requirements = f.read().split()

setup_requires = ['setuptools-version-command']

setup(
    name='githubrelease',
    version_command='git describe',
    author='Joost Molenaar',
    author_email='j.j.molenaar@gmail.com',
    url='https://github.com/j0057/github-release',
    py_modules=['github_release'],
    install_requires=requirements,
    setup_requires=setup_requires,
    entry_points={
        'console_scripts': [
            'githubrelease = github_release:main',
            'github-release = github_release:gh_release',
            'github-asset = github_release:gh_asset'
        ]}
)
<commit_msg>style: setup.py: Remove deprecated support for egg-info/requires.txt<commit_after>#!/usr/bin/env python2.7

from setuptools import setup

with open('requirements.txt', 'r') as fp:
    requirements = list(filter(bool, (line.strip() for line in fp)))

setup_requires = ['setuptools-version-command']

setup(
    name='githubrelease',
    version_command='git describe',
    author='Joost Molenaar',
    author_email='j.j.molenaar@gmail.com',
    url='https://github.com/j0057/github-release',
    py_modules=['github_release'],
    install_requires=requirements,
    setup_requires=setup_requires,
    entry_points={
        'console_scripts': [
            'githubrelease = github_release:main',
            'github-release = github_release:gh_release',
            'github-asset = github_release:gh_asset'
        ]}
)
<|endoftext|>


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

from setuptools import setup

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

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

with open("requirements.txt") as f:
    requirements = [req.strip() for req in f.readlines()]

with open("requirements_dev.txt") as f:
    test_requirements = [req.strip() for req in f.readlines()]

setup(
    name='pydatajson',
    version='0.0.3',
    description="Paquete en python con herramientas para generar y validar metadatos de catálogos de datos en formato data.json.",
    long_description=readme + '\n\n' + history,
    author="Datos Argentina",
    author_email='datos@modernizacion.gob.ar',
    url='https://github.com/datosgobar/pydatajson',
    packages=[
        'pydatajson',
    ],
    package_dir={'pydatajson':
                 'pydatajson'},
    include_package_data=True,
    install_requires=requirements,
    license="MIT license",
    zip_safe=False,
    keywords='pydatajson',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<commit_msg>Release v0.0.4<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

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

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

with open("requirements.txt") as f:
    requirements = [req.strip() for req in f.readlines()]

with open("requirements_dev.txt") as f:
    test_requirements = [req.strip() for req in f.readlines()]

setup(
    name='pydatajson',
    version='0.0.4',
    description="Paquete en python con herramientas para generar y validar metadatos de catálogos de datos en formato data.json.",
    long_description=readme + '\n\n' + history,
    author="Datos Argentina",
    author_email='datos@modernizacion.gob.ar',
    url='https://github.com/datosgobar/pydatajson',
    packages=[
        'pydatajson',
    ],
    package_dir={'pydatajson':
                 'pydatajson'},
    include_package_data=True,
    install_requires=requirements,
    license="MIT license",
    zip_safe=False,
    keywords='pydatajson',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        "Programming Language :: Python :: 2",
        'Programming Language :: Python :: 2.7',
    ],
    test_suite='tests',
    tests_require=test_requirements
)
<|endoftext|>


<commit_before>#!/usr/bin/python

# python setup.py sdist --format=zip,gztar

from distutils.core import setup
from lib.version import ELECTRUM_VERSION as version
import os, sys
if sys.version_info[:3] < (2,6,0):
    print "Electrum requires Python version >= 2.6.0... exiting"
    sys.exit(1)

data_files=[
    ('/usr/share/applications/',['electrum.desktop']),
    ('/usr/share/app-install/icons/',['electrum.png'])
    ]

for lang in os.listdir('locale'):
    if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo'%lang):
        data_files.append(  ('/usr/share/locale/%s/LC_MESSAGES'%lang, ['locale/%s/LC_MESSAGES/electrum.mo'%lang]) )

setup(name = "Electrum",
    version = version,
    install_requires = ['slowaes','ecdsa'],
    package_dir = {'electrum': 'lib'},
    scripts= ['electrum'],
    data_files = data_files,
    py_modules = ['electrum.version',
                  'electrum.wallet',
                  'electrum.interface',
                  'electrum.gui',
                  'electrum.gui_qt',
                  'electrum.icons_rc',
                  'electrum.mnemonic',
                  'electrum.pyqrnative',
                  'electrum.bmp',
                  'electrum.i18n'],
    description = "Lightweight Bitcoin Wallet",
    author = "thomasv",
    license = "GNU GPLv3",
    url = "http://ecdsa/electrum",
    long_description = """Lightweight Bitcoin Wallet"""
)

<commit_msg>create locale<commit_after>#!/usr/bin/python

# python setup.py sdist --format=zip,gztar

from distutils.core import setup
from lib.version import ELECTRUM_VERSION as version
import os, sys
if sys.version_info[:3] < (2,6,0):
    print "Electrum requires Python version >= 2.6.0... exiting"
    sys.exit(1)

data_files=[
    ('/usr/share/applications/',['electrum.desktop']),
    ('/usr/share/app-install/icons/',['electrum.png'])
    ]

if not os.path.exists('locale'):
    os.mkdir('locale')

for lang in os.listdir('locale'):
    if os.path.exists('locale/%s/LC_MESSAGES/electrum.mo'%lang):
        data_files.append(  ('/usr/share/locale/%s/LC_MESSAGES'%lang, ['locale/%s/LC_MESSAGES/electrum.mo'%lang]) )

setup(name = "Electrum",
    version = version,
    install_requires = ['slowaes','ecdsa'],
    package_dir = {'electrum': 'lib'},
    scripts= ['electrum'],
    data_files = data_files,
    py_modules = ['electrum.version',
                  'electrum.wallet',
                  'electrum.interface',
                  'electrum.gui',
                  'electrum.gui_qt',
                  'electrum.icons_rc',
                  'electrum.mnemonic',
                  'electrum.pyqrnative',
                  'electrum.bmp',
                  'electrum.i18n'],
    description = "Lightweight Bitcoin Wallet",
    author = "thomasv",
    license = "GNU GPLv3",
    url = "http://ecdsa/electrum",
    long_description = """Lightweight Bitcoin Wallet"""
)

<|endoftext|>


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

from setuptools import setup, find_packages
import sys
import json
import os
import shutil
import platform
import click

#------------------------------------------------------------------------------
# 前置检查
#------------------------------------------------------------------------------
def check_xmake():
    """检查是否按照了编译工具 xmake"""
    print("checking xmake ...")
    xmake = os.system("xmake --version")
    return False if xmake != 0 else True

def get_boost_envrionment():
    """
    获取 BOOST 环境变量设置
        @return (current_boost_root, current_boost_lib)
    """
    current_dir = os.getcwd()
    current_boost_root = ''
    current_boost_lib = ''
    if 'BOOST_ROOT' in os.environ:
        current_boost_root = os.environ['BOOST_ROOT']
        if 'BOOST_LIB' in os.environ:
            current_boost_lib = os.environ['BOOST_LIB']
        else:
            current_boost_lib = current_boost_root + '/stage/lib'
            os.environ['BOOST_LIB'] = current_boost_lib
    else:
        for dir in os.listdir():
            if len(dir) >= 5 and dir[:5] == 'boost' and os.path.isdir(dir):
                current_boost_root = current_dir + '/' + dir
                current_boost_lib = current_dir + '/' + dir + '/stage/lib'
                os.environ['BOOST_ROOT'] = current_boost_root
                os.environ['BOOST_LIB'] = current_boost_lib
    return (current_boost_root, current_boost_lib)

def get_python_version():
    """获取当前 python版本"""
    py_version = platform.python_version_tuple()
    py_version = int(py_version[0]) * 10 + int(py_version[1])
    print('current python version:', int(py_version) * 0.1)
    return py_version

def get_current_compile_info():
    """获取当前编译信息, 其中 mode 无效"""
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if sys.platform == 'win32':
        current_arch = 'x64' if current_bits == 64 else 'x86'
    else:
        current_arch = 'x86_64' if current_bits == 64 else 'i386'

    py_version = get_python_version()
    current_boost_root, current_boost_lib = get_boost_envrionment()
    current_compile_info = {
        'plat': sys.platform,
        'arch': current_arch,
        'mode': '',
        'py_version': py_version,
        'boost_root': current_boost_root,
        'boost_lib': current_boost_lib
    }
    return current_compile_info

def get_history_compile_info():
    """获取历史编译信息"""
    try:
        with open('compile_info', 'r') as f:
            result = json.load(f)
    except:
        result = {
            'plat': '',
            'arch': '',
            'mode': '',
            'py_version': 0,
            'boost_root': '',
            'boost_lib': ''
        }
    return result

def save_current_compile_info(compile_info):
    """保持当前编译信息"""
    with open('compile_info', 'w') as f:
        json.dump(compile_info, f)

def build_boost(mode):
    """ 编译依赖的 boost 库 """
    current_boost_root, current_boost_lib = get_boost_envrionment()
    if current_boost_root == '' or current_boost_lib == '':
        print("Can't get boost environment!")
        return
    current_dir = os.getcwd()
    if sys.platform == 'win32':
        os.chdir(current_boost_root)
        if not os.path.exists('b2.exe'):
            os.system('bootstrap.bat')
        os.system(
            'b2 {} link=static runtime-link=shared address-model=64 -j 4 --with-date_time'
            ' --with-filesystem --with-system --with-test'.format(mode))
        os.system(
            'b2 {} link=shared runtime-link=shared address-model=64 -j 4 --with-python'
            ' --with-serialization'.format(mode))
        os.chdir(current_dir)
    else:
        cmd = 'cd {boost} ; if [ ! -f "b2" ]; then ./bootstrap.sh ; fi; '\
              './b2 {mode} link=shared address-model=64 -j 4 --with-python --with-serialization; '\
              './b2 {mode} link=static address-model=64 cxxflags=-fPIC -j 4 --with-date_time '\
              '--with-filesystem --with-system --with-test; '\
              'cd {current}'.format(boost=current_boost_root, mode=mode, current=current_dir)
        os.system(cmd)

def clear_with_python_changed(mode):
    """
    python版本发生变化时，清理之前的python编译结果
    应该仅在 pyhon 版本发生变化时被调用
    """
    current_plat = sys.platform
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if current_plat == 'win32' and current_bits == 64:
        build_pywrap_dir = 'build\\{mode}\\windows\\x64\\.objs\\windows\\x64\\{mode}\\hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'win32' and current_bits == 32:
        build_pywrap_dir = 'build\\{mode}\\windows\\x86\\.objs\\windows\\x86\\{mode}\\hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'linux' and current_bits == 64:
        build_pywrap_dir = 'build/{mode}/linux/x86_64/.objs/linux/x86_64/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'linux' and current_bits == 32:
        build_pywrap_dir = 'build/{mode}/linux/i386/.objs/linux/i386/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == "darwin" and current_bits == 64:
        build_pywrap_dir = 'build/{mode}/macosx/x86_64/.objs/macosx/x86_64/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == "darwin" and current_bits == 32:
        build_pywrap_dir = 'build/{mode}/macosx/i386/.objs/macosx/i386/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    else:
        print("************不支持的平台**************")
        exit(0)
    if os.path.lexists(build_pywrap_dir):
        shutil.rmtree(build_pywrap_dir)
    current_boost_root, _ = get_boost_envrionment()
    if os.path.lexists('{}/bin.v2/libs/python'.format(current_boost_root)):
        shutil.rmtree('{}/bin.v2/libs/python'.format(current_boost_root))

#------------------------------------------------------------------------------
# 执行构建
#------------------------------------------------------------------------------
def start_build(verbose=False, mode='release'):
    """ 执行编译 """
    global g_verbose
    g_verbose = verbose
    if not check_xmake():
        print("Please install xmake")
        return

    current_compile_info = get_current_compile_info()
    current_compile_info['mode'] = mode

    py_version = current_compile_info['py_version']
    if py_version != 0 and py_version < 31:
        print("Python version must >= 3.1 !")
        return

    current_boost_root = current_compile_info['boost_root']
    current_boost_lib = current_compile_info['boost_lib']
    if current_boost_root == '' or current_boost_lib == '':
        print("Please configure BOOST")
        exit(0)
    print('BOOST_ROOT:', current_boost_root)
    print('BOOST_LIB:', current_boost_lib)

    #如果 python版本或者编译模式发生变化，则编译依赖的 boost 库（boost.python)
    history_compile_info = get_history_compile_info()
    if py_version != history_compile_info[
            'py_version'] or history_compile_info['mode'] != mode:
        clear_with_python_changed(mode)
        print('\ncompile boost ...')
        build_boost(mode)
        os.system("xmake f -c -y -m {}".format(mode))
    else:
        os.system("xmake f -y -m {}".format(mode))

    os.system("xmake -b {} hikyuu".format("-v -D" if verbose else ""))
    if mode == "release":
        os.system("xmake -b {} core".format("-v -D" if verbose else ""))

    # 保存当前的编译信息
    save_current_compile_info(current_compile_info)

#------------------------------------------------------------------------------
# 控制台命令
#------------------------------------------------------------------------------

@click.group()
def cli():
    pass

@click.command()
@click.option('-v', '--verbose', is_flag=True, help='显示详细的编译信息')
@click.option('-m',
              '--mode',
              default='release',
              type=click.Choice(['release', 'debug']),
              help='编译模式')
def build(verbose, mode):
    """ 执行编译 """
    start_build(verbose, mode)

@click.command()
@click.option('-all', "--all", is_flag=True, help="执行全部测试, 否则仅仅进行最小范围测试）")
@click.option("-compile", "--compile", is_flag=True, help='强制重新编译')
@click.option('-v', '--verbose', is_flag=True, help='显示详细的编译信息')
@click.option('-m',
              '--mode',
              default='release',
              type=click.Choice(['release', 'debug']),
              help='编译模式')
def test(all, compile, verbose, mode):
    """ 执行单元测试 """
    current_compile_info = get_current_compile_info()
    current_compile_info['mode'] = mode
    history_compile_info = get_history_compile_info()
    if compile or current_compile_info != history_compile_info:
        start_build(verbose, mode)
    if all:
        os.system("xmake f --test=all --mode={}".format(mode))
        os.system("xmake -b unit-test")
        os.system("xmake r unit-test")
    else:
        os.system("xmake f --test=small --mode={}".format(mode))
        os.system("xmake -b small-test")
        os.system("xmake r small-test")

@click.command()
@click.option("-with_boost", "--with_boost", is_flag=True, help='清除相应的BOOST库')
def clear(with_boost):
    """ 清除当前编译设置及结果 """
    if os.path.lexists('.xmake'):
        print('delete .xmake')
        shutil.rmtree('.xmake')
    if os.path.lexists('build'):
        print('delete build')
        shutil.rmtree('build')
    if os.path.lexists('Hikyuu.egg-info'):
        print('delete Hikyuu.egg-info')
        shutil.rmtree('Hikyuu.egg-info')
    if os.path.exists('compile_info'):
        print('delete compile_info')
        os.remove('compile_info')
    for r, _, f_list in os.walk('hikyuu'):
        for name in f_list:
            if (name != 'UnRAR.exe' and len(name) > 4 and name[-4:] in ('.dll','.exe','.pyd')) \
                   or (len(name) > 8 and name[:9] == 'libboost_')  \
                   or (len(name) > 6 and name[-6:] == '.dylib'):
                print('delete', r + '/' + name)
                os.remove(os.path.join(r, name))
    print('clear finished!')

@click.command()
def uninstall():
    """ 卸载已安装的 python 包 """
    if sys.platform == 'win32':
        site_lib_dir = sys.base_prefix + "/lib/site-packages"
    else:
        usr_dir = os.path.expanduser('~')
        py_version, _ = get_python_version()
        site_lib_dir = '{}/.local/lib/python{:>.1f}/site-packages'.format(
            usr_dir, py_version * 0.1)
    for dir in os.listdir(site_lib_dir):
        if dir == 'hikyuu' or (len(dir) > 6 and dir[:6] == 'Hikyuu'):
            print('delete', site_lib_dir + '/' + dir)
            shutil.rmtree(site_lib_dir + '/' + dir)
    print("Uninstall finished!")

@click.command()
def install():
    """ 编译并安装 Hikyuu python 库 """
    start_build(False, 'release')
    if sys.platform == 'win32':
        install_dir = sys.base_prefix + "\\Lib\\site-packages\\hikyuu"
    else:
        usr_dir = os.path.expanduser('~')
        install_dir = '{}/.local/lib/python{:>.1f}/site-packages/hikyuu'.format(
            usr_dir,
            get_python_version() * 0.1)
        try:
            shutil.rmtree(install_dir)
        except:
            pass
        os.makedirs(install_dir)
    os.system('xmake install -o "{}"'.format(install_dir))

@click.command()
def wheel():
    """ 生成 python 的 wheel 安装包 """
    # 尝试编译
    start_build(False, 'release')

    # 清理之前遗留的打包产物
    print("Clean up the before papackaging outputs ...")
    py_version = get_python_version()
    if os.path.lexists('Hikyuu.egg-info'):
        shutil.rmtree('Hikyuu.egg-info')
    if os.path.lexists('build/lib'):
        shutil.rmtree('build/lib')
    if os.path.lexists('build'):
        for bdist in os.listdir('build'):
            if len(bdist) >= 5 and bdist[:5] == 'bdist' and os.path.lexists(
                    bdist):
                shutil.rmtree(bdist)
    for x in os.listdir('hikyuu'):
        if x[:12] == 'boost_python':
            if x[12:14] != str(py_version):
                os.remove('hikyuu/{}'.format(x))

    # 构建打包命令
    print("start pacakaging bdist_wheel ...")
    current_plat = sys.platform
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if current_plat == 'win32' and current_bits == 64:
        plat = "win-amd64"
    elif current_plat == 'win32' and current_bits == 32:
        plat = "win32"
    elif current_plat == 'linux' and current_bits == 64:
        plat = "manylinux1_x86_64"
    elif current_plat == 'linux' and current_bits == 32:
        plat = "manylinux1_i386"
    else:
        print("*********尚未实现该平台的支持*******")
        return
    cmd = 'python sub_setup.py bdist_wheel --python-tag cp{} -p {}'.format(
        py_version, plat)
    os.system(cmd)

@click.command()
def upload():
    """ 发布上传至 pypi，仅供发布者使用！！！ """
    if not os.path.lexists('dist'):
        print("Not found wheel package! Pleae wheel first")
        return
    print("current wheel:")
    for bdist in os.listdir('dist'):
        print(bdist)
    print("")
    val = input('Are you sure upload now (y/n)? (deault: n) ')
    if val == 'y':
        os.system("twine upload dist/*")

#------------------------------------------------------------------------------
# 添加 click 命令
#------------------------------------------------------------------------------
cli.add_command(build)
cli.add_command(test)
cli.add_command(clear)
cli.add_command(install)
cli.add_command(uninstall)
cli.add_command(wheel)
cli.add_command(upload)

if __name__ == "__main__":
    cli()
<commit_msg>fixed setup.py uninstall<commit_after>#!/usr/bin/env python
#-*- coding:utf-8 -*-

from setuptools import setup, find_packages
import sys
import json
import os
import shutil
import platform
import click

#------------------------------------------------------------------------------
# 前置检查
#------------------------------------------------------------------------------
def check_xmake():
    """检查是否按照了编译工具 xmake"""
    print("checking xmake ...")
    xmake = os.system("xmake --version")
    return False if xmake != 0 else True

def get_boost_envrionment():
    """
    获取 BOOST 环境变量设置
        @return (current_boost_root, current_boost_lib)
    """
    current_dir = os.getcwd()
    current_boost_root = ''
    current_boost_lib = ''
    if 'BOOST_ROOT' in os.environ:
        current_boost_root = os.environ['BOOST_ROOT']
        if 'BOOST_LIB' in os.environ:
            current_boost_lib = os.environ['BOOST_LIB']
        else:
            current_boost_lib = current_boost_root + '/stage/lib'
            os.environ['BOOST_LIB'] = current_boost_lib
    else:
        for dir in os.listdir():
            if len(dir) >= 5 and dir[:5] == 'boost' and os.path.isdir(dir):
                current_boost_root = current_dir + '/' + dir
                current_boost_lib = current_dir + '/' + dir + '/stage/lib'
                os.environ['BOOST_ROOT'] = current_boost_root
                os.environ['BOOST_LIB'] = current_boost_lib
    return (current_boost_root, current_boost_lib)

def get_python_version():
    """获取当前 python版本"""
    py_version = platform.python_version_tuple()
    py_version = int(py_version[0]) * 10 + int(py_version[1])
    print('current python version:', int(py_version) * 0.1)
    return py_version

def get_current_compile_info():
    """获取当前编译信息, 其中 mode 无效"""
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if sys.platform == 'win32':
        current_arch = 'x64' if current_bits == 64 else 'x86'
    else:
        current_arch = 'x86_64' if current_bits == 64 else 'i386'

    py_version = get_python_version()
    current_boost_root, current_boost_lib = get_boost_envrionment()
    current_compile_info = {
        'plat': sys.platform,
        'arch': current_arch,
        'mode': '',
        'py_version': py_version,
        'boost_root': current_boost_root,
        'boost_lib': current_boost_lib
    }
    return current_compile_info

def get_history_compile_info():
    """获取历史编译信息"""
    try:
        with open('compile_info', 'r') as f:
            result = json.load(f)
    except:
        result = {
            'plat': '',
            'arch': '',
            'mode': '',
            'py_version': 0,
            'boost_root': '',
            'boost_lib': ''
        }
    return result

def save_current_compile_info(compile_info):
    """保持当前编译信息"""
    with open('compile_info', 'w') as f:
        json.dump(compile_info, f)

def build_boost(mode):
    """ 编译依赖的 boost 库 """
    current_boost_root, current_boost_lib = get_boost_envrionment()
    if current_boost_root == '' or current_boost_lib == '':
        print("Can't get boost environment!")
        return
    current_dir = os.getcwd()
    if sys.platform == 'win32':
        os.chdir(current_boost_root)
        if not os.path.exists('b2.exe'):
            os.system('bootstrap.bat')
        os.system(
            'b2 {} link=static runtime-link=shared address-model=64 -j 4 --with-date_time'
            ' --with-filesystem --with-system --with-test'.format(mode))
        os.system(
            'b2 {} link=shared runtime-link=shared address-model=64 -j 4 --with-python'
            ' --with-serialization'.format(mode))
        os.chdir(current_dir)
    else:
        cmd = 'cd {boost} ; if [ ! -f "b2" ]; then ./bootstrap.sh ; fi; '\
              './b2 {mode} link=shared address-model=64 -j 4 --with-python --with-serialization; '\
              './b2 {mode} link=static address-model=64 cxxflags=-fPIC -j 4 --with-date_time '\
              '--with-filesystem --with-system --with-test; '\
              'cd {current}'.format(boost=current_boost_root, mode=mode, current=current_dir)
        os.system(cmd)

def clear_with_python_changed(mode):
    """
    python版本发生变化时，清理之前的python编译结果
    应该仅在 pyhon 版本发生变化时被调用
    """
    current_plat = sys.platform
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if current_plat == 'win32' and current_bits == 64:
        build_pywrap_dir = 'build\\{mode}\\windows\\x64\\.objs\\windows\\x64\\{mode}\\hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'win32' and current_bits == 32:
        build_pywrap_dir = 'build\\{mode}\\windows\\x86\\.objs\\windows\\x86\\{mode}\\hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'linux' and current_bits == 64:
        build_pywrap_dir = 'build/{mode}/linux/x86_64/.objs/linux/x86_64/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == 'linux' and current_bits == 32:
        build_pywrap_dir = 'build/{mode}/linux/i386/.objs/linux/i386/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == "darwin" and current_bits == 64:
        build_pywrap_dir = 'build/{mode}/macosx/x86_64/.objs/macosx/x86_64/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    elif current_plat == "darwin" and current_bits == 32:
        build_pywrap_dir = 'build/{mode}/macosx/i386/.objs/macosx/i386/{mode}/hikyuu_pywrap'.format(
            mode=mode)
    else:
        print("************不支持的平台**************")
        exit(0)
    if os.path.lexists(build_pywrap_dir):
        shutil.rmtree(build_pywrap_dir)
    current_boost_root, _ = get_boost_envrionment()
    if os.path.lexists('{}/bin.v2/libs/python'.format(current_boost_root)):
        shutil.rmtree('{}/bin.v2/libs/python'.format(current_boost_root))

#------------------------------------------------------------------------------
# 执行构建
#------------------------------------------------------------------------------
def start_build(verbose=False, mode='release'):
    """ 执行编译 """
    global g_verbose
    g_verbose = verbose
    if not check_xmake():
        print("Please install xmake")
        return

    current_compile_info = get_current_compile_info()
    current_compile_info['mode'] = mode

    py_version = current_compile_info['py_version']
    if py_version != 0 and py_version < 31:
        print("Python version must >= 3.1 !")
        return

    current_boost_root = current_compile_info['boost_root']
    current_boost_lib = current_compile_info['boost_lib']
    if current_boost_root == '' or current_boost_lib == '':
        print("Please configure BOOST")
        exit(0)
    print('BOOST_ROOT:', current_boost_root)
    print('BOOST_LIB:', current_boost_lib)

    #如果 python版本或者编译模式发生变化，则编译依赖的 boost 库（boost.python)
    history_compile_info = get_history_compile_info()
    if py_version != history_compile_info[
            'py_version'] or history_compile_info['mode'] != mode:
        clear_with_python_changed(mode)
        print('\ncompile boost ...')
        build_boost(mode)
        os.system("xmake f -c -y -m {}".format(mode))
    else:
        os.system("xmake f -y -m {}".format(mode))

    os.system("xmake -b {} hikyuu".format("-v -D" if verbose else ""))
    if mode == "release":
        os.system("xmake -b {} core".format("-v -D" if verbose else ""))

    # 保存当前的编译信息
    save_current_compile_info(current_compile_info)

#------------------------------------------------------------------------------
# 控制台命令
#------------------------------------------------------------------------------

@click.group()
def cli():
    pass

@click.command()
@click.option('-v', '--verbose', is_flag=True, help='显示详细的编译信息')
@click.option('-m',
              '--mode',
              default='release',
              type=click.Choice(['release', 'debug']),
              help='编译模式')
def build(verbose, mode):
    """ 执行编译 """
    start_build(verbose, mode)

@click.command()
@click.option('-all', "--all", is_flag=True, help="执行全部测试, 否则仅仅进行最小范围测试）")
@click.option("-compile", "--compile", is_flag=True, help='强制重新编译')
@click.option('-v', '--verbose', is_flag=True, help='显示详细的编译信息')
@click.option('-m',
              '--mode',
              default='release',
              type=click.Choice(['release', 'debug']),
              help='编译模式')
def test(all, compile, verbose, mode):
    """ 执行单元测试 """
    current_compile_info = get_current_compile_info()
    current_compile_info['mode'] = mode
    history_compile_info = get_history_compile_info()
    if compile or current_compile_info != history_compile_info:
        start_build(verbose, mode)
    if all:
        os.system("xmake f --test=all --mode={}".format(mode))
        os.system("xmake -b unit-test")
        os.system("xmake r unit-test")
    else:
        os.system("xmake f --test=small --mode={}".format(mode))
        os.system("xmake -b small-test")
        os.system("xmake r small-test")

@click.command()
@click.option("-with_boost", "--with_boost", is_flag=True, help='清除相应的BOOST库')
def clear(with_boost):
    """ 清除当前编译设置及结果 """
    if os.path.lexists('.xmake'):
        print('delete .xmake')
        shutil.rmtree('.xmake')
    if os.path.lexists('build'):
        print('delete build')
        shutil.rmtree('build')
    if os.path.lexists('Hikyuu.egg-info'):
        print('delete Hikyuu.egg-info')
        shutil.rmtree('Hikyuu.egg-info')
    if os.path.exists('compile_info'):
        print('delete compile_info')
        os.remove('compile_info')
    for r, _, f_list in os.walk('hikyuu'):
        for name in f_list:
            if (name != 'UnRAR.exe' and len(name) > 4 and name[-4:] in ('.dll','.exe','.pyd')) \
                   or (len(name) > 8 and name[:9] == 'libboost_')  \
                   or (len(name) > 6 and name[-6:] == '.dylib'):
                print('delete', r + '/' + name)
                os.remove(os.path.join(r, name))
    print('clear finished!')

@click.command()
def uninstall():
    """ 卸载已安装的 python 包 """
    if sys.platform == 'win32':
        site_lib_dir = sys.base_prefix + "/lib/site-packages"
    else:
        usr_dir = os.path.expanduser('~')
        py_version = get_python_version()
        site_lib_dir = '{}/.local/lib/python{:>.1f}/site-packages'.format(
            usr_dir, py_version * 0.1)
    for dir in os.listdir(site_lib_dir):
        if dir == 'hikyuu' or (len(dir) > 6 and dir[:6] == 'Hikyuu'):
            print('delete', site_lib_dir + '/' + dir)
            shutil.rmtree(site_lib_dir + '/' + dir)
    print("Uninstall finished!")

@click.command()
def install():
    """ 编译并安装 Hikyuu python 库 """
    start_build(False, 'release')
    if sys.platform == 'win32':
        install_dir = sys.base_prefix + "\\Lib\\site-packages\\hikyuu"
    else:
        usr_dir = os.path.expanduser('~')
        install_dir = '{}/.local/lib/python{:>.1f}/site-packages/hikyuu'.format(
            usr_dir,
            get_python_version() * 0.1)
        try:
            shutil.rmtree(install_dir)
        except:
            pass
        os.makedirs(install_dir)
    os.system('xmake install -o "{}"'.format(install_dir))

@click.command()
def wheel():
    """ 生成 python 的 wheel 安装包 """
    # 尝试编译
    start_build(False, 'release')

    # 清理之前遗留的打包产物
    print("Clean up the before papackaging outputs ...")
    py_version = get_python_version()
    if os.path.lexists('Hikyuu.egg-info'):
        shutil.rmtree('Hikyuu.egg-info')
    if os.path.lexists('build/lib'):
        shutil.rmtree('build/lib')
    if os.path.lexists('build'):
        for bdist in os.listdir('build'):
            if len(bdist) >= 5 and bdist[:5] == 'bdist' and os.path.lexists(
                    bdist):
                shutil.rmtree(bdist)
    for x in os.listdir('hikyuu'):
        if x[:12] == 'boost_python':
            if x[12:14] != str(py_version):
                os.remove('hikyuu/{}'.format(x))

    # 构建打包命令
    print("start pacakaging bdist_wheel ...")
    current_plat = sys.platform
    current_bits = 64 if sys.maxsize > 2**32 else 32
    if current_plat == 'win32' and current_bits == 64:
        plat = "win-amd64"
    elif current_plat == 'win32' and current_bits == 32:
        plat = "win32"
    elif current_plat == 'linux' and current_bits == 64:
        plat = "manylinux1_x86_64"
    elif current_plat == 'linux' and current_bits == 32:
        plat = "manylinux1_i386"
    else:
        print("*********尚未实现该平台的支持*******")
        return
    cmd = 'python sub_setup.py bdist_wheel --python-tag cp{} -p {}'.format(
        py_version, plat)
    os.system(cmd)

@click.command()
def upload():
    """ 发布上传至 pypi，仅供发布者使用！！！ """
    if not os.path.lexists('dist'):
        print("Not found wheel package! Pleae wheel first")
        return
    print("current wheel:")
    for bdist in os.listdir('dist'):
        print(bdist)
    print("")
    val = input('Are you sure upload now (y/n)? (deault: n) ')
    if val == 'y':
        os.system("twine upload dist/*")

#------------------------------------------------------------------------------
# 添加 click 命令
#------------------------------------------------------------------------------
cli.add_command(build)
cli.add_command(test)
cli.add_command(clear)
cli.add_command(install)
cli.add_command(uninstall)
cli.add_command(wheel)
cli.add_command(upload)

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


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

"""
untangle
--------

untangle XML to Python objects.

Example:

::
	import untangle
	obj = untangle.parse('<root><child name="child1"/></root>')
	assert obj.root.child['name'] == u'child1'
"""

import os
import sys
import untangle

from distutils.core import setup

if sys.argv[-1] == "test":
    os.system("python tests/tests.py")
    sys.exit()

setup(
    name='untangle',
    version=untangle.__version__,
    description='Convert XML documents into Python objects',
    long_description=__doc__,
    author='Christian Stefanescu',
    author_email='chris@0chris.com',
    url='https://github.com/stchris/untangle',
    packages= [
        'untangle',
    ],
    license='MIT',
    classifiers=(
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
		#'Programming Language :: Python :: 2.5',
        'Programming Language :: Python :: 2.6',
		#'Programming Language :: Python :: 2.7',
        # 'Programming Language :: Python :: 3.0',
        # 'Programming Language :: Python :: 3.1',
    ),
)

<commit_msg>Readme code style<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
untangle
--------

untangle XML to Python objects.

Example:

	import untangle
	obj = untangle.parse('<root><child name="child1"/></root>')
	assert obj.root.child['name'] == u'child1'
"""

import os
import sys
import untangle

from distutils.core import setup

if sys.argv[-1] == "test":
    os.system("python tests/tests.py")
    sys.exit()

setup(
    name='untangle',
    version=untangle.__version__,
    description='Convert XML documents into Python objects',
    long_description=__doc__,
    author='Christian Stefanescu',
    author_email='chris@0chris.com',
    url='https://github.com/stchris/untangle',
    packages= [
        'untangle',
    ],
    license='MIT',
    classifiers=(
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
		#'Programming Language :: Python :: 2.5',
        'Programming Language :: Python :: 2.6',
		#'Programming Language :: Python :: 2.7',
        # 'Programming Language :: Python :: 3.0',
        # 'Programming Language :: Python :: 3.1',
    ),
)

<|endoftext|>


<commit_before>from setuptools \
    import setup, find_packages

setup(
    name         = "enthought.enstaller",
    version      = "2.2.0b3",
    description  = "The Enthought installer.  Enhances setuptools by adding " \
                   "query options, support for post-install scripts, and much " \
                   "more.",
    author       = "Richard L. Ratzel",
    author_email = "rlratzel@enthought.com",
    url          = "http://code.enthought.com/enstaller",
    license      = "BSD",
    zip_safe     = False,
    packages     = find_packages(),
    ext_modules  = [],
    include_package_data = True,

    entry_points = {"console_scripts":
                    ["enstaller = enthought.enstaller.launcher:launch"],
                    },

    install_requires = [
       "enthought.traits>=3.0.0b1",
#       "enthought.app_data_locator>=2.0b1",
       "enthought.ets>=2.0b1",
       ],

    extras_require = {
        "gui": ["enthought.enstaller.gui>=2.2.0b3, <2.3.0"],
        },

    namespace_packages = [
        "enthought",
        "enthought.enstaller",
        ],
)

<commit_msg>* Updating (commented out!) line to remove last vestiges of app_data_locator.<commit_after>from setuptools \
    import setup, find_packages

setup(
    name         = "enthought.enstaller",
    version      = "2.2.0b3",
    description  = "The Enthought installer.  Enhances setuptools by adding " \
                   "query options, support for post-install scripts, and much " \
                   "more.",
    author       = "Richard L. Ratzel",
    author_email = "rlratzel@enthought.com",
    url          = "http://code.enthought.com/enstaller",
    license      = "BSD",
    zip_safe     = False,
    packages     = find_packages(),
    ext_modules  = [],
    include_package_data = True,

    entry_points = {"console_scripts":
                    ["enstaller = enthought.enstaller.launcher:launch"],
                    },

    install_requires = [
       "enthought.traits>=3.0.0b1",
#       "enthought.etsconfig>=2.0b1",
       "enthought.ets>=2.0b1",
       ],

    extras_require = {
        "gui": ["enthought.enstaller.gui>=2.2.0b3, <2.3.0"],
        },

    namespace_packages = [
        "enthought",
        "enthought.enstaller",
        ],
)

<|endoftext|>


<commit_before>from setuptools import setup, find_packages  # Always prefer setuptools over distutils
from codecs import open  # To use a consistent encoding
from os import path

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

# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='''ckanext-pdfview''',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # http://packaging.python.org/en/latest/tutorial.html#version
    version='0.0.4',

    description='''View plugin for rendering PDFs on the browser''',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/ckan/ckanext-pdfview',

    # Author details
    author='''Open Knowledge''',
    author_email='''info@ckan.org''',

    # Choose your license
    license='AGPL',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        # 3 - Alpha
        # 4 - Beta
        # 5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='''CKAN PDF''',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
    namespace_packages=['ckanext'],

    # List run-time dependencies here.  These will be installed by pip when your
    # project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/technical.html#install-requires-vs-requirements-files
    install_requires=[],

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    include_package_data=True,
    package_data={
    },

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages.
    # see http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    data_files=[],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    entry_points='''
        [ckan.plugins]
        pdf_view=ckanext.pdfview.plugin:PdfView
        ''',
)
<commit_msg>Bump version.<commit_after>from setuptools import setup, find_packages  # Always prefer setuptools over distutils
from codecs import open  # To use a consistent encoding
from os import path

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

# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='''ckanext-pdfview''',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # http://packaging.python.org/en/latest/tutorial.html#version
    version='0.0.5',

    description='''View plugin for rendering PDFs on the browser''',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/ckan/ckanext-pdfview',

    # Author details
    author='''Open Knowledge''',
    author_email='''info@ckan.org''',

    # Choose your license
    license='AGPL',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        # 3 - Alpha
        # 4 - Beta
        # 5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='''CKAN PDF''',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
    namespace_packages=['ckanext'],

    # List run-time dependencies here.  These will be installed by pip when your
    # project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/technical.html#install-requires-vs-requirements-files
    install_requires=[],

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    include_package_data=True,
    package_data={
    },

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages.
    # see http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    data_files=[],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    entry_points='''
        [ckan.plugins]
        pdf_view=ckanext.pdfview.plugin:PdfView
        ''',
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys

# When creating the sdist, make sure the django.mo file also exists:
if 'sdist' in sys.argv or 'develop' in sys.argv:
    os.chdir('threadedcomments')
    try:
        from django.core import management
        management.call_command('compilemessages', stdout=sys.stderr, verbosity=1)
    except ImportError:
        if 'sdist' in sys.argv:
            raise
    finally:
        os.chdir('..')

def read(*parts):
    file_path = path.join(path.dirname(__file__), *parts)
    return codecs.open(file_path, encoding='utf-8').read()

def find_version(*parts):
    version_file = read(*parts)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
    if version_match:
        return str(version_match.group(1))
    raise RuntimeError("Unable to find version string.")

setup(
    name='django-threadedcomments',
    version=find_version('threadedcomments', '__init__.py'),
    license='BSD',
    install_requires=[
        'django-contrib-comments>=1.5',
    ],

    description='A simple yet flexible threaded commenting system.',
    long_description=read('README.rst'),
    keywords='django,comments,threading',

    author='Eric Florenzano',
    author_email='floguy@gmail.com',

    maintainer='Diederik van der Boor',
    maintainer_email='vdboor@edoburu.nl',

    url='https://github.com/HonzaKral/django-threadedcomments',
    download_url='https://github.com/HonzaKral/django-threadedcomments/zipball/master',

    packages=find_packages(exclude=('example*',)),
    include_package_data=True,

    test_suite = 'runtests',

    zip_safe=False,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Framework :: Django',
        'Framework :: Django :: 1.5',
        'Framework :: Django :: 1.6',
        'Framework :: Django :: 1.7',
        'Framework :: Django :: 1.8',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)
<commit_msg>bump requirements and clasisfiers for correct Django compatibility<commit_after>#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys

# When creating the sdist, make sure the django.mo file also exists:
if 'sdist' in sys.argv or 'develop' in sys.argv:
    os.chdir('threadedcomments')
    try:
        from django.core import management
        management.call_command('compilemessages', stdout=sys.stderr, verbosity=1)
    except ImportError:
        if 'sdist' in sys.argv:
            raise
    finally:
        os.chdir('..')

def read(*parts):
    file_path = path.join(path.dirname(__file__), *parts)
    return codecs.open(file_path, encoding='utf-8').read()

def find_version(*parts):
    version_file = read(*parts)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
    if version_match:
        return str(version_match.group(1))
    raise RuntimeError("Unable to find version string.")

setup(
    name='django-threadedcomments',
    version=find_version('threadedcomments', '__init__.py'),
    license='BSD',
    install_requires=[
        'django-contrib-comments>=1.7.3',
    ],

    description='A simple yet flexible threaded commenting system.',
    long_description=read('README.rst'),
    keywords='django,comments,threading',

    author='Eric Florenzano',
    author_email='floguy@gmail.com',

    maintainer='Diederik van der Boor',
    maintainer_email='vdboor@edoburu.nl',

    url='https://github.com/HonzaKral/django-threadedcomments',
    download_url='https://github.com/HonzaKral/django-threadedcomments/zipball/master',

    packages=find_packages(exclude=('example*',)),
    include_package_data=True,

    test_suite = 'runtests',

    zip_safe=False,
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Framework :: Django',
        'Framework :: Django :: 1.7',
        'Framework :: Django :: 1.8',
        'Framework :: Django :: 1.9',
        'Framework :: Django :: 1.10',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ]
)
<|endoftext|>