<commit_before>"""Setup file for GewitterGefahr."""

from setuptools import setup

PACKAGE_NAMES = [
    'gewittergefahr', 'gewittergefahr.gg_io', 'gewittergefahr.gg_utils',
    'gewittergefahr.deep_learning', 'gewittergefahr.plotting',
    'gewittergefahr.scripts', 'gewittergefahr.feature_selection_example',
    'gewittergefahr.nature2019'
]

KEYWORDS = [
    'machine learning', 'deep learning', 'artificial intelligence',
    'data mining', 'weather', 'meteorology', 'thunderstorm', 'wind', 'tornado'
]

SHORT_DESCRIPTION = (
    'End-to-end machine-learning library for predicting thunderstorm hazards.')

LONG_DESCRIPTION = (
    'GewitterGefahr is an end-to-end machine-learning library for predicting '
    'thunderstorm hazards, primarily tornadoes and damaging straight-line wind.'
)

CLASSIFIERS = [
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: MIT License',
    'Programming Language :: Python :: 2.7'
]

# You also need to install the following packages, which are not available in
# pip.  They can both be installed by "git clone" and "python setup.py install",
# the normal way one installs a GitHub package.
#
# https://github.com/matplotlib/basemap
# https://github.com/sharppy/SHARPpy
# https://github.com/tkrajina/srtm.py

PACKAGE_REQUIREMENTS = [
    'numpy',
    'scipy',
    'tensorflow',
    'keras',
    'scikit-learn',
    'scikit-image',
    'netCDF4',
    'pyproj',
    'opencv-python',
    'matplotlib',
    'pandas',
    'shapely',
    'descartes',
    'geopy',
    'metpy'
]

if __name__ == '__main__':
    setup(name='GewitterGefahr',
          version='0.1',
          description=SHORT_DESCRIPTION,
          long_description=LONG_DESCRIPTION,
          license='MIT',
          author='Ryan Lagerquist',
          author_email='ryan.lagerquist@ou.edu',
          url='https://github.com/thunderhoser/GewitterGefahr',
          packages=PACKAGE_NAMES,
          scripts=[],
          keywords=KEYWORDS,
          classifiers=CLASSIFIERS,
          include_package_data=True,
          zip_safe=False,
          install_requires=PACKAGE_REQUIREMENTS)
<commit_msg>setup.py now indicates Python 3.<commit_after>"""Setup file for GewitterGefahr."""

from setuptools import setup

PACKAGE_NAMES = [
    'gewittergefahr', 'gewittergefahr.gg_io', 'gewittergefahr.gg_utils',
    'gewittergefahr.deep_learning', 'gewittergefahr.plotting',
    'gewittergefahr.scripts', 'gewittergefahr.feature_selection_example',
    'gewittergefahr.nature2019'
]

KEYWORDS = [
    'machine learning', 'deep learning', 'artificial intelligence',
    'data mining', 'weather', 'meteorology', 'thunderstorm', 'wind', 'tornado'
]

SHORT_DESCRIPTION = (
    'End-to-end machine-learning library for predicting thunderstorm hazards.')

LONG_DESCRIPTION = (
    'GewitterGefahr is an end-to-end machine-learning library for predicting '
    'thunderstorm hazards, primarily tornadoes and damaging straight-line wind.'
)

CLASSIFIERS = [
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Science/Research',
    'License :: OSI Approved :: MIT License',
    'Programming Language :: Python :: 3'
]

# You also need to install the following packages, which are not available in
# pip.  They can both be installed by "git clone" and "python setup.py install",
# the normal way one installs a GitHub package.
#
# https://github.com/matplotlib/basemap
# https://github.com/sharppy/SHARPpy
# https://github.com/tkrajina/srtm.py

PACKAGE_REQUIREMENTS = [
    'numpy',
    'scipy',
    'tensorflow',
    'keras',
    'scikit-learn',
    'scikit-image',
    'netCDF4',
    'pyproj',
    'opencv-python',
    'matplotlib',
    'pandas',
    'shapely',
    'descartes',
    'geopy',
    'metpy'
]

if __name__ == '__main__':
    setup(name='GewitterGefahr',
          version='0.1',
          description=SHORT_DESCRIPTION,
          long_description=LONG_DESCRIPTION,
          license='MIT',
          author='Ryan Lagerquist',
          author_email='ryan.lagerquist@ou.edu',
          url='https://github.com/thunderhoser/GewitterGefahr',
          packages=PACKAGE_NAMES,
          scripts=[],
          keywords=KEYWORDS,
          classifiers=CLASSIFIERS,
          include_package_data=True,
          zip_safe=False,
          install_requires=PACKAGE_REQUIREMENTS)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-
# ***********************************
#  Author: Pedro Jorge De Los Santos
#  E-mail: delossantosmfq@gmail.com
#  Web: labdls.blogspot.mx
#  License: MIT License
# ***********************************
from distutils.core import setup

setup(name='nusa',
      version='0.1.0.dev0',
      description='Numerical Structural Analysis with Python',
      author='Pedro Jorge De Los Santos',
      author_email='delossantosmfq@gmail.com',
      license = "MIT",
      url='https://github.com/JorgeDeLosSantos/nusa',
      packages=['nusa'],
      )
<commit_msg>to setuptools<commit_after># -*- coding: utf-8 -*-
# ***********************************
#  Author: Pedro Jorge De Los Santos
#  E-mail: delossantosmfq@gmail.com
#  Web: labdls.blogspot.mx
#  License: MIT License
# ***********************************
from setuptools import setup

setup(name='nusa',
      version='0.1.0.dev0',
      description='Numerical Structural Analysis with Python',
      author='Pedro Jorge De Los Santos',
      author_email='delossantosmfq@gmail.com',
      license = "MIT",
      url='https://github.com/JorgeDeLosSantos/nusa',
      packages=['nusa'],
      )
<|endoftext|>


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

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

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

setup(
    name='awscommons',

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

    description='Helpful utilities for managing AWS',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/jcmturner/aws-python-commons',

    # Author details
    author='Jonathan Turner',
    author_email='jt@jtnet.co.uk',

    # Choose your license
    license='Apache Software License',

    # 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 :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: Apache Software License',

        # 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.7',
    ],

    # What does your project relate to?
    keywords='aws cloud development',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['test']),

    # 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/requirements.html
    install_requires=['boto3', 'botocore'],

    # 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={
    #     'console_scripts': [
    #         'sample=sample:main',
    #     ],
    # },
)<commit_msg>update package version<commit_after>from setuptools import setup, find_packages
from codecs import open
from os import path

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

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

setup(
    name='awscommons',

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

    description='Helpful utilities for managing AWS',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/jcmturner/aws-python-commons',

    # Author details
    author='Jonathan Turner',
    author_email='jt@jtnet.co.uk',

    # Choose your license
    license='Apache Software License',

    # 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 :: 3 - Alpha',

        # Indicate who your project is intended for
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries :: Python Modules',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: Apache Software License',

        # 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.7',
    ],

    # What does your project relate to?
    keywords='aws cloud development',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['test']),

    # 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/requirements.html
    install_requires=['boto3', 'botocore'],

    # 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={
    #     'console_scripts': [
    #         'sample=sample:main',
    #     ],
    # },
)<|endoftext|>


<commit_before>"""
The setup package to install TensorPy dependencies.
*> This does NOT include TensorFlow installation.
*> To install TensorFlow, use "./install.sh"
"""

from setuptools import setup, find_packages  # noqa

setup(
    name='tensorpy',
    version='1.0.5',
    url='http://tensorpy.com',
    author='Michael Mintz',
    author_email='@mintzworld',
    maintainer='Michael Mintz',
    description='Making TensorFlow easier to use with Python',
    license='The MIT License',
    install_requires=[
        'requests==2.11.1',
        'six==1.10.0',
        'Pillow==3.4.1',
        'BeautifulSoup==3.2.1',
    ],
    packages=['tensorpy'],
    entry_points={
        'console_scripts': [
            'classify = tensorpy.classify:main',
        ],
    },
)
<commit_msg>Version 1.0.6<commit_after>"""
The setup package to install TensorPy dependencies.
*> This does NOT include TensorFlow installation.
*> To install TensorFlow, use "./install.sh"
"""

from setuptools import setup, find_packages  # noqa

setup(
    name='tensorpy',
    version='1.0.6',
    url='http://tensorpy.com',
    author='Michael Mintz',
    author_email='@mintzworld',
    maintainer='Michael Mintz',
    description='Making TensorFlow easier to use with Python',
    license='The MIT License',
    install_requires=[
        'requests==2.11.1',
        'six==1.10.0',
        'Pillow==3.4.1',
        'BeautifulSoup==3.2.1',
    ],
    packages=['tensorpy'],
    entry_points={
        'console_scripts': [
            'classify = tensorpy.classify:main',
        ],
    },
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
#    OpenERP, Open Source Management Solution
#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

# setup from TinERP
#   taken from straw http://www.nongnu.org/straw/index.html
#   taken from gnomolicious http://www.nongnu.org/gnomolicious/
#   adapted by Nicolas Évrard <nicoe@altern.org>
#

import imp
import sys
import os
import glob

from distutils.core import setup, Command
from distutils.command.install import install

has_py2exe = False
if os.name == 'nt':
    import py2exe
    has_py2exe = True

sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "bin"))

opj = os.path.join

execfile(opj('bin', 'release.py'))

if sys.argv[1] == 'bdist_rpm':
    version = version.split('-')[0]

# get python short version
py_short_version = '%s.%s' % sys.version_info[:2]

required_modules = [
    ('psycopg2', 'PostgreSQL module'),
    ('xml', 'XML Tools for python'),
    ('libxml2', 'libxml2 python bindings'),
    ('libxslt', 'libxslt python bindings'),
    ('reportlab', 'reportlab module'),
    ('pychart', 'pychart module'),
    ('pydot', 'pydot module'),
    ('lxml', 'lxml module: pythonic libxml2 and libxslt bindings'),
]

def check_modules():
    ok = True
    for modname, desc in required_modules:
        try:
            exec('import %s' % modname)
        except ImportError:
            ok = False
            print 'Error: python module %s (%s) is required' % (modname, desc)

    if not ok:
        sys.exit(1)

def _find_addons():
    for (dp, dn, names) in os.walk(opj('bin', 'addons')):
        if '__terp__.py' in names:
            modname = os.path.basename(dp)
            yield (modname, dp)
    #look for extra modules
    try:
        empath = os.getenv('EXTRA_MODULES_PATH','../addons/')
        f = open(opj(empath,'server_modules.list'),'r')
        # print 'Getting modules from:' , opj(empath,'server_modules.list')
        mods = f.readlines()
        for mname in mods:
            mname = mname.strip()
            if not mname:
                continue
            if os.path.exists(opj(empath,mname,'__terp__.py')):
                yield ( mname, opj(empath,mname) )
            else:
                print "Module %s specified, but no valid path." % mname
    except:
        pass

__found_addons = None

# Cache the results of _find_addons() and return them
def find_addons(found_addons = None):
    if not found_addons:
        found_addons = _find_addons()
    return found_addons

def data_files():
    '''Build list of data files to be installed'''
    files = []
    if os.name == 'nt':
        os.chdir('bin')
        for (dp,dn,names) in os.walk('addons'):
            files.append((dp, map(lambda x: opj('bin', dp, x), names)))
        os.chdir('..')
        for (dp,dn,names) in os.walk('doc'):
            files.append((dp, map(lambda x: opj(dp, x), names)))
        files.append(('.', [opj('bin', 'import_xml.rng'),
                            opj('bin', 'server.pkey'),
                            opj('bin', 'server.cert')]))
    else:
        man_directory = opj('share', 'man')
        files.append((opj(man_directory, 'man1'), ['man/openerp-server.1']))
        files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5']))

        doc_directory = opj('share', 'doc', 'openerp-server-%s' % version)
        files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)]))
        files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)]))
        files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)]))

        openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')

        files.append((openerp_site_packages, [opj('bin', 'import_xml.rng'),
                                              opj('bin', 'server.pkey'),
                                              opj('bin', 'server.cert')]))

        if sys.version_info[0:2] == (2,5):
            files.append((openerp_site_packages, [ opj('python25-compat','BaseHTTPServer.py'),
                                                   opj('python25-compat','SimpleXMLRPCServer.py'),
                                                   opj('python25-compat','SocketServer.py')]))

        for (addonname, add_path) in find_addons():
            addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server','addons', addonname)
            pathfiles = []
            for root, dirs, innerfiles in os.walk(add_path):
                innerfiles = filter(lambda fil: os.path.splitext(fil)[1] not in ('.pyc', '.pyd', '.pyo'), innerfiles)
                if innerfiles:
                    res = os.path.normpath(opj(addon_path, root.replace(opj(add_path), '.')))
                    pathfiles.extend(((res, map(lambda fil: opj(root, fil), innerfiles)),))
            files.extend(pathfiles)

    # for tup in files:
    #    print "Files:", tup[0], tup[1]
    return files

if not os.getenv('NO_CHECK_MODULES',False) :
    check_modules()

f = file('openerp-server','w')
start_script = """#!/bin/sh\necho "OpenERP Setup - The content of this file is generated at the install stage\n" """
f.write(start_script)
f.close()

def find_package_dirs():
    res = {}
    for (mod, path) in find_addons():
        res ['openerp-server.addons.'+ mod ] = path
    res ['openerp-server'] = 'bin'
    return res

class openerp_server_install(install):
    def run(self):
        # create startup script
        start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n" % (opj(self.install_libbase, "openerp-server"), sys.executable)
        # write script
        f = open('openerp-server', 'w')
        f.write(start_script)
        f.close()
        install.run(self)

options = {
    "py2exe": {
        "compressed": 1,
        "optimize": 2,
        "dist_dir": 'dist',
        "packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
                     "lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath",
                     "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing",
                     "pydot","asyncore","asynchat", "reportlab", "vobject",
                     "HTMLParser", "select"],
        "excludes" : ["Tkconstants","Tkinter","tcl"],
    }
}

setup(name             = name,
      version          = version,
      description      = description,
      long_description = long_desc,
      url              = url,
      author           = author,
      author_email     = author_email,
      classifiers      = filter(None, classifiers.split("\n")),
      license          = license,
      data_files       = data_files(),
      cmdclass         = {
            'install' : openerp_server_install,
      },
      scripts          = ['openerp-server'],
      packages         = ['openerp-server',
                          'openerp-server.addons',
                          'openerp-server.ir',
                          'openerp-server.osv',
                          'openerp-server.service',
                          'openerp-server.tools',
                          'openerp-server.report',
                          'openerp-server.report.printscreen',
                          'openerp-server.report.pyPdf',
                          'openerp-server.report.render',
                          'openerp-server.report.render.rml2pdf',
                          'openerp-server.report.render.rml2html',
                          'openerp-server.report.render.rml2txt',
                          'openerp-server.report.render.html2html',
                          'openerp-server.wizard',
                          'openerp-server.report.render.odt2odt',
                          'openerp-server.workflow'] + \
                          list(map( lambda (a, p): 'openerp-server.addons.'+ a ,find_addons())),
      package_dir      = find_package_dirs(),
      console = [ { "script" : "bin\\openerp-server.py", "icon_resources" : [ (1,"pixmaps\\openerp-icon.ico") ] } ],
      options = options,
      )

if has_py2exe:
  # Sometime between pytz-2008a and pytz-2008i common_timezones started to
  # include only names of zones with a corresponding data file in zoneinfo.
  # pytz installs the zoneinfo directory tree in the same directory
  # as the pytz/__init__.py file. These data files are loaded using
  # pkg_resources.resource_stream. py2exe does not copy this to library.zip so
  # resource_stream can't find the files and common_timezones is empty when
  # read in the py2exe executable.
  # This manually copies zoneinfo into the zip. See also
  # http://code.google.com/p/googletransitdatafeed/issues/detail?id=121
  import pytz
  import zipfile
  # Make sure the layout of pytz hasn't changed
  assert (pytz.__file__.endswith('__init__.pyc') or
          pytz.__file__.endswith('__init__.py')), pytz.__file__
  zoneinfo_dir = os.path.join(os.path.dirname(pytz.__file__), 'zoneinfo')
  # '..\\Lib\\pytz\\__init__.py' -> '..\\Lib'
  disk_basedir = os.path.dirname(os.path.dirname(pytz.__file__))
  zipfile_path = os.path.join(options['py2exe']['dist_dir'], 'library.zip')
  z = zipfile.ZipFile(zipfile_path, 'a')
  for absdir, directories, filenames in os.walk(zoneinfo_dir):
    assert absdir.startswith(disk_basedir), (absdir, disk_basedir)
    zip_dir = absdir[len(disk_basedir):]
    for f in filenames:
      z.write(os.path.join(absdir, f), os.path.join(zip_dir, f))
  z.close()

<commit_msg>Added mako in setup.py<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
#    OpenERP, Open Source Management Solution
#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

# setup from TinERP
#   taken from straw http://www.nongnu.org/straw/index.html
#   taken from gnomolicious http://www.nongnu.org/gnomolicious/
#   adapted by Nicolas Évrard <nicoe@altern.org>
#

import imp
import sys
import os
import glob

from distutils.core import setup, Command
from distutils.command.install import install

has_py2exe = False
if os.name == 'nt':
    import py2exe
    has_py2exe = True

sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "bin"))

opj = os.path.join

execfile(opj('bin', 'release.py'))

if sys.argv[1] == 'bdist_rpm':
    version = version.split('-')[0]

# get python short version
py_short_version = '%s.%s' % sys.version_info[:2]

required_modules = [
    ('psycopg2', 'PostgreSQL module'),
    ('xml', 'XML Tools for python'),
    ('libxml2', 'libxml2 python bindings'),
    ('libxslt', 'libxslt python bindings'),
    ('reportlab', 'reportlab module'),
    ('pychart', 'pychart module'),
    ('pydot', 'pydot module'),
    ('lxml', 'lxml module: pythonic libxml2 and libxslt bindings'),
    ('mako','Mako templating library'),
]

def check_modules():
    ok = True
    for modname, desc in required_modules:
        try:
            exec('import %s' % modname)
        except ImportError:
            ok = False
            print 'Error: python module %s (%s) is required' % (modname, desc)

    if not ok:
        sys.exit(1)

def _find_addons():
    for (dp, dn, names) in os.walk(opj('bin', 'addons')):
        if '__terp__.py' in names:
            modname = os.path.basename(dp)
            yield (modname, dp)
    #look for extra modules
    try:
        empath = os.getenv('EXTRA_MODULES_PATH','../addons/')
        f = open(opj(empath,'server_modules.list'),'r')
        # print 'Getting modules from:' , opj(empath,'server_modules.list')
        mods = f.readlines()
        for mname in mods:
            mname = mname.strip()
            if not mname:
                continue
            if os.path.exists(opj(empath,mname,'__terp__.py')):
                yield ( mname, opj(empath,mname) )
            else:
                print "Module %s specified, but no valid path." % mname
    except:
        pass

__found_addons = None

# Cache the results of _find_addons() and return them
def find_addons(found_addons = None):
    if not found_addons:
        found_addons = _find_addons()
    return found_addons

def data_files():
    '''Build list of data files to be installed'''
    files = []
    if os.name == 'nt':
        os.chdir('bin')
        for (dp,dn,names) in os.walk('addons'):
            files.append((dp, map(lambda x: opj('bin', dp, x), names)))
        os.chdir('..')
        for (dp,dn,names) in os.walk('doc'):
            files.append((dp, map(lambda x: opj(dp, x), names)))
        files.append(('.', [opj('bin', 'import_xml.rng'),
                            opj('bin', 'server.pkey'),
                            opj('bin', 'server.cert')]))
    else:
        man_directory = opj('share', 'man')
        files.append((opj(man_directory, 'man1'), ['man/openerp-server.1']))
        files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5']))

        doc_directory = opj('share', 'doc', 'openerp-server-%s' % version)
        files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)]))
        files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)]))
        files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)]))

        openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')

        files.append((openerp_site_packages, [opj('bin', 'import_xml.rng'),
                                              opj('bin', 'server.pkey'),
                                              opj('bin', 'server.cert')]))

        if sys.version_info[0:2] == (2,5):
            files.append((openerp_site_packages, [ opj('python25-compat','BaseHTTPServer.py'),
                                                   opj('python25-compat','SimpleXMLRPCServer.py'),
                                                   opj('python25-compat','SocketServer.py')]))

        for (addonname, add_path) in find_addons():
            addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server','addons', addonname)
            pathfiles = []
            for root, dirs, innerfiles in os.walk(add_path):
                innerfiles = filter(lambda fil: os.path.splitext(fil)[1] not in ('.pyc', '.pyd', '.pyo'), innerfiles)
                if innerfiles:
                    res = os.path.normpath(opj(addon_path, root.replace(opj(add_path), '.')))
                    pathfiles.extend(((res, map(lambda fil: opj(root, fil), innerfiles)),))
            files.extend(pathfiles)

    # for tup in files:
    #    print "Files:", tup[0], tup[1]
    return files

if not os.getenv('NO_CHECK_MODULES',False) :
    check_modules()

f = file('openerp-server','w')
start_script = """#!/bin/sh\necho "OpenERP Setup - The content of this file is generated at the install stage\n" """
f.write(start_script)
f.close()

def find_package_dirs():
    res = {}
    for (mod, path) in find_addons():
        res ['openerp-server.addons.'+ mod ] = path
    res ['openerp-server'] = 'bin'
    return res

class openerp_server_install(install):
    def run(self):
        # create startup script
        start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n" % (opj(self.install_libbase, "openerp-server"), sys.executable)
        # write script
        f = open('openerp-server', 'w')
        f.write(start_script)
        f.close()
        install.run(self)

options = {
    "py2exe": {
        "compressed": 1,
        "optimize": 2,
        "dist_dir": 'dist',
        "packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
                     "lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath",
                     "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing",
                     "pydot","asyncore","asynchat", "reportlab", "vobject","mako",
                     "HTMLParser", "select"],
        "excludes" : ["Tkconstants","Tkinter","tcl"],
    }
}

setup(name             = name,
      version          = version,
      description      = description,
      long_description = long_desc,
      url              = url,
      author           = author,
      author_email     = author_email,
      classifiers      = filter(None, classifiers.split("\n")),
      license          = license,
      data_files       = data_files(),
      cmdclass         = {
            'install' : openerp_server_install,
      },
      scripts          = ['openerp-server'],
      packages         = ['openerp-server',
                          'openerp-server.addons',
                          'openerp-server.ir',
                          'openerp-server.osv',
                          'openerp-server.service',
                          'openerp-server.tools',
                          'openerp-server.report',
                          'openerp-server.report.printscreen',
                          'openerp-server.report.pyPdf',
                          'openerp-server.report.render',
                          'openerp-server.report.render.rml2pdf',
                          'openerp-server.report.render.rml2html',
                          'openerp-server.report.render.rml2txt',
                          'openerp-server.report.render.html2html',
                          'openerp-server.report.render.makohtml2html',
                          'openerp-server.wizard',
                          'openerp-server.report.render.odt2odt',
                          'openerp-server.workflow'] + \
                          list(map( lambda (a, p): 'openerp-server.addons.'+ a ,find_addons())),
      package_dir      = find_package_dirs(),
      console = [ { "script" : "bin\\openerp-server.py", "icon_resources" : [ (1,"pixmaps\\openerp-icon.ico") ] } ],
      options = options,
      )

if has_py2exe:
  # Sometime between pytz-2008a and pytz-2008i common_timezones started to
  # include only names of zones with a corresponding data file in zoneinfo.
  # pytz installs the zoneinfo directory tree in the same directory
  # as the pytz/__init__.py file. These data files are loaded using
  # pkg_resources.resource_stream. py2exe does not copy this to library.zip so
  # resource_stream can't find the files and common_timezones is empty when
  # read in the py2exe executable.
  # This manually copies zoneinfo into the zip. See also
  # http://code.google.com/p/googletransitdatafeed/issues/detail?id=121
  import pytz
  import zipfile
  # Make sure the layout of pytz hasn't changed
  assert (pytz.__file__.endswith('__init__.pyc') or
          pytz.__file__.endswith('__init__.py')), pytz.__file__
  zoneinfo_dir = os.path.join(os.path.dirname(pytz.__file__), 'zoneinfo')
  # '..\\Lib\\pytz\\__init__.py' -> '..\\Lib'
  disk_basedir = os.path.dirname(os.path.dirname(pytz.__file__))
  zipfile_path = os.path.join(options['py2exe']['dist_dir'], 'library.zip')
  z = zipfile.ZipFile(zipfile_path, 'a')
  for absdir, directories, filenames in os.walk(zoneinfo_dir):
    assert absdir.startswith(disk_basedir), (absdir, disk_basedir)
    zip_dir = absdir[len(disk_basedir):]
    for f in filenames:
      z.write(os.path.join(absdir, f), os.path.join(zip_dir, f))
  z.close()

<|endoftext|>


<commit_before>import os
from setuptools import setup

setup(
    name = "chronos-python",
    version = "0.33.0",
    author = "Asher Feldman",
    author_email = "asher@democument.com",
    description = ("A Python client libary for the Chronos Job Scheduler."),
    license = "MIT",
    keywords = "chronos",
    packages=['chronos'],
    scripts=['bin/chronos-sync-jobs.py', 'bin/chronos-nagios.py'],
    long_description="A python client library for the Chronos Job Scheduler, with support scripts.",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "License :: OSI Approved :: MIT License",
    ],
    install_requires = [
        'httplib2 >= 0.9'
    ],
    url='https://github.com/asher/chronos-python',
)
<commit_msg>release 0.34.0<commit_after>import os
from setuptools import setup

setup(
    name = "chronos-python",
    version = "0.34.0",
    author = "Asher Feldman",
    author_email = "asher@democument.com",
    description = ("A Python client libary for the Chronos Job Scheduler."),
    license = "MIT",
    keywords = "chronos",
    packages=['chronos'],
    scripts=['bin/chronos-sync-jobs.py', 'bin/chronos-nagios.py'],
    long_description="A python client library for the Chronos Job Scheduler, with support scripts.",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "License :: OSI Approved :: MIT License",
    ],
    install_requires = [
        'httplib2 >= 0.9'
    ],
    url='https://github.com/asher/chronos-python',
)
<|endoftext|>


<commit_before>import os
from setuptools import setup, find_packages

# Utility function to read the README file.
# Used for the long_description.  It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "sound4python",
    version = "0.1.2",
    author = "Peter Rennert, dave.crist@gmail.com",
    author_email = "p.rennert@cs.ucl.ac.uk, dave.crist@gmail.com",
    description = ("comfortable playback of wav files"),
    packages=["sound4python"],
    license = read('LICENSE.txt'),
    keywords = "wav",
    url = "https://github.com/groakat/sound4python",
    long_description=read('README.md'),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Topic :: Utilities",
    ],
)<commit_msg>fixing setup (last time ;))<commit_after>import os
from setuptools import setup, find_packages

# Utility function to read the README file.
# Used for the long_description.  It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "sound4python",
    version = "0.1.2",
    author = "Peter Rennert, dave.crist@gmail.com",
    author_email = "p.rennert@cs.ucl.ac.uk, dave.crist@gmail.com",
    description = ("comfortable playback of wav files"),
    packages=find_packages(),
    license = read('LICENSE.txt'),
    keywords = "wav",
    url = "https://github.com/groakat/sound4python",
    long_description=read('README.md'),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Topic :: Utilities",
    ],
)<|endoftext|>


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

from setuptools import setup, find_packages

__version__ = '1.0.0'

min_numpy_ver = '1.7.0'

setup(

    name='fastga',
    version=__version__,

    author='The FastGA team',

    license="Unlicense",

    packages=find_packages(),

    description="Implementation of the so-called Heavy-Tailed Mutation Operator",

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

    install_requires=["numpy >= {}".format(min_numpy_ver)],

    # Active la prise en compte du fichier MANIFEST.in
    include_package_data=True,

    # Une url qui pointe vers la page officielle de votre lib
    url='https://github.com/FastGA/fast-genetic-algorithms',

    # Il est d'usage de mettre quelques metadata à propos de sa lib
    # Pour que les robots puissent facilement la classer.
    # La liste des marqueurs autorisées est longue:
    # https://pypi.python.org/pypi?%3Aaction=list_classifiers.
    #
    # Il n'y a pas vraiment de règle pour le contenu. Chacun fait un peu
    # comme il le sent. Il y en a qui ne mettent rien.
    classifiers=[
        "Programming Language :: Python",
        "Operating System :: OS Independent",
        "License :: Public Domain",
        "Programming Language :: Python :: 3.5",
        "Topic :: Scientific/Engineering :: Artificial Intelligence"
    ],
)
<commit_msg>New release<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages

__version__ = '1.0.1'

min_numpy_ver = '1.7.0'

setup(

    name='fastga',
    version=__version__,

    author='The FastGA team',

    license="Unlicense",

    packages=find_packages(),

    description="Implementation of the so-called Heavy-Tailed Mutation Operator",

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

    install_requires=["numpy >= {}".format(min_numpy_ver)],

    # Active la prise en compte du fichier MANIFEST.in
    include_package_data=True,

    # Une url qui pointe vers la page officielle de votre lib
    url='https://github.com/FastGA/fast-genetic-algorithms',

    # Il est d'usage de mettre quelques metadata à propos de sa lib
    # Pour que les robots puissent facilement la classer.
    # La liste des marqueurs autorisées est longue:
    # https://pypi.python.org/pypi?%3Aaction=list_classifiers.
    #
    # Il n'y a pas vraiment de règle pour le contenu. Chacun fait un peu
    # comme il le sent. Il y en a qui ne mettent rien.
    classifiers=[
        "Programming Language :: Python",
        "Operating System :: OS Independent",
        "License :: Public Domain",
        "Programming Language :: Python :: 3.5",
        "Topic :: Scientific/Engineering :: Artificial Intelligence"
    ],
)
<|endoftext|>


<commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from distutils.spawn import find_executable
from distutils import sysconfig, log
import setuptools
import setuptools.command.build_py
import setuptools.command.develop
import setuptools.command.build_ext

from collections import namedtuple
from contextlib import contextmanager
import glob
import os
import multiprocessing
import shlex
import subprocess
import sys
from textwrap import dedent

TOP_DIR = os.path.realpath(os.path.dirname(__file__))
SRC_DIR = os.path.join(TOP_DIR, 'caffe2')
CMAKE_BUILD_DIR = os.path.join(TOP_DIR, '.setuptools-cmake-build')

install_requires = []
setup_requires = []
tests_require = []

################################################################################
# Pre Check
################################################################################

CMAKE = find_executable('cmake')
assert CMAKE, 'Could not find "cmake" executable!'
NINJA = find_executable('ninja')
MAKE = find_executable('make')
assert NINJA or MAKE, \
    'Could not find neither "ninja" nor "make" executable!'

################################################################################
# utils functions
################################################################################

@contextmanager
def cd(path):
    if not os.path.isabs(path):
        raise RuntimeError('Can only cd to absolute path, got: {}'.format(path))
    orig_path = os.getcwd()
    os.chdir(path)
    try:
        yield
    finally:
        os.chdir(orig_path)

################################################################################
# Version
################################################################################

try:
    git_version = subprocess.check_output(['git', 'describe', '--tags', 'HEAD'],
                                          cwd=TOP_DIR).decode('ascii').strip()
except (OSError, subprocess.CalledProcessError):
    git_version = None

with open(os.path.join(TOP_DIR, 'VERSION_NUMBER')) as version_file:
    VersionInfo = namedtuple('VersionInfo', ['version', 'git_version'])(
        version=version_file.read().strip(),
        git_version=git_version
    )

################################################################################
# Customized commands
################################################################################

class Caffe2Command(setuptools.Command):
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

class create_version(Caffe2Command):
    def run(self):
        with open(os.path.join(SRC_DIR, 'version.py'), 'w') as f:
            f.write(dedent('''
            version = '{version}'
            git_version = '{git_version}'
            '''.format(**dict(VersionInfo._asdict()))))

class cmake_build(Caffe2Command):
    """
    Compiles everything when `python setup.py build` is run using cmake.

    Custom args can be passed to cmake by specifying the `CMAKE_ARGS`
    environment variable. E.g. to build without cuda support run:
        `CMAKE_ARGS=-DUSE_CUDA=Off python setup.py build`

    The number of CPUs used by `make`/`ninja` can be specified by passing
    `-j<ncpus>` to `setup.py build`.  By default all CPUs are used.
    """
    user_options = [
        (str('jobs='), str('j'),
            str('Specifies the number of jobs to use with make or ninja'))
    ]

    built = False

    def initialize_options(self):
        self.jobs = multiprocessing.cpu_count()

    def finalize_options(self):
        self.jobs = int(self.jobs)

    def run(self):
        if cmake_build.built:
            return
        cmake_build.built = True

        if not os.path.exists(CMAKE_BUILD_DIR):
            os.makedirs(CMAKE_BUILD_DIR)

        with cd(CMAKE_BUILD_DIR):
            # configure
            cmake_args = [
                find_executable('cmake'),
                '-DBUILD_SHARED_LIBS=OFF',
                '-DPYTHON_EXECUTABLE:FILEPATH={}'.format(sys.executable),
                '-DPYTHON_INCLUDE_DIR={}'.format(sysconfig.get_python_inc()),
                '-DBUILD_TEST=OFF',
                '-DBUILD_BENCHMARK=OFF',
                '-DBUILD_BINARY=OFF',
            ]
            if NINJA:
                cmake_args.extend(['-G', 'Ninja'])
            if 'CMAKE_ARGS' in os.environ:
                extra_cmake_args = shlex.split(os.environ['CMAKE_ARGS'])
                # prevent crossfire with downstream scripts
                del os.environ['CMAKE_ARGS']
                log.info('Extra cmake args: {}'.format(extra_cmake_args))
            cmake_args.append(TOP_DIR)
            subprocess.check_call(cmake_args)

            build_args = [NINJA or MAKE]
            # control the number of concurrent jobs
            if self.jobs is not None:
                build_args.extend(['-j', str(self.jobs)])
            subprocess.check_call(build_args)

class build_py(setuptools.command.build_py.build_py):
    def run(self):
        self.run_command('create_version')
        self.run_command('cmake_build')
        for d in ['caffe', 'caffe2']:
            for src in glob.glob(
                    os.path.join(CMAKE_BUILD_DIR, d, 'proto', '*.py')):
                dst = os.path.join(
                    TOP_DIR, os.path.relpath(src, CMAKE_BUILD_DIR))
                self.copy_file(src, dst)
        setuptools.command.build_py.build_py.run(self)

class build_ext(setuptools.command.build_ext.build_ext):
    def get_outputs(self):
        return [os.path.join(self.build_lib, d)
                for d in ['caffe', 'caffe2']]

    def run(self):
        self.run_command('cmake_build')
        setuptools.command.build_ext.build_ext.run(self)

    def build_extensions(self):
        i = 0
        while i < len(self.extensions):
            ext = self.extensions[i]
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)

            src = os.path.join(CMAKE_BUILD_DIR, filename)
            if not os.path.exists(src):
                del self.extensions[i]
            else:
                dst = os.path.join(os.path.realpath(self.build_lib), filename)
                self.copy_file(src, dst)
                i += 1

class develop(setuptools.command.develop.develop):
    def run(self):
        self.run_command('build_py')
        setuptools.command.develop.develop.run(self)

cmdclass = {
    'create_version': create_version,
    'cmake_build': cmake_build,
    'build_py': build_py,
    'build_ext': build_ext,
    'develop': develop,
}

################################################################################
# Extensions
################################################################################

ext_modules = [
    setuptools.Extension(
        name=str('caffe2.python.caffe2_pybind11_state'),
        sources=[]),
    setuptools.Extension(
        name=str('caffe2.python.caffe2_pybind11_state_gpu'),
        sources=[]),
]

################################################################################
# Packages
################################################################################

packages = setuptools.find_packages()

install_requires.extend(['protobuf',
                         'numpy',
                         'flask',
                         'future',
                         'graphviz',
                         'hypothesis',
                         'jupyter',
                         'matplotlib',
                         'pydot',
                         'python-nvd3',
                         'pyyaml',
                         'requests',
                         'scikit-image',
                         'scipy',
                         'setuptools',
                         'six',
                         'tornado'])

################################################################################
# Test
################################################################################

setup_requires.append('pytest-runner')
tests_require.extend(['pytest-cov', 'hypothesis'])

################################################################################
# Final
################################################################################

setuptools.setup(
    name='caffe2',
    version=VersionInfo.version,
    description='Caffe2',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    packages=packages,
    install_requires=install_requires,
    setup_requires=setup_requires,
    tests_require=tests_require,
    author='jiayq',
    author_email='jiayq@fb.com',
    url='https://caffe2.ai',
)
<commit_msg>strip some python dependencies (#2486)<commit_after>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from distutils.spawn import find_executable
from distutils import sysconfig, log
import setuptools
import setuptools.command.build_py
import setuptools.command.develop
import setuptools.command.build_ext

from collections import namedtuple
from contextlib import contextmanager
import glob
import os
import multiprocessing
import shlex
import subprocess
import sys
from textwrap import dedent

TOP_DIR = os.path.realpath(os.path.dirname(__file__))
SRC_DIR = os.path.join(TOP_DIR, 'caffe2')
CMAKE_BUILD_DIR = os.path.join(TOP_DIR, '.setuptools-cmake-build')

install_requires = []
setup_requires = []
tests_require = []

################################################################################
# Pre Check
################################################################################

CMAKE = find_executable('cmake')
assert CMAKE, 'Could not find "cmake" executable!'
NINJA = find_executable('ninja')
MAKE = find_executable('make')
assert NINJA or MAKE, \
    'Could not find neither "ninja" nor "make" executable!'

################################################################################
# utils functions
################################################################################

@contextmanager
def cd(path):
    if not os.path.isabs(path):
        raise RuntimeError('Can only cd to absolute path, got: {}'.format(path))
    orig_path = os.getcwd()
    os.chdir(path)
    try:
        yield
    finally:
        os.chdir(orig_path)

################################################################################
# Version
################################################################################

try:
    git_version = subprocess.check_output(['git', 'describe', '--tags', 'HEAD'],
                                          cwd=TOP_DIR).decode('ascii').strip()
except (OSError, subprocess.CalledProcessError):
    git_version = None

with open(os.path.join(TOP_DIR, 'VERSION_NUMBER')) as version_file:
    VersionInfo = namedtuple('VersionInfo', ['version', 'git_version'])(
        version=version_file.read().strip(),
        git_version=git_version
    )

################################################################################
# Customized commands
################################################################################

class Caffe2Command(setuptools.Command):
    user_options = []

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

class create_version(Caffe2Command):
    def run(self):
        with open(os.path.join(SRC_DIR, 'version.py'), 'w') as f:
            f.write(dedent('''
            version = '{version}'
            git_version = '{git_version}'
            '''.format(**dict(VersionInfo._asdict()))))

class cmake_build(Caffe2Command):
    """
    Compiles everything when `python setup.py build` is run using cmake.

    Custom args can be passed to cmake by specifying the `CMAKE_ARGS`
    environment variable. E.g. to build without cuda support run:
        `CMAKE_ARGS=-DUSE_CUDA=Off python setup.py build`

    The number of CPUs used by `make`/`ninja` can be specified by passing
    `-j<ncpus>` to `setup.py build`.  By default all CPUs are used.
    """
    user_options = [
        (str('jobs='), str('j'),
            str('Specifies the number of jobs to use with make or ninja'))
    ]

    built = False

    def initialize_options(self):
        self.jobs = multiprocessing.cpu_count()

    def finalize_options(self):
        self.jobs = int(self.jobs)

    def run(self):
        if cmake_build.built:
            return
        cmake_build.built = True

        if not os.path.exists(CMAKE_BUILD_DIR):
            os.makedirs(CMAKE_BUILD_DIR)

        with cd(CMAKE_BUILD_DIR):
            # configure
            cmake_args = [
                find_executable('cmake'),
                '-DBUILD_SHARED_LIBS=OFF',
                '-DPYTHON_EXECUTABLE:FILEPATH={}'.format(sys.executable),
                '-DPYTHON_INCLUDE_DIR={}'.format(sysconfig.get_python_inc()),
                '-DBUILD_TEST=OFF',
                '-DBUILD_BENCHMARK=OFF',
                '-DBUILD_BINARY=OFF',
            ]
            if NINJA:
                cmake_args.extend(['-G', 'Ninja'])
            if 'CMAKE_ARGS' in os.environ:
                extra_cmake_args = shlex.split(os.environ['CMAKE_ARGS'])
                # prevent crossfire with downstream scripts
                del os.environ['CMAKE_ARGS']
                log.info('Extra cmake args: {}'.format(extra_cmake_args))
            cmake_args.append(TOP_DIR)
            subprocess.check_call(cmake_args)

            build_args = [NINJA or MAKE]
            # control the number of concurrent jobs
            if self.jobs is not None:
                build_args.extend(['-j', str(self.jobs)])
            subprocess.check_call(build_args)

class build_py(setuptools.command.build_py.build_py):
    def run(self):
        self.run_command('create_version')
        self.run_command('cmake_build')
        for d in ['caffe', 'caffe2']:
            for src in glob.glob(
                    os.path.join(CMAKE_BUILD_DIR, d, 'proto', '*.py')):
                dst = os.path.join(
                    TOP_DIR, os.path.relpath(src, CMAKE_BUILD_DIR))
                self.copy_file(src, dst)
        setuptools.command.build_py.build_py.run(self)

class build_ext(setuptools.command.build_ext.build_ext):
    def get_outputs(self):
        return [os.path.join(self.build_lib, d)
                for d in ['caffe', 'caffe2']]

    def run(self):
        self.run_command('cmake_build')
        setuptools.command.build_ext.build_ext.run(self)

    def build_extensions(self):
        i = 0
        while i < len(self.extensions):
            ext = self.extensions[i]
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)

            src = os.path.join(CMAKE_BUILD_DIR, filename)
            if not os.path.exists(src):
                del self.extensions[i]
            else:
                dst = os.path.join(os.path.realpath(self.build_lib), filename)
                self.copy_file(src, dst)
                i += 1

class develop(setuptools.command.develop.develop):
    def run(self):
        self.run_command('build_py')
        setuptools.command.develop.develop.run(self)

cmdclass = {
    'create_version': create_version,
    'cmake_build': cmake_build,
    'build_py': build_py,
    'build_ext': build_ext,
    'develop': develop,
}

################################################################################
# Extensions
################################################################################

ext_modules = [
    setuptools.Extension(
        name=str('caffe2.python.caffe2_pybind11_state'),
        sources=[]),
    setuptools.Extension(
        name=str('caffe2.python.caffe2_pybind11_state_gpu'),
        sources=[]),
]

################################################################################
# Packages
################################################################################

packages = setuptools.find_packages()

install_requires.extend(['protobuf',
                         'numpy',
                         'future',
                         'hypothesis',
                         'requests',
                         'scipy',
                         'six',])

################################################################################
# Test
################################################################################

setup_requires.append('pytest-runner')
tests_require.extend(['pytest-cov', 'hypothesis'])

################################################################################
# Final
################################################################################

setuptools.setup(
    name='caffe2',
    version=VersionInfo.version,
    description='Caffe2',
    ext_modules=ext_modules,
    cmdclass=cmdclass,
    packages=packages,
    install_requires=install_requires,
    setup_requires=setup_requires,
    tests_require=tests_require,
    author='jiayq',
    author_email='jiayq@fb.com',
    url='https://caffe2.ai',
)
<|endoftext|>


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

import os
import sys
from setuptools import setup

os.system('make rst')
try:
    readme = open('README.rst').read()
except FileNotFoundError:
    # fallback when installing from source package
    readme = ''

setup(
    name='microscopestitching',
    version=open(os.path.join('microscopestitching', 'VERSION')).read().strip(),
    description='Automatic merge/stitching of regular spaced images',
    long_description=readme,
    author='Arve Seljebu',
    author_email='arve.seljebu@gmail.com',
    url='https://github.com/arve0/microscopestitching',
    packages=[
        'microscopestitching',
    ],
    package_dir={'microscopestitching': 'microscopestitching'},
    package_data={'microscopestitching': ['VERSION']},
    include_package_data=True,
    install_requires=[
    ],
    license='MIT',
    zip_safe=False,
    keywords='microscopestitching',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
    ],
)
<commit_msg>update setup<commit_after>#!/usr/bin/env python

import os
import sys
from setuptools import setup

os.system('make rst')
try:
    readme = open('README.rst').read()
except FileNotFoundError:
    # fallback when installing from source package
    readme = ''

setup(
    name='microscopestitching',
    version=open(os.path.join('microscopestitching', 'VERSION')).read().strip(),
    description='Automatic merge/stitching of regular spaced images',
    long_description=readme,
    author='Arve Seljebu',
    author_email='arve.seljebu@gmail.com',
    url='https://github.com/arve0/microscopestitching',
    packages=[
        'microscopestitching',
    ],
    package_dir={'microscopestitching': 'microscopestitching'},
    package_data={'microscopestitching': ['VERSION']},
    include_package_data=True,
    install_requires=[
        'imreg_dft',
        'scikit-image'
        'numpy',
        'joblib'
    ],
    license='MIT',
    zip_safe=False,
    keywords='microscopestitching',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
    ],
)
<|endoftext|>


<commit_before>import os

from setuptools import setup

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

def read_rst(f):
    try:
        with open(os.path.join(THIS_DIR, f), 'r') as f_in:
            return f_in.read()
    except:
        return "GeomEppy"

setup(
    name='geomeppy',
    packages=[
        'geomeppy',
        'tests',
    ],
    version='0.3.13',
    description='Geometry editing for E+ idf files',
    long_description=read_rst('README.rst'),
    author='Jamie Bull',
    author_email='jamie.bull@oco-carbon.com',
    url='https://github.com/jamiebull1/geomeppy',
    download_url='https://github.com/jamiebull1/geomeppy/tarball/v0.3.13',
    license='MIT License',
    keywords=[
        'EnergyPlus',
        'geometry',
        'building performance simulation',
    ],
    platforms='any',
    install_requires=[
        'eppy==0.5.46',
        'numpy==1.13',
        'pyclipper==1.0.6',  # geometry intersection
        'shapely==1.6.2',  # geometry transformations
        'six==1.11.0',  # python2/3 compatibility
        'transforms3d==0.3.1',  # geometry transformations
    ],
    classifiers = [
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Development Status :: 3 - Alpha',
        'Natural Language :: English',
        'Environment :: Console',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Topic :: Scientific/Engineering',
    ],
    extras_require={
        ':python_version>="3.4"': [
            'mypy==0.550',  # static type checking
        ],
        'testing': [
            'codecov',
            'flake8',
            'pytest-cov',
            'typing',
        ],
    },
)

<commit_msg>Add matplotlib to requirements<commit_after>import os

from setuptools import setup

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

def read_rst(f):
    try:
        with open(os.path.join(THIS_DIR, f), 'r') as f_in:
            return f_in.read()
    except:
        return "GeomEppy"

setup(
    name='geomeppy',
    packages=[
        'geomeppy',
        'tests',
    ],
    version='0.3.13',
    description='Geometry editing for E+ idf files',
    long_description=read_rst('README.rst'),
    author='Jamie Bull',
    author_email='jamie.bull@oco-carbon.com',
    url='https://github.com/jamiebull1/geomeppy',
    download_url='https://github.com/jamiebull1/geomeppy/tarball/v0.3.13',
    license='MIT License',
    keywords=[
        'EnergyPlus',
        'geometry',
        'building performance simulation',
    ],
    platforms='any',
    install_requires=[
        'eppy==0.5.46',
        'matplotlib',  # model viewer
        'numpy==1.13',
        'pyclipper==1.0.6',  # geometry intersection
        'shapely==1.6.2',  # geometry transformations
        'six==1.11.0',  # python2/3 compatibility
        'transforms3d==0.3.1',  # geometry transformations
    ],
    classifiers = [
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3',
        'Development Status :: 3 - Alpha',
        'Natural Language :: English',
        'Environment :: Console',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Topic :: Scientific/Engineering',
    ],
    extras_require={
        ':python_version>="3.4"': [
            'mypy==0.550',  # static type checking
        ],
        'testing': [
            'codecov',
            'flake8',
            'pytest-cov',
            'typing',
        ],
    },
)

<|endoftext|>


<commit_before>import sys

from setuptools import setup

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
    name='datesuninfo',
    version='0.1.0',
    packages=['datesuninfo'],
    url='https://github.com/okzach/datesuninfo/',
    license='MIT',
    author='Zach Adams',
    author_email='zach@okzach.com',
    description='Mimics PHPs date_sun_info() using pyephem.',
    entry_points={
        'console_scripts': [
            'datesuninfo=datesuninfo:main'
        ]
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5'
    ],
    setup_requires=[]+pytest_runner,
    tests_require=['pytest']
)
<commit_msg>dependencies<commit_after>import sys

from setuptools import setup

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
    name='datesuninfo',
    version='0.1.0',
    packages=['datesuninfo'],
    url='https://github.com/okzach/datesuninfo/',
    license='MIT',
    author='Zach Adams',
    author_email='zach@okzach.com',
    description='Mimics PHPs date_sun_info() using pyephem.',
    entry_points={
        'console_scripts': [
            'datesuninfo=datesuninfo:main'
        ]
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5'
    ],
    install_requires=[
        'ephem>=3.7.6.0',
        'pytz>=2016.3'
    ],
    setup_requires=[]+pytest_runner,
    tests_require=['pytest']
)
<|endoftext|>


<commit_before>"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['area/gui.py']
NAME = "Area"
VERSION = "0.1.1"
DESC = "A simple two-player round-based tactics game"
LONG_DESC = "Two players occupy board area by changing their field's color. The player who captured more than half the board wins."
DATA_FILES = []
OPTIONS =	{
         		'argv_emulation': True,
                'iconfile': 'img/icon.icns',
                'plist':
                {
                    'CFBundleName': NAME,
                    'CFBundleDisplayName': NAME,
                    'CFBundleVersion': VERSION,
                    'CFBundleShortVersionString': VERSION,
                }
            }

setup(
	name=NAME,
    app=APP,
    version=VERSION,
    description=DESC,
    long_description=LONG_DESC,
    author="frickler01",
    maintainer="frickler01",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: MIT License',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2.7',
        'Topic :: Games/Entertainment'
        ],
    license='MIT License',
    platform='POSIX',
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)
<commit_msg>bump to 0.2.0<commit_after>"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['area/gui.py']
NAME = "Area"
VERSION = "0.2.0"
DESC = "A simple two-player round-based tactics game"
LONG_DESC = "Two players occupy board area by changing their field's color. The player who captured more than half the board wins."
DATA_FILES = []
OPTIONS =	{
         		'argv_emulation': True,
                'iconfile': 'img/icon.icns',
                'plist':
                {
                    'CFBundleName': NAME,
                    'CFBundleDisplayName': NAME,
                    'CFBundleVersion': VERSION,
                    'CFBundleShortVersionString': VERSION,
                }
            }

setup(
	name=NAME,
    app=APP,
    version=VERSION,
    description=DESC,
    long_description=LONG_DESC,
    author="frickler01",
    maintainer="frickler01",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: MIT License',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2.7',
        'Topic :: Games/Entertainment'
        ],
    license='MIT License',
    platform='POSIX',
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)
<|endoftext|>


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

# Utility function to read README.md file
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(name="django-membersuite-auth",
      version="1.3.2",
      description="Django Authentication By MemberSuite",
      author=("Association for the Advancement of Sustainability in "
              "Higher Education"),
      author_email="webdev@aashe.org",
      url="https://github.com/AASHE/django-membersuite-auth",
      long_description=read("README.md"),
      packages=[
          "django_membersuite_auth",
          "django_membersuite_auth.migrations"
      ],
      classifiers=[
          "Environment :: Web Environment",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: BSD License",
          "Operating System :: OS Independent",
          "Programming Language :: Python :: 2.7",
          "Programming Language :: Python :: 3.5",
          "Framework :: Django"
      ],
      include_package_data=True,
      install_requires=["django",
                        "future",
                        "membersuite-api-client"]
)  # noqa what's visual indentation?
<commit_msg>Pull latest membersuite-api-client package<commit_after>#!/usr/bin/env python
from setuptools import setup
import os

# Utility function to read README.md file
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(name="django-membersuite-auth",
      version="1.3.2",
      description="Django Authentication By MemberSuite",
      author=("Association for the Advancement of Sustainability in "
              "Higher Education"),
      author_email="webdev@aashe.org",
      url="https://github.com/AASHE/django-membersuite-auth",
      long_description=read("README.md"),
      packages=[
          "django_membersuite_auth",
          "django_membersuite_auth.migrations"
      ],
      classifiers=[
          "Environment :: Web Environment",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: BSD License",
          "Operating System :: OS Independent",
          "Programming Language :: Python :: 2.7",
          "Programming Language :: Python :: 3.5",
          "Framework :: Django"
      ],
      include_package_data=True,
      install_requires=["django",
                        "future",
                        "membersuite-api-client>=0.1.17"],
      dependency_links=[
          "http://github.com/AASHE/python-membersuite-api-client/archive/"
          "master.zip#egg=package-0.1.17"]
)  # noqa what's visual indentation?
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

DESCRIPTION = 'Asset manager for Django: Boost your website!'
LONG_DESCRIPTION = None
try:
    LONG_DESCRIPTION = open('README.rst').read()
except:
    pass

setup(name='django-mediagenerator',
      version='1.9.1',
      packages=find_packages(exclude=('tests', 'tests.*',
                                      'base_project', 'base_project.*')),
      package_data={'mediagenerator.filters': ['pyjslibs/*.py']},
      author='Waldemar Kornewald',
      author_email='wkornewald@gmail.com',
      url='http://www.allbuttonspressed.com/projects/django-mediagenerator',
      description=DESCRIPTION,
      long_description=LONG_DESCRIPTION,
      platforms=['any'],
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Web Environment',
          'Framework :: Django',
          'Intended Audience :: Developers',
          'Operating System :: OS Independent',
          'Programming Language :: Python',
          'Topic :: Software Development :: Libraries :: Application Frameworks',
          'Topic :: Software Development :: Libraries :: Python Modules',
          'License :: OSI Approved :: BSD License',
      ],
)
<commit_msg>let's not overdo it :)<commit_after>from setuptools import setup, find_packages

DESCRIPTION = 'Asset manager for Django: Boost your website'
LONG_DESCRIPTION = None
try:
    LONG_DESCRIPTION = open('README.rst').read()
except:
    pass

setup(name='django-mediagenerator',
      version='1.9.1',
      packages=find_packages(exclude=('tests', 'tests.*',
                                      'base_project', 'base_project.*')),
      package_data={'mediagenerator.filters': ['pyjslibs/*.py']},
      author='Waldemar Kornewald',
      author_email='wkornewald@gmail.com',
      url='http://www.allbuttonspressed.com/projects/django-mediagenerator',
      description=DESCRIPTION,
      long_description=LONG_DESCRIPTION,
      platforms=['any'],
      classifiers=[
          'Development Status :: 5 - Production/Stable',
          'Environment :: Web Environment',
          'Framework :: Django',
          'Intended Audience :: Developers',
          'Operating System :: OS Independent',
          'Programming Language :: Python',
          'Topic :: Software Development :: Libraries :: Application Frameworks',
          'Topic :: Software Development :: Libraries :: Python Modules',
          'License :: OSI Approved :: BSD License',
      ],
)
<|endoftext|>


<commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import os
import sys
import subprocess
import json

# import in-house packages
thisDir = os.path.dirname(os.path.realpath(__file__)).replace('\\','/')
sys.path.append(os.path.join(thisDir, 'user_data/scripts'))

import lazy

SYNC_SRC = thisDir
SYNC_DST = os.path.expanduser('~').replace('\\','/')
IGNORE = [ '.git', '.DS_Store', '.gitignore', 'setup.py', 'README.md', 'LICENSE', 'TODO', 'install.json' ]

def _input(msg):
    return input(msg) if sys.version_info[0] >= 3 else raw_input(msg)

def confirmUser():
    print('>>> WARNING: This may overwrite existing files in your home directory!')
    while True:
        answer = _input('>>> Are you sure (y/n)? ').lower()
        if (answer == 'y') or (answer == 'n'):
            break
        print('>>> Invalid input, please respond with "y" or "n"')
    return True if answer == 'y' else False

def install():
    content = json.load(open(os.path.join(thisDir, 'install.json'), 'r'))
    lazy.run(content, {'sync_src' : SYNC_SRC, 'sync_dst' : SYNC_DST, 'ignoreList' : ' '.join(IGNORE)})

print('+------------------------------------------+')
print('|            .dotfiles Setup               |')
print('+------------------------------------------+')
if (confirmUser()):
    install()
    print('\nSetup complete, please restart your shell for the applied changes to take effect.')
else:
    print('Installation canceled.')

<commit_msg>update setup.py to use submodule lazy<commit_after>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import os
import sys
import subprocess
import json

thisDir = os.path.dirname(os.path.realpath(__file__)).replace('\\','/')

# try to import LAZY (https://www.github.com/thyu/lazy)
try:
    sys.path.append(os.path.join(thisDir))
    import lazy
except:
    print('Error: Cannot import lazy submodule, please make sure you have the submodule cloned successfully.')
    exit()

SYNC_SRC = thisDir
SYNC_DST = os.path.expanduser('~').replace('\\','/')
IGNORE = [ '.git', '.DS_Store', '.gitignore', 'setup.py', 'README.md', 'LICENSE', 'TODO', 'install.json' ]

def _input(msg):
    return input(msg) if sys.version_info[0] >= 3 else raw_input(msg)

def confirmUser():
    print('>>> WARNING: This may overwrite existing files in your home directory!')
    while True:
        answer = _input('>>> Are you sure (y/n)? ').lower()
        if (answer == 'y') or (answer == 'n'):
            break
        print('>>> Invalid input, please respond with "y" or "n"')
    return True if answer == 'y' else False

def install():
    content = json.load(open(os.path.join(thisDir, 'install.json'), 'r'))
    lazy.run(content, {'sync_src' : SYNC_SRC, 'sync_dst' : SYNC_DST, 'ignoreList' : ' '.join(IGNORE)})

print('+------------------------------------------+')
print('|            .dotfiles Setup               |')
print('+------------------------------------------+')
if (confirmUser()):
    install()
    print('\nSetup complete, please restart your shell for the applied changes to take effect.')
else:
    print('Installation canceled.')

<|endoftext|>


<commit_before>import setuptools

if __name__ == "__main__":
    setuptools.setup(
        name='bse_scratch',
        version="0.1.0",
        description='The Quantum Chemistry Basis Set Exchange',
        author='The Molecular Sciences Software Institute',
        author_email='bpp4@vt.edu',
        url="https://github.com/bennybp/bse-scratch",
        license='BSD-3C',
        packages=setuptools.find_packages(),
        install_requires=[
            'jsonschema',
        ],
        extras_require={
            'docs': [
                'sphinx==1.2.3',  # autodoc was broken in 1.3.1
                'sphinxcontrib-napoleon',
                'sphinx_rtd_theme',
                'numpydoc',
            ],
            'tests': [
                'pytest',
                'pytest-cov',
                'pytest-pep8',
            ],
        },

        tests_require=[
            'pytest',
            'pytest-cov',
            'pytest-pep8',
        ],

        classifiers=[
            'Development Status :: 4 - Beta',
            'Intended Audience :: Science/Research',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3',
        ],
        zip_safe=True,
    )
<commit_msg>Update setup.py<commit_after>import setuptools

if __name__ == "__main__":
    setuptools.setup(
        name='basis_set_exchange',
        version="0.1.0",
        description='The Quantum Chemistry Basis Set Exchange',
        author='The Molecular Sciences Software Institute',
        author_email='bpp4@vt.edu',
        url="https://github.com/MolSSI/basis_set_exchange",
        license='BSD-3C',
        packages=setuptools.find_packages(),
        install_requires=[
            'jsonschema',
        ],
        extras_require={
            'docs': [
                'sphinx==1.2.3',  # autodoc was broken in 1.3.1
                'sphinxcontrib-napoleon',
                'sphinx_rtd_theme',
                'numpydoc',
            ],
            'tests': [
                'pytest',
                'pytest-cov',
                'pytest-pep8',
            ],
        },

        tests_require=[
            'pytest',
            'pytest-cov',
            'pytest-pep8',
        ],

        classifiers=[
            'Development Status :: 4 - Beta',
            'Intended Audience :: Science/Research',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3',
        ],
        zip_safe=True,
    )
<|endoftext|>


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

from distutils.core import setup
from distutils.cmd import Command
from distutils import sysconfig
import os
import sys
import subprocess
import glob
from Cython.Build import cythonize

#from PyFin import __version__

PACKAGE = "PyFin"
NAME = "Finance-Python"
DESCRIPTION = "PyFin 0.3.4"
AUTHOR = "cheng li"
AUTHOR_EMAIL = "wegamekinglc@hotmail.com"
URL = 'https://code.csdn.net/wegamekinglc/finance-python'
DOWNLOAD_URL = 'https://code.csdn.net/wegamekinglc/finance-python/tree/0.3.1'
VERSION = "0.3.4"

if os.name == "posix":
    exePath = sys.path
    for path in exePath:
        if path.endswith('site-packages'):
            packagePath = path
            break
else:
    packagePath = sysconfig.get_python_lib()

files = glob.glob("PyFin/tests/Math/Accumulators/data/*.csv")
datafiles = [(os.path.join(packagePath, "PyFin/tests/Math/Accumulators/data"), files)]

def git_version():
    from subprocess import Popen, PIPE
    gitproc = Popen(['git', 'rev-parse','HEAD'], stdout = PIPE)
    (stdout, _) = gitproc.communicate()
    return stdout.strip()

class test(Command):
    description = "test the distribution prior to install"

    user_options = [
        ('test-dir=', None,
         "directory that contains the test definitions"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        if sys.platform == 'win32':
            command = "coverage run PyFin/tests/testSuite.py& coverage report& coverage html"
        else:
            command = "coverage run PyFin/tests/testSuite.py; coverage report; coverage html"
        subprocess.Popen(command, shell=True)

class version_build(Command):

    description = "test the distribution prior to install"

    user_options = [
        ('test-dir=', None,
         "directory that contains the test definitions"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        git_ver = git_version()[:10]
        configFile = 'PyFin/__init__.py'

        file_handle = open(configFile, 'r')
        lines = file_handle.readlines()
        newFiles = []
        for line in lines:
            if line.startswith('__version__'):
                line = line.split('+')[0].rstrip()
                line = line + " + \"-" + git_ver + "\"\n"
            newFiles.append(line)
        file_handle.close()
        os.remove(configFile)
        file_handle = open(configFile, 'w')
        file_handle.writelines(newFiles)
        file_handle.close()

setup(
    name=NAME,
    version=VERSION,
    description=DESCRIPTION,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    url=URL,
    download_url=DOWNLOAD_URL,
    packages=['PyFin.API',
              'PyFin.AlgoTrading',
              'PyFin.DateUtilities',
              'PyFin.Enums',
              'PyFin.Env',
              'PyFin.Math',
              'PyFin.Math.Accumulators',
              'PyFin.Math.Distributions',
              'PyFin.Math.Timeseries',
              'PyFin.Patterns',
              'PyFin.PricingEngines',
              'PyFin.Analysis',
              'PyFin.Analysis.DataProviders',
              'PyFin.Analysis.TechnicalAnalysis',
              'PyFin.Utilities',
              'PyFin.tests',
              'PyFin.tests.API',
              'PyFin.tests.DateUtilities',
              'PyFin.tests.Env',
              'PyFin.tests.Math',
              'PyFin.tests.Math.Accumulators',
              'PyFin.tests.Math.Distributions',
              'PyFin.tests.Math.Timeseries',
              'PyFin.tests.Analysis',
              'PyFin.tests.Analysis.DataProviders',
              'PyFin.tests.Analysis.TechnicalAnalysis',
              'PyFin.tests.PricingEngines'],
    py_modules=['PyFin.__init__', 'PyFin.tests.testSuite'],
    data_files=datafiles,
    classifiers=[],
    cmdclass={"test": test,
              "version_build": version_build},
    ext_modules=cythonize("PyFin/Math/ErrorFunction.pyx"),
)
<commit_msg>remove some unused codes<commit_after># -*- coding: utf-8 -*-

from distutils.core import setup
from distutils.cmd import Command
from distutils import sysconfig
import os
import sys
import subprocess
import glob
from Cython.Build import cythonize

PACKAGE = "PyFin"
NAME = "Finance-Python"
DESCRIPTION = "PyFin 0.3.4"
AUTHOR = "cheng li"
AUTHOR_EMAIL = "wegamekinglc@hotmail.com"
URL = 'https://code.csdn.net/wegamekinglc/finance-python'
DOWNLOAD_URL = 'https://code.csdn.net/wegamekinglc/finance-python/tree/0.3.1'
VERSION = "0.3.4"

if os.name == "posix":
    exePath = sys.path
    for path in exePath:
        if path.endswith('site-packages'):
            packagePath = path
            break
else:
    packagePath = sysconfig.get_python_lib()

files = glob.glob("PyFin/tests/Math/Accumulators/data/*.csv")
datafiles = [(os.path.join(packagePath, "PyFin/tests/Math/Accumulators/data"), files)]

def git_version():
    from subprocess import Popen, PIPE
    gitproc = Popen(['git', 'rev-parse','HEAD'], stdout = PIPE)
    (stdout, _) = gitproc.communicate()
    return stdout.strip()

class test(Command):
    description = "test the distribution prior to install"

    user_options = [
        ('test-dir=', None,
         "directory that contains the test definitions"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        if sys.platform == 'win32':
            command = "coverage run PyFin/tests/testSuite.py& coverage report& coverage html"
        else:
            command = "coverage run PyFin/tests/testSuite.py; coverage report; coverage html"
        subprocess.Popen(command, shell=True)

class version_build(Command):

    description = "test the distribution prior to install"

    user_options = [
        ('test-dir=', None,
         "directory that contains the test definitions"),
    ]

    def initialize_options(self):
        pass

    def finalize_options(self):
        pass

    def run(self):
        git_ver = git_version()[:10]
        configFile = 'PyFin/__init__.py'

        file_handle = open(configFile, 'r')
        lines = file_handle.readlines()
        newFiles = []
        for line in lines:
            if line.startswith('__version__'):
                line = line.split('+')[0].rstrip()
                line = line + " + \"-" + git_ver + "\"\n"
            newFiles.append(line)
        file_handle.close()
        os.remove(configFile)
        file_handle = open(configFile, 'w')
        file_handle.writelines(newFiles)
        file_handle.close()

setup(
    name=NAME,
    version=VERSION,
    description=DESCRIPTION,
    author=AUTHOR,
    author_email=AUTHOR_EMAIL,
    url=URL,
    download_url=DOWNLOAD_URL,
    packages=['PyFin.API',
              'PyFin.AlgoTrading',
              'PyFin.DateUtilities',
              'PyFin.Enums',
              'PyFin.Env',
              'PyFin.Math',
              'PyFin.Math.Accumulators',
              'PyFin.Math.Distributions',
              'PyFin.Math.Timeseries',
              'PyFin.Patterns',
              'PyFin.PricingEngines',
              'PyFin.Analysis',
              'PyFin.Analysis.DataProviders',
              'PyFin.Analysis.TechnicalAnalysis',
              'PyFin.Utilities',
              'PyFin.tests',
              'PyFin.tests.API',
              'PyFin.tests.DateUtilities',
              'PyFin.tests.Env',
              'PyFin.tests.Math',
              'PyFin.tests.Math.Accumulators',
              'PyFin.tests.Math.Distributions',
              'PyFin.tests.Math.Timeseries',
              'PyFin.tests.Analysis',
              'PyFin.tests.Analysis.DataProviders',
              'PyFin.tests.Analysis.TechnicalAnalysis',
              'PyFin.tests.PricingEngines'],
    py_modules=['PyFin.__init__', 'PyFin.tests.testSuite'],
    data_files=datafiles,
    classifiers=[],
    cmdclass={"test": test,
              "version_build": version_build},
    ext_modules=cythonize("PyFin/Math/ErrorFunction.pyx"),
)
<|endoftext|>


<commit_before>import os
from setuptools import setup
from siteblocks import VERSION

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

setup(
    name='django-siteblocks',
    version='.'.join(map(str, VERSION)),
    url='http://github.com/idlesign/django-siteblocks',

    description='Reusable application for Django introducing URL-dependent static and dynamic data blocks',
    long_description=readme,
    license='BSD 3-Clause License',

    author='Igor `idle sign` Starikov',
    author_email='idlesign@yandex.ru',

    packages=['siteblocks'],
    include_package_data=True,
    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',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'License :: OSI Approved :: BSD License'
    ],
)
<commit_msg>Py3.6 listed<commit_after>import os
from setuptools import setup
from siteblocks import VERSION

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

setup(
    name='django-siteblocks',
    version='.'.join(map(str, VERSION)),
    url='http://github.com/idlesign/django-siteblocks',

    description='Reusable application for Django introducing URL-dependent static and dynamic data blocks',
    long_description=readme,
    license='BSD 3-Clause License',

    author='Igor `idle sign` Starikov',
    author_email='idlesign@yandex.ru',

    packages=['siteblocks'],
    include_package_data=True,
    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',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'License :: OSI Approved :: BSD License'
    ],
)
<|endoftext|>


<commit_before>import codecs
try:
    from setuptools import setup, find_packages
    extra_setup = dict(
        install_requires=['pyyaml'],
    )
except ImportError:
    from distutils.core import setup
    extra_setup = {}

setup(
    name='sphinx-autoapi',
    version='0.1.0',
    author='Eric Holscher',
    author_email='eric@ericholscher.com',
    url='http://github.com/ericholscher/sphinx-autoapi',
    license='BSD',
    description='',
    package_dir={'': '.'},
    packages=find_packages('.'),
    long_description=codecs.open("README.rst", "r", "utf-8").read(),
    # trying to add files...
    include_package_data=True,
    package_data={
        '': ['_static/*.js', '_static/*.js_t', '_static/*.css'],
    },
    **extra_setup
)
<commit_msg>Add requirements to setup<commit_after>import codecs
try:
    from setuptools import setup, find_packages
    extra_setup = dict(
        install_requires=[
            'PyYAML',
            'epyparse',
            'epydoc',
        ],
    )
except ImportError:
    from distutils.core import setup
    extra_setup = dict(
        requires=[
            'PyYAML',
            'epyparse',
            'epydoc',
        ],
    )

setup(
    name='sphinx-autoapi',
    version='0.1.0',
    author='Eric Holscher',
    author_email='eric@ericholscher.com',
    url='http://github.com/ericholscher/sphinx-autoapi',
    license='BSD',
    description='',
    package_dir={'': '.'},
    packages=find_packages('.'),
    long_description=codecs.open("README.rst", "r", "utf-8").read(),
    # trying to add files...
    include_package_data=True,
    package_data={
        '': ['_static/*.js', '_static/*.js_t', '_static/*.css'],
    },
    **extra_setup
)
<|endoftext|>


<commit_before>
import os
import sys

from distutils.command.build import build
from distutils.command.build_py import build_py
from setuptools import setup, Command

version_info = {
    'name': 'ovirt-shell',
    'version': '3.6.5.0',
    'description': 'A command-line interface to oVirt Virtualization',
    'author': 'Michael Pasternak',
    'author_email': 'mpastern@redhat.com',
    'url': 'http://www.ovirt.org/wiki/CLI',
    'license': 'ASL2',
    'classifiers': [
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.4' ],
}

class custom_build_py(build_py):
    """
    This custom build implementation is needed in order to generate
    the parsing and lexing tables used by ply during buildtime, so
    that it won't attempt to generate them during runtime.
    """
    def run(self):
        build_py.run(self)
        if not self.dry_run:
            self.generate_parsing_tables()

    def generate_parsing_tables(self):
        """
        Generates the parsing tables used by ply.
        """
        print("generating parsing tables")
        old_path = sys.path
        try:
            sys.path = [self.build_lib] + sys.path
            import cli.parser
            parser = cli.parser.Parser()
            parser._write_tables()
        finally:
            sys.path = old_path

setup(
    package_dir={ '': 'src' },
    packages=[ 'ovirtcli', 'ovirtcli.command', 'ovirtcli.format',
                 'ovirtcli.platform', 'ovirtcli.platform.posix',
                 'ovirtcli.platform.windows', 'ovirtcli.shell', 'ovirtcli.utils', 'cli',
                 'cli.command', 'cli.platform', 'cli.platform.posix', 'ovirtcli.infrastructure',
                 'ovirtcli.annotations', 'ovirtcli.events', 'ovirtcli.listeners', 'ovirtcli.meta',
                 'ovirtcli.state'],
    install_requires=[ 'ovirt-engine-sdk-python >= 4.0.0.0preview0', 'ply >= 3.3', 'kitchen >= 1' ],
    entry_points={ 'console_scripts': [ 'ovirt-shell = ovirtcli.main:main' ] },
    cmdclass={
        "build_py": custom_build_py,
    },
    **version_info
)
<commit_msg>cli: Fix SDK dependency<commit_after>
import os
import sys

from distutils.command.build import build
from distutils.command.build_py import build_py
from setuptools import setup, Command

version_info = {
    'name': 'ovirt-shell',
    'version': '3.6.5.0',
    'description': 'A command-line interface to oVirt Virtualization',
    'author': 'Michael Pasternak',
    'author_email': 'mpastern@redhat.com',
    'url': 'http://www.ovirt.org/wiki/CLI',
    'license': 'ASL2',
    'classifiers': [
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.4' ],
}

class custom_build_py(build_py):
    """
    This custom build implementation is needed in order to generate
    the parsing and lexing tables used by ply during buildtime, so
    that it won't attempt to generate them during runtime.
    """
    def run(self):
        build_py.run(self)
        if not self.dry_run:
            self.generate_parsing_tables()

    def generate_parsing_tables(self):
        """
        Generates the parsing tables used by ply.
        """
        print("generating parsing tables")
        old_path = sys.path
        try:
            sys.path = [self.build_lib] + sys.path
            import cli.parser
            parser = cli.parser.Parser()
            parser._write_tables()
        finally:
            sys.path = old_path

setup(
    package_dir={ '': 'src' },
    packages=[ 'ovirtcli', 'ovirtcli.command', 'ovirtcli.format',
                 'ovirtcli.platform', 'ovirtcli.platform.posix',
                 'ovirtcli.platform.windows', 'ovirtcli.shell', 'ovirtcli.utils', 'cli',
                 'cli.command', 'cli.platform', 'cli.platform.posix', 'ovirtcli.infrastructure',
                 'ovirtcli.annotations', 'ovirtcli.events', 'ovirtcli.listeners', 'ovirtcli.meta',
                 'ovirtcli.state'],
    install_requires=[ 'ovirt-engine-sdk-python >= 3.6.7.0, < 4.0.0.0a0', 'ply >= 3.3', 'kitchen >= 1' ],
    entry_points={ 'console_scripts': [ 'ovirt-shell = ovirtcli.main:main' ] },
    cmdclass={
        "build_py": custom_build_py,
    },
    **version_info
)
<|endoftext|>


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

setup(
    name='CaseInsensitiveDict',
    version='1.0.0',
    description='Case insensitive dictionary',
    long_description='Case insensitive dictionary supporting nested structures',
    url='https://github.com/tivvit/python-case-insensitive-dict',
    author='Vit Listik',
    author_email='tivvit@seznam.cz',
    license='MIT',
    classifiers=[
        'Development Status :: 5 - Production/Stable',

        'Intended Audience :: Developers',
        'Topic :: Software Development :: Data structures',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: pypy',
    ],
    keywords='dict dictionary case-insensitive',
    packages=["CaseInsensitiveDict"],
)<commit_msg>changed topic<commit_after>#!/usr/bin/env python
#  -*- coding: utf-8 -*-
from setuptools import setup

setup(
    name='CaseInsensitiveDict',
    version='1.0.0',
    description='Case insensitive dictionary',
    long_description='Case insensitive dictionary supporting nested structures',
    url='https://github.com/tivvit/python-case-insensitive-dict',
    author='Vit Listik',
    author_email='tivvit@seznam.cz',
    license='MIT',
    classifiers=[
        'Development Status :: 5 - Production/Stable',

        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: pypy',
    ],
    keywords='dict dictionary case-insensitive',
    packages=["CaseInsensitiveDict"],
)<|endoftext|>