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

import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

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

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

setup(name='polyaxon-schemas',
      version='0.2.9',
      description='Schema definitions and validation for Polyaxon.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mouradmourafiq@gmail.com',
      author='Mourad Mourafiq',
      author_email='mouradmourafiq@gmail.com',
      url='https://github.com/polyaxon/polyaxon-schemas',
      license='MIT',
      platforms='any',
      packages=find_packages(),
      keywords=[
          'polyaxon',
          'tensorFlow',
          'deep-learning',
          'machine-learning',
          'data-science',
          'neural-networks',
          'artificial-intelligence',
          'ai',
          'reinforcement-learning',
          'kubernetes',
      ],
      install_requires=[
          'hestia==0.1.1',
          'Jinja2==2.10',
          'marshmallow==2.16.1',
          'numpy==1.15.2',
          'python-dateutil==2.7.3',
          'pytz==2018.5',
          'rhea==0.4.0'
      ],
      classifiers=[
          'Programming Language :: Python',
          'Operating System :: OS Independent',
          'Intended Audience :: Developers',
          'Intended Audience :: Science/Research',
          'Topic :: Scientific/Engineering :: Artificial Intelligence'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<commit_msg>Update email<commit_after>#!/usr/bin/env python

import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

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

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

setup(name='polyaxon-schemas',
      version='0.2.9',
      description='Schema definitions and validation for Polyaxon.',
      maintainer='Mourad Mourafiq',
      maintainer_email='mourad@polyaxon.com',
      author='Mourad Mourafiq',
      author_email='mourad@polyaxon.com',
      url='https://github.com/polyaxon/polyaxon-schemas',
      license='MIT',
      platforms='any',
      packages=find_packages(),
      keywords=[
          'polyaxon',
          'tensorFlow',
          'deep-learning',
          'machine-learning',
          'data-science',
          'neural-networks',
          'artificial-intelligence',
          'ai',
          'reinforcement-learning',
          'kubernetes',
      ],
      install_requires=[
          'hestia==0.1.1',
          'Jinja2==2.10',
          'marshmallow==2.16.1',
          'numpy==1.15.2',
          'python-dateutil==2.7.3',
          'pytz==2018.5',
          'rhea==0.4.0'
      ],
      classifiers=[
          'Programming Language :: Python',
          'Operating System :: OS Independent',
          'Intended Audience :: Developers',
          'Intended Audience :: Science/Research',
          'Topic :: Scientific/Engineering :: Artificial Intelligence'
      ],
      tests_require=['pytest'],
      cmdclass={'test': PyTest})
<|endoftext|>


<commit_before>from setuptools import setup
__version__ = '0.8.1'

setup(
    name = 'simpleeval',
    py_modules = ['simpleeval'],
    version = __version__,
    description = 'A simple, safe single expression evaluator library.',
    long_description=open('README.rst','r').read(),
    author = 'Daniel Fairhead',
    author_email = 'danthedeckie@gmail.com',
    url = 'https://github.com/danthedeckie/simpleeval',
    download_url = 'https://github.com/danthedeckie/simpleeval/tarball/' + __version__,
    keywords = ['eval', 'simple', 'expression', 'parse', 'ast'],
    test_suite = 'test_simpleeval',
    use_2to3 = True,
    classifiers = ['Development Status :: 4 - Beta',
                   'Intended Audience :: Developers',
                   'License :: OSI Approved :: MIT License',
                   'Topic :: Software Development :: Libraries :: Python Modules',
                   'Programming Language :: Python',
                  ],
    )
<commit_msg>Indicate support for python 3 in classifiers<commit_after>from setuptools import setup
__version__ = '0.8.1'

setup(
    name = 'simpleeval',
    py_modules = ['simpleeval'],
    version = __version__,
    description = 'A simple, safe single expression evaluator library.',
    long_description=open('README.rst','r').read(),
    author = 'Daniel Fairhead',
    author_email = 'danthedeckie@gmail.com',
    url = 'https://github.com/danthedeckie/simpleeval',
    download_url = 'https://github.com/danthedeckie/simpleeval/tarball/' + __version__,
    keywords = ['eval', 'simple', 'expression', 'parse', 'ast'],
    test_suite = 'test_simpleeval',
    use_2to3 = True,
    classifiers = ['Development Status :: 4 - Beta',
                   'Intended Audience :: Developers',
                   'License :: OSI Approved :: MIT License',
                   'Topic :: Software Development :: Libraries :: Python Modules',
                   'Programming Language :: Python :: 2',
                   'Programming Language :: Python :: 3',
                  ],
    )
<|endoftext|>


<commit_before>from setuptools import setup
import f3

setup(
    name='f3',
    version='1.0.4',
    license='MIT',
    long_description=open('README.rst').read(),
    author='Ben Montet',
    author_email='bmontet@uchicago.edu',
    packages=[
        'f3',
    ],
    include_package_data=True,
    url='http://github.com/benmontet/f3',
    description='Photometry for Kepler Full Frame Images',
    package_data={'': ['README.rst', 'LICENSE']},
    install_requires=[
          'mahotas', 'kplr'
      ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
    ],
)
<commit_msg>Avoid installing kplr via pip<commit_after>from setuptools import setup
import f3

setup(
    name='f3',
    version='1.0.4',
    license='MIT',
    long_description=open('README.rst').read(),
    author='Ben Montet',
    author_email='bmontet@uchicago.edu',
    packages=[
        'f3',
    ],
    include_package_data=True,
    url='http://github.com/benmontet/f3',
    description='Photometry for Kepler Full Frame Images',
    package_data={'': ['README.rst', 'LICENSE']},
    install_requires=[
          'mahotas',
      ],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
    ],
)
<|endoftext|>


<commit_before>"""
SQLAlchemy-Norm
---------------

Normalize SQLAlchemy Object to Plain dict and list
"""
from setuptools import setup

setup(
    name='SQLAlchemy-Norm',
    version='0.0.1',
    url='https://github.com/haruair/sqlalchemy-norm',
    license='BSD',
    author='Edward Kim',
    author_email='onward.edkim@gmail.com',
    description=(
        'Normalize SQLAlchemy Object to Plain dict and list'
    ),
    packages=['sqlalchemy_norm'],
    platforms='any',
    install_requires=[
        'SQLAlchemy>=0.9'
    ],
    setup_requires=[
        'pytest-runner'
    ],
    tests_require=[
        'pytest'
    ],
    classifiers=[
        'Environment :: Web Environment',
        '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',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)

<commit_msg>Bump version 0.0.2<commit_after>"""
SQLAlchemy-Norm
---------------

Normalize SQLAlchemy Object to Plain dict and list
"""
from setuptools import setup

setup(
    name='SQLAlchemy-Norm',
    version='0.0.2',
    url='https://github.com/haruair/sqlalchemy-norm',
    license='BSD',
    author='Edward Kim',
    author_email='onward.edkim@gmail.com',
    description=(
        'Normalize SQLAlchemy Object to Plain dict and list'
    ),
    packages=['sqlalchemy_norm'],
    platforms='any',
    install_requires=[
        'SQLAlchemy>=0.9'
    ],
    setup_requires=[
        'pytest-runner'
    ],
    tests_require=[
        'pytest'
    ],
    classifiers=[
        'Environment :: Web Environment',
        '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',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)

<|endoftext|>


<commit_before>"""
The setup package to install SeleniumBase dependencies and plugins
"""

import os
from setuptools import setup, find_packages  # noqa

setup(
    name='seleniumbase',
    version='1.3.13',
    description='Test Automation Framework - seleniumbase.com',
    long_description='Automation Framework for Simple & Reliable Web Testing',
    platforms='Mac * Windows * Linux * Docker',
    url='http://seleniumbase.com',
    author='Michael Mintz',
    author_email='@mintzworld',
    maintainer='Michael Mintz',
    license='The MIT License',
    install_requires=[
        'pip>=9.0.1',
        'setuptools>=35.0.1',
        'ipython==5.3.0',
        'selenium==3.4.0',
        'nose>=1.3.7',
        'pytest>=3.0.7',
        'six>=1.10.0',
        'flake8>=3.3.0',
        'requests>=2.13.0',
        'urllib3>=1.20',
        'BeautifulSoup>=3.2.1',
        'unittest2>=1.1.0',
        'chardet>=3.0.2',
        'boto>=2.46.1',
        'ipdb==0.10.2',
        'pyvirtualdisplay>=0.2.1',
        ],
    packages=['seleniumbase',
              'seleniumbase.core',
              'seleniumbase.plugins',
              'seleniumbase.fixtures',
              'seleniumbase.masterqa',
              'seleniumbase.common',
              'seleniumbase.config'],
    entry_points={
        'nose.plugins': [
            'base_plugin = seleniumbase.plugins.base_plugin:Base',
            'selenium = seleniumbase.plugins.selenium_plugin:SeleniumBrowser',
            'page_source = seleniumbase.plugins.page_source:PageSource',
            'screen_shots = seleniumbase.plugins.screen_shots:ScreenShots',
            'test_info = seleniumbase.plugins.basic_test_info:BasicTestInfo',
            ('db_reporting = '
             'seleniumbase.plugins.db_reporting_plugin:DBReporting'),
            's3_logging = seleniumbase.plugins.s3_logging_plugin:S3Logging',
            ('hipchat_reporting = seleniumbase.plugins'
             '.hipchat_reporting_plugin:HipchatReporting'),
            ]
        }
    )

print(os.system("cat seleniumbase.egg-info/PKG-INFO"))
print("\n*** SeleniumBase Installation Complete! ***\n")
<commit_msg>Version 1.3.14<commit_after>"""
The setup package to install SeleniumBase dependencies and plugins
"""

import os
from setuptools import setup, find_packages  # noqa

setup(
    name='seleniumbase',
    version='1.3.14',
    description='Test Automation Framework - seleniumbase.com',
    long_description='Automation Framework for Simple & Reliable Web Testing',
    platforms='Mac * Windows * Linux * Docker',
    url='http://seleniumbase.com',
    author='Michael Mintz',
    author_email='@mintzworld',
    maintainer='Michael Mintz',
    license='The MIT License',
    install_requires=[
        'pip>=9.0.1',
        'setuptools>=35.0.1',
        'ipython==5.3.0',
        'selenium==3.4.0',
        'nose>=1.3.7',
        'pytest>=3.0.7',
        'six>=1.10.0',
        'flake8>=3.3.0',
        'requests>=2.13.0',
        'urllib3>=1.20',
        'BeautifulSoup>=3.2.1',
        'unittest2>=1.1.0',
        'chardet>=3.0.2',
        'boto>=2.46.1',
        'ipdb==0.10.2',
        'pyvirtualdisplay>=0.2.1',
        ],
    packages=['seleniumbase',
              'seleniumbase.core',
              'seleniumbase.plugins',
              'seleniumbase.fixtures',
              'seleniumbase.masterqa',
              'seleniumbase.common',
              'seleniumbase.config'],
    entry_points={
        'nose.plugins': [
            'base_plugin = seleniumbase.plugins.base_plugin:Base',
            'selenium = seleniumbase.plugins.selenium_plugin:SeleniumBrowser',
            'page_source = seleniumbase.plugins.page_source:PageSource',
            'screen_shots = seleniumbase.plugins.screen_shots:ScreenShots',
            'test_info = seleniumbase.plugins.basic_test_info:BasicTestInfo',
            ('db_reporting = '
             'seleniumbase.plugins.db_reporting_plugin:DBReporting'),
            's3_logging = seleniumbase.plugins.s3_logging_plugin:S3Logging',
            ('hipchat_reporting = seleniumbase.plugins'
             '.hipchat_reporting_plugin:HipchatReporting'),
            ]
        }
    )

print(os.system("cat seleniumbase.egg-info/PKG-INFO"))
print("\n*** SeleniumBase Installation Complete! ***\n")
<|endoftext|>


<commit_before>import re
from setuptools import setup, find_packages

INSTALL_REQUIRES = ("marshmallow>=2.15.2",)
EXTRAS_REQUIRE = {
    "tests": ["pytest", "mock", "faker==4.0.2", "Flask==1.1.2"],
    "lint": ["flake8==3.7.9", "flake8-bugbear==20.1.4", "pre-commit~=2.0"],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]

def find_version(fname):
    """Attempts to find the version number in the file names fname.
    Raises RuntimeError if not found.
    """
    version = ""
    with open(fname, "r") as fp:
        reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
        for line in fp:
            m = reg.match(line)
            if m:
                version = m.group(1)
                break
    if not version:
        raise RuntimeError("Cannot find version information")
    return version

def read(fname):
    with open(fname) as fp:
        content = fp.read()
    return content

setup(
    name="marshmallow-jsonapi",
    version=find_version("marshmallow_jsonapi/__init__.py"),
    description="JSON API 1.0 (https://jsonapi.org) formatting with marshmallow",
    long_description=read("README.rst"),
    author="Steven Loria",
    author_email="sloria1@gmail.com",
    url="https://github.com/marshmallow-code/marshmallow-jsonapi",
    packages=find_packages(exclude=("test*",)),
    package_dir={"marshmallow-jsonapi": "marshmallow-jsonapi"},
    include_package_data=True,
    install_requires=INSTALL_REQUIRES,
    extras_require=EXTRAS_REQUIRE,
    python_requires=">=3.6",
    license="MIT",
    zip_safe=False,
    keywords=(
        "marshmallow-jsonapi marshmallow marshalling serialization "
        "jsonapi deserialization validation"
    ),
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    test_suite="tests",
    project_urls={
        "Bug Reports": "https://github.com/marshmallow-code/marshmallow-jsonapi/issues",
        "Funding": "https://opencollective.com/marshmallow",
    },
)
<commit_msg>Bump faker from 4.0.2 to 4.0.3<commit_after>import re
from setuptools import setup, find_packages

INSTALL_REQUIRES = ("marshmallow>=2.15.2",)
EXTRAS_REQUIRE = {
    "tests": ["pytest", "mock", "faker==4.0.3", "Flask==1.1.2"],
    "lint": ["flake8==3.7.9", "flake8-bugbear==20.1.4", "pre-commit~=2.0"],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]

def find_version(fname):
    """Attempts to find the version number in the file names fname.
    Raises RuntimeError if not found.
    """
    version = ""
    with open(fname, "r") as fp:
        reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
        for line in fp:
            m = reg.match(line)
            if m:
                version = m.group(1)
                break
    if not version:
        raise RuntimeError("Cannot find version information")
    return version

def read(fname):
    with open(fname) as fp:
        content = fp.read()
    return content

setup(
    name="marshmallow-jsonapi",
    version=find_version("marshmallow_jsonapi/__init__.py"),
    description="JSON API 1.0 (https://jsonapi.org) formatting with marshmallow",
    long_description=read("README.rst"),
    author="Steven Loria",
    author_email="sloria1@gmail.com",
    url="https://github.com/marshmallow-code/marshmallow-jsonapi",
    packages=find_packages(exclude=("test*",)),
    package_dir={"marshmallow-jsonapi": "marshmallow-jsonapi"},
    include_package_data=True,
    install_requires=INSTALL_REQUIRES,
    extras_require=EXTRAS_REQUIRE,
    python_requires=">=3.6",
    license="MIT",
    zip_safe=False,
    keywords=(
        "marshmallow-jsonapi marshmallow marshalling serialization "
        "jsonapi deserialization validation"
    ),
    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    test_suite="tests",
    project_urls={
        "Bug Reports": "https://github.com/marshmallow-code/marshmallow-jsonapi/issues",
        "Funding": "https://opencollective.com/marshmallow",
    },
)
<|endoftext|>


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

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

extra = {}
if sys.version_info >= (3,):
    extra['use_2to3'] = True

setup(name='mockito',
      version='0.5.3',
      packages=['mockito', 'mockito_test', 'mockito_util'],
      url='https://github.com/kaste/mockito-python',
      maintainer='herr.kaste',
      maintainer_email='herr.kaste@gmail.com',
      license='MIT',
      description='Spying framework',
      long_description='Mockito is a spying framework based on the Java '
                       'library with the same name.',
      classifiers=[
          'Development Status :: 4 - Beta',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Topic :: Software Development :: Testing',
          'Programming Language :: Python :: 2',
          'Programming Language :: Python :: 3'
      ],
      test_suite='nose.collector',
      py_modules=['distribute_setup'],
      setup_requires=['nose'],
      **extra)

<commit_msg>Cleanup setup.py<commit_after>#!/usr/bin/env python
# coding: utf-8

from setuptools import setup
import sys

extra = {}
if sys.version_info >= (3,):
    extra['use_2to3'] = True

setup(name='mockito',
      version='0.5.3',
      packages=['mockito', 'mockito_test', 'mockito_util'],
      url='https://github.com/kaste/mockito-python',
      maintainer='herr.kaste',
      maintainer_email='herr.kaste@gmail.com',
      license='MIT',
      description='Spying framework',
      long_description='Mockito is a spying framework based on the Java '
                       'library with the same name.',
      classifiers=[
          'Development Status :: 4 - Beta',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: MIT License',
          'Topic :: Software Development :: Testing',
          'Programming Language :: Python :: 2',
          'Programming Language :: Python :: 3'
      ],
      test_suite='nose.collector',
      py_modules=['distribute_setup'],
      setup_requires=['nose'],
      **extra)

<|endoftext|>


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

config = {
    'name': 'pybomb',
    'description': 'Client for the Giant Bomb API',
    'version': '0.1.2',
    'long_description_markdown_filename': 'README.md',
    'license': "MIT",
    'author': 'Steve Hutchins',
    'author_email': 'hutchinsteve@gmail.com',
    'url': 'https://github.com/steveYeah/PyBomb',
    'download_url': 'https://github.com/steveYeah/PyBomb/archive/v0.1.2.tar.gz',
    'keywords': ['giant', 'bomb', 'game', 'api', 'client'],
    'packages': ['pybomb', 'pybomb.clients'],
    'install_requires': [
        'nose',
        'requests',
        'setuptools-markdown'
    ]
}

setup(**config)
<commit_msg>Add pandoc to install_requires<commit_after>try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

config = {
    'name': 'pybomb',
    'description': 'Client for the Giant Bomb API',
    'version': '0.1.2',
    'long_description_markdown_filename': 'README.md',
    'license': "MIT",
    'author': 'Steve Hutchins',
    'author_email': 'hutchinsteve@gmail.com',
    'url': 'https://github.com/steveYeah/PyBomb',
    'download_url': 'https://github.com/steveYeah/PyBomb/archive/v0.1.2.tar.gz',
    'keywords': ['giant', 'bomb', 'game', 'api', 'client'],
    'packages': ['pybomb', 'pybomb.clients'],
    'install_requires': [
        'nose',
        'requests',
        'pandoc',
        'setuptools-markdown',
    ]
}

setup(**config)
<|endoftext|>


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

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

import 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="syweb",
    version="0.0.1",
    packages=find_packages(exclude=["tests", "tests.*"]),
    description="Matrix Angular Sdk",
    include_package_data=True,
    long_description=read("README.rst"),
    entry_points=""""""
)
<commit_msg>Mark syweb as not being zip safe so that bundled files are accessible from the filesystem<commit_after>#!/usr/bin/env python

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

import 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="syweb",
    version="0.0.1",
    packages=find_packages(exclude=["tests", "tests.*"]),
    description="Matrix Angular Sdk",
    include_package_data=True,
    zip_safe=False,
    long_description=read("README.rst"),
    entry_points=""""""
)
<|endoftext|>


<commit_before>from distutils.core import setup
from setuptools import find_packages
try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
    long_description = open('README.md').read()
setup(
  name = 'cartoview',
  packages = find_packages(),
  version = '1.1.18',
  description = 'Cartoview is a GIS web mapping application framework to easily share and deploy apps based on Geonode',
  long_description=long_description,
  author = 'Cartologic',
  author_email = 'info@cartologic.com',
  url = 'https://github.com/cartologic/cartoview',
  include_package_data=True,
  keywords = ['cartoview', 'gis', 'geonode', "django", "web mapping", "applications", "apps", "application management"],
  classifiers = [
    "Development Status :: 3 - Alpha",
    "Framework :: Django :: 1.8",
    "Topic :: Scientific/Engineering :: GIS"
  ],
  license="BSD",
  install_requires= []
)
<commit_msg>version 1.1.19<commit_after>from distutils.core import setup
from setuptools import find_packages
try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
    long_description = open('README.md').read()
setup(
  name = 'cartoview',
  packages = find_packages(),
  version = '1.1.19',
  description = 'Cartoview is a GIS web mapping application framework to easily share and deploy apps based on Geonode',
  long_description=long_description,
  author = 'Cartologic',
  author_email = 'info@cartologic.com',
  url = 'https://github.com/cartologic/cartoview',
  include_package_data=True,
  keywords = ['cartoview', 'gis', 'geonode', "django", "web mapping", "applications", "apps", "application management"],
  classifiers = [
    "Development Status :: 3 - Alpha",
    "Framework :: Django :: 1.8",
    "Topic :: Scientific/Engineering :: GIS"
  ],
  license="BSD",
  install_requires= []
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

from codecs import open
from os import path
import re

here = path.abspath(path.dirname(__file__))
package_name = 'Space'
version_file = path.join(here, package_name, '_version.py')
with open(version_file, 'rt') as f:
    version_file_line = f.read()
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(version_re, version_file_line, re.M)
if mo:
    version_string = mo.group(1)
else:
    raise RuntimeError('Unable to find version string in %s.' % (version_file,))

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

setup(
    name=package_name,
    version=version_string,

    description='3D space positioning and motion',
    long_description=long_description,

    url='https://github.com/bond-anton/Space',

    author='Anton Bondarenko',
    author_email='bond.anton@gmail.com',

    license='Apache Software License',

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: Apache Software License',
        'Topic :: Scientific/Engineering :: Mathematics',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
    ],

    keywords='3D coordinate Space paths trajectory',

    packages=find_packages(exclude=['demo', 'tests', 'docs', 'contrib']),
    install_requires=['numpy',
                      'Quaternions'],
    dependency_links=['git+https://github.com/bond-anton/Quaternions.git@master#egg=Quaternions'],
    test_suite='nose.collector',
)
<commit_msg>Github link on Quaternions package in requirements.txt. Version 0.2.2<commit_after>from setuptools import setup, find_packages

from codecs import open
from os import path
import re

here = path.abspath(path.dirname(__file__))
package_name = 'Space'
version_file = path.join(here, package_name, '_version.py')
with open(version_file, 'rt') as f:
    version_file_line = f.read()
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(version_re, version_file_line, re.M)
if mo:
    version_string = mo.group(1)
else:
    raise RuntimeError('Unable to find version string in %s.' % (version_file,))

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

setup(
    name=package_name,
    version=version_string,

    description='3D space positioning and motion',
    long_description=long_description,

    url='https://github.com/bond-anton/Space',

    author='Anton Bondarenko',
    author_email='bond.anton@gmail.com',

    license='Apache Software License',

    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Education',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: Apache Software License',
        'Topic :: Scientific/Engineering :: Mathematics',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],

    keywords='3D coordinate Space paths trajectory',

    packages=find_packages(exclude=['demo', 'tests', 'docs', 'contrib']),
    install_requires=['numpy',
                      'Quaternions'],
    dependency_links=['git+https://github.com/bond-anton/Quaternions.git@master#egg=Quaternions'],
    test_suite='nose.collector',
)
<|endoftext|>


<commit_before># Copyright (c) 2008-2014 Simplistix Ltd, 2015-2019 Chris Withers
# See license.txt for license details.

import os

from setuptools import setup, find_packages

name = 'testfixtures'
base_dir = os.path.dirname(__file__)

optional = [
    'mock;python_version<"3"',
    'zope.component',
    'django<2;python_version<"3"',
    'django;python_version>="3"',
    'twisted'
]

setup(
    name=name,
    version=open(os.path.join(base_dir, name, 'version.txt')).read().strip(),
    author='Chris Withers',
    author_email='chris@simplistix.co.uk',
    license='MIT',
    description=("A collection of helpers and mock objects "
                 "for unit tests and doc tests."),
    long_description=open(os.path.join(base_dir, 'README.rst')).read(),
    url='https://github.com/Simplistix/testfixtures',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
    ],
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    extras_require=dict(
        test=['pytest>=3.6',
              'pytest-cov',
              'pytest-django',
              'sybil',
              ]+optional,
        docs=['sphinx']+optional,
        build=['setuptools-git', 'wheel', 'twine']
    )
)
<commit_msg>sybil also referenced in docs<commit_after># Copyright (c) 2008-2014 Simplistix Ltd, 2015-2019 Chris Withers
# See license.txt for license details.

import os

from setuptools import setup, find_packages

name = 'testfixtures'
base_dir = os.path.dirname(__file__)

optional = [
    'mock;python_version<"3"',
    'zope.component',
    'django<2;python_version<"3"',
    'django;python_version>="3"',
    'sybil',
    'twisted'
]

setup(
    name=name,
    version=open(os.path.join(base_dir, name, 'version.txt')).read().strip(),
    author='Chris Withers',
    author_email='chris@simplistix.co.uk',
    license='MIT',
    description=("A collection of helpers and mock objects "
                 "for unit tests and doc tests."),
    long_description=open(os.path.join(base_dir, 'README.rst')).read(),
    url='https://github.com/Simplistix/testfixtures',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
    ],
    packages=find_packages(),
    zip_safe=False,
    include_package_data=True,
    extras_require=dict(
        test=['pytest>=3.6',
              'pytest-cov',
              'pytest-django',
              ]+optional,
        docs=['sphinx']+optional,
        build=['setuptools-git', 'wheel', 'twine']
    )
)
<|endoftext|>


<commit_before>from setuptools import setup, find_packages

version = '0.1.3b3'

requires = [
    'setuptools>=2.2',
    'eduid-userdb>=0.0.5',
]

# Flavours
webapp_requires = [
    'pysaml2 >= 1.2.0beta2',  # version sync with dashboard to avoid pip catastrophies
    'redis >= 2.10.5',
    'pwgen==0.4',
    'vccs_client>=0.4.1',
]
webapp_extras = webapp_requires + []

test_requires = [
    'mock==1.0.1',
]
testing_extras = test_requires + webapp_extras + []

long_description = open('README.txt').read()

setup(name='eduid-common',
      version=version,
      description="Common code for eduID applications",
      long_description=long_description,
      classifiers=[
        "Programming Language :: Python",
        ],
      keywords='',
      author='NORDUnet A/S',
      author_email='',
      url='https://github.com/SUNET/',
      license='gpl',
      packages=find_packages('src'),
      package_dir={'': 'src'},
      namespace_packages=['eduid_common'],
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      tests_require=test_requires,
      extras_require={
          'testing': testing_extras,
          'webapp': webapp_extras,
      },
      entry_points="""
      """,
      )
<commit_msg>version 0.1.3b4<commit_after>from setuptools import setup, find_packages

version = '0.1.3b4'

requires = [
    'setuptools>=2.2',
    'eduid-userdb>=0.0.5',
]

# Flavours
webapp_requires = [
    'pysaml2 >= 1.2.0beta2',  # version sync with dashboard to avoid pip catastrophies
    'redis >= 2.10.5',
    'pwgen==0.4',
    'vccs_client>=0.4.1',
]
webapp_extras = webapp_requires + []

test_requires = [
    'mock==1.0.1',
]
testing_extras = test_requires + webapp_extras + []

long_description = open('README.txt').read()

setup(name='eduid-common',
      version=version,
      description="Common code for eduID applications",
      long_description=long_description,
      classifiers=[
        "Programming Language :: Python",
        ],
      keywords='',
      author='NORDUnet A/S',
      author_email='',
      url='https://github.com/SUNET/',
      license='gpl',
      packages=find_packages('src'),
      package_dir={'': 'src'},
      namespace_packages=['eduid_common'],
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      tests_require=test_requires,
      extras_require={
          'testing': testing_extras,
          'webapp': webapp_extras,
      },
      entry_points="""
      """,
      )
<|endoftext|>


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

import os.path
import pathlib
import platform
import shutil
import subprocess
import textwrap

from distutils import extension as distutils_extension
from distutils.command import build as distutils_build
from distutils.command import build_ext as distutils_build_ext

import setuptools
from setuptools.command import develop as setuptools_develop

RUNTIME_DEPS = [
    'asyncpg~=0.19.0',
    'click~=6.7',
    'httptools>=0.0.13',
    'immutables>=0.9',
    'parsing~=1.6.1',
    'prompt_toolkit>=2.0.0',
    'psutil~=5.6.1',
    'Pygments~=2.3.0',
    'setproctitle~=1.1.10',
    'setuptools_scm~=3.2.0',
    'typing_inspect~=0.5.0',
    'uvloop~=0.14.0rc2',

    'graphql-core~=2.2.1',
    'promise~=2.2.0',

    'edgedb>=0.7.0a1',
]

CYTHON_DEPENDENCY = 'Cython==0.29.13'

DOCS_DEPS = [
    'Sphinx~=2.0.0',
    'lxml~=4.2.5',
    'sphinxcontrib-asyncio~=0.2.0',
]

BUILD_DEPS = [
    CYTHON_DEPENDENCY,
]

EXTRA_DEPS = {
    'test': [
        'black~=19.3b0',
        'flake8~=3.7.5',
        'flake8-bugbear~=19.8.0',
        'mypy~=0.740',
        'pycodestyle~=2.5.0',
        'coverage~=4.5.2',
        'requests-xml~=0.2.3',
        'lxml',
        'requests-xml',
    ] + DOCS_DEPS,

    'docs': DOCS_DEPS,
}

EXT_CFLAGS = ['-O2']
EXT_LDFLAGS = []

if platform.uname().system != 'Windows':
    EXT_CFLAGS.extend([
        '-std=c99', '-fsigned-char', '-Wall', '-Wsign-compare', '-Wconversion'
    ])

def _compile_parsers(build_lib, inplace=False):
    import parsing

    import edb.edgeql.parser.grammar.single as edgeql_spec
    import edb.edgeql.parser.grammar.block as edgeql_spec2
    import edb.edgeql.parser.grammar.sdldocument as schema_spec

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

    for spec in (edgeql_spec, edgeql_spec2, schema_spec):
        spec_path = pathlib.Path(spec.__file__).parent
        subpath = pathlib.Path(str(spec_path)[len(str(base_path)) + 1:])
        pickle_name = spec.__name__.rpartition('.')[2] + '.pickle'
        pickle_path = subpath / pickle_name
        cache = build_lib / pickle_path
        cache.parent.mkdir(parents=True, exist_ok=True)
        parsing.Spec(spec, pickleFile=str(cache), verbose=True)
        if inplace:
            shutil.copy2(cache, base_path / pickle_path)

def _compile_build_meta(build_lib, version, pg_config, runstatedir):
    import pkg_resources
    from edb.server import buildmeta

    parsed_version = buildmeta.parse_version(
        pkg_resources.parse_version(version))

    vertuple = list(parsed_version._asdict().values())
    vertuple[2] = int(vertuple[2])
    vertuple = tuple(vertuple)

    content = textwrap.dedent('''\
        #
        # This source file is part of the EdgeDB open source project.
        #
        # Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
        #
        # Licensed under the Apache License, Version 2.0 (the "License");
        #
        # THIS FILE HAS BEEN AUTOMATICALLY GENERATED.
        #

        PG_CONFIG_PATH = {pg_config!r}
        RUNSTATE_DIR = {runstatedir!r}
        VERSION = {version!r}
    ''').format(version=vertuple, pg_config=pg_config, runstatedir=runstatedir)

    directory = build_lib / 'edb' / 'server'
    if not directory.exists():
        directory.mkdir(parents=True)

    with open(directory / '_buildmeta.py', 'w+t') as f:
        f.write(content)

def _compile_postgres(build_base, *,
                      force_build=False, fresh_build=True,
                      run_configure=True, build_contrib=True):

    proc = subprocess.run(
        ['git', 'submodule', 'status', 'postgres'],
        stdout=subprocess.PIPE, universal_newlines=True, check=True)
    status = proc.stdout
    if status[0] == '-':
        print(
            'postgres submodule not initialized, '
            'run `git submodule init; git submodule update`')
        exit(1)

    proc = subprocess.run(
        ['git', 'submodule', 'status', 'postgres'],
        stdout=subprocess.PIPE, universal_newlines=True, check=True)
    revision, _, _ = proc.stdout[1:].partition(' ')
    source_stamp = proc.stdout[0] + revision

    postgres_build = (build_base / 'postgres').resolve()
    postgres_src = (pathlib.Path(__file__).parent / 'postgres').resolve()
    postgres_build_stamp = postgres_build / 'stamp'

    if postgres_build_stamp.exists():
        with open(postgres_build_stamp, 'r') as f:
            build_stamp = f.read()
    else:
        build_stamp = None

    is_outdated = source_stamp != build_stamp

    if is_outdated or force_build:
        system = platform.system()
        if system == 'Darwin':
            uuidlib = 'e2fs'
        elif system == 'Linux':
            uuidlib = 'e2fs'
        else:
            raise NotImplementedError('unsupported system: {}'.format(system))

        if fresh_build and postgres_build.exists():
            shutil.rmtree(postgres_build)
        build_dir = postgres_build / 'build'
        if not build_dir.exists():
            build_dir.mkdir(parents=True)

        if run_configure or fresh_build or is_outdated:
            subprocess.run([
                str(postgres_src / 'configure'),
                '--prefix=' + str(postgres_build / 'install'),
                '--with-uuid=' + uuidlib,
            ], check=True, cwd=str(build_dir))

        subprocess.run(
            ['make', 'MAKELEVEL=0', '-j', str(max(os.cpu_count() - 1, 1))],
            cwd=str(build_dir), check=True)

        if build_contrib or fresh_build or is_outdated:
            subprocess.run(
                [
                    'make', '-C', 'contrib', 'MAKELEVEL=0', '-j',
                    str(max(os.cpu_count() - 1, 1))
                ],
                cwd=str(build_dir), check=True)

        subprocess.run(
            ['make', 'MAKELEVEL=0', 'install'],
            cwd=str(build_dir), check=True)

        if build_contrib or fresh_build or is_outdated:
            subprocess.run(
                ['make', '-C', 'contrib', 'MAKELEVEL=0', 'install'],
                cwd=str(build_dir), check=True)

        with open(postgres_build_stamp, 'w') as f:
            f.write(source_stamp)

class build(distutils_build.build):

    user_options = distutils_build.build.user_options + [
        ('pg-config=', None, 'path to pg_config to use with this build'),
        ('runstatedir=', None, 'directory to use for the runtime state'),
    ]

    def initialize_options(self):
        super().initialize_options()
        self.pg_config = None
        self.runstatedir = None

    def finalize_options(self):
        super().finalize_options()

    def run(self, *args, **kwargs):
        super().run(*args, **kwargs)
        build_lib = pathlib.Path(self.build_lib)
        _compile_parsers(build_lib)
        if self.pg_config:
            _compile_build_meta(
                build_lib,
                self.distribution.metadata.version,
                self.pg_config,
                self.runstatedir,
            )

class develop(setuptools_develop.develop):

    def run(self, *args, **kwargs):
        _compile_parsers(pathlib.Path('build/lib'), inplace=True)
        _compile_postgres(pathlib.Path('build').resolve())

        scripts = self.distribution.entry_points['console_scripts']
        patched_scripts = [s + '_dev' for s in scripts]
        patched_scripts.append('edb = edb.tools.edb:edbcommands')
        self.distribution.entry_points['console_scripts'] = patched_scripts

        super().run(*args, **kwargs)

class build_postgres(setuptools.Command):

    description = "build postgres"

    user_options = [
        ('configure', None, 'run ./configure'),
        ('build-contrib', None, 'build contrib'),
        ('fresh-build', None, 'rebuild from scratch'),
    ]

    def initialize_options(self):
        self.configure = False
        self.build_contrib = False
        self.fresh_build = False

    def finalize_options(self):
        pass

    def run(self, *args, **kwargs):
        _compile_postgres(
            pathlib.Path('build').resolve(),
            force_build=True,
            fresh_build=self.fresh_build,
            run_configure=self.configure,
            build_contrib=self.build_contrib)

class build_ext(distutils_build_ext.build_ext):

    user_options = distutils_build_ext.build_ext.user_options + [
        ('cython-annotate', None,
            'Produce a colorized HTML version of the Cython source.'),
        ('cython-directives=', None,
            'Cython compiler directives'),
    ]

    def initialize_options(self):
        # initialize_options() may be called multiple times on the
        # same command object, so make sure not to override previously
        # set options.
        if getattr(self, '_initialized', False):
            return

        super(build_ext, self).initialize_options()

        if os.environ.get('EDGEDB_DEBUG'):
            self.cython_always = True
            self.cython_annotate = True
            self.cython_directives = "linetrace=True"
            self.define = 'PG_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL'
            self.debug = True
        else:
            self.cython_always = False
            self.cython_annotate = None
            self.cython_directives = None
            self.debug = False

    def finalize_options(self):
        # finalize_options() may be called multiple times on the
        # same command object, so make sure not to override previously
        # set options.
        if getattr(self, '_initialized', False):
            return

        import pkg_resources

        # Double check Cython presence in case setup_requires
        # didn't go into effect (most likely because someone
        # imported Cython before setup_requires injected the
        # correct egg into sys.path.
        try:
            import Cython
        except ImportError:
            raise RuntimeError(
                'please install {} to compile edgedb from source'.format(
                    CYTHON_DEPENDENCY))

        cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
        if Cython.__version__ not in cython_dep:
            raise RuntimeError(
                'edgedb requires {}, got Cython=={}'.format(
                    CYTHON_DEPENDENCY, Cython.__version__
                ))

        from Cython.Build import cythonize

        directives = {
            'language_level': '3'
        }

        if self.cython_directives:
            for directive in self.cython_directives.split(','):
                k, _, v = directive.partition('=')
                if v.lower() == 'false':
                    v = False
                if v.lower() == 'true':
                    v = True

                directives[k] = v

        self.distribution.ext_modules[:] = cythonize(
            self.distribution.ext_modules,
            compiler_directives=directives,
            annotate=self.cython_annotate,
            include_path=["edb/server/pgproto/"])

        super(build_ext, self).finalize_options()

setuptools.setup(
    setup_requires=RUNTIME_DEPS + BUILD_DEPS,
    use_scm_version=True,
    name='edgedb-server',
    description='EdgeDB Server',
    author='MagicStack Inc.',
    author_email='hello@magic.io',
    packages=['edb'],
    include_package_data=True,
    cmdclass={
        'build': build,
        'build_ext': build_ext,
        'develop': develop,
        'build_postgres': build_postgres,
    },
    entry_points={
        'console_scripts': [
            'edgedb = edb.cli:cli',
            'edgedb-server = edb.server.main:main',
        ]
    },
    ext_modules=[
        distutils_extension.Extension(
            "edb.server.pgproto.pgproto",
            ["edb/server/pgproto/pgproto.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.dbview.dbview",
            ["edb/server/dbview/dbview.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.mng_port.edgecon",
            ["edb/server/mng_port/edgecon.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.cache.stmt_cache",
            ["edb/server/cache/stmt_cache.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.pgcon.pgcon",
            ["edb/server/pgcon/pgcon.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http.http",
            ["edb/server/http/http.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http_edgeql_port.protocol",
            ["edb/server/http_edgeql_port/protocol.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http_graphql_port.protocol",
            ["edb/server/http_graphql_port/protocol.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),
    ],
    install_requires=RUNTIME_DEPS,
    extras_require=EXTRA_DEPS,
    test_suite='tests.suite',
)
<commit_msg>Remove duplicate dependency from setup.py<commit_after>#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import os.path
import pathlib
import platform
import shutil
import subprocess
import textwrap

from distutils import extension as distutils_extension
from distutils.command import build as distutils_build
from distutils.command import build_ext as distutils_build_ext

import setuptools
from setuptools.command import develop as setuptools_develop

RUNTIME_DEPS = [
    'asyncpg~=0.19.0',
    'click~=6.7',
    'httptools>=0.0.13',
    'immutables>=0.9',
    'parsing~=1.6.1',
    'prompt_toolkit>=2.0.0',
    'psutil~=5.6.1',
    'Pygments~=2.3.0',
    'setproctitle~=1.1.10',
    'setuptools_scm~=3.2.0',
    'typing_inspect~=0.5.0',
    'uvloop~=0.14.0rc2',

    'graphql-core~=2.2.1',
    'promise~=2.2.0',

    'edgedb>=0.7.0a1',
]

CYTHON_DEPENDENCY = 'Cython==0.29.13'

DOCS_DEPS = [
    'Sphinx~=2.0.0',
    'lxml~=4.2.5',
    'sphinxcontrib-asyncio~=0.2.0',
]

BUILD_DEPS = [
    CYTHON_DEPENDENCY,
]

EXTRA_DEPS = {
    'test': [
        'black~=19.3b0',
        'flake8~=3.7.5',
        'flake8-bugbear~=19.8.0',
        'mypy~=0.740',
        'pycodestyle~=2.5.0',
        'coverage~=4.5.2',
        'requests-xml~=0.2.3',
        'lxml',
    ] + DOCS_DEPS,

    'docs': DOCS_DEPS,
}

EXT_CFLAGS = ['-O2']
EXT_LDFLAGS = []

if platform.uname().system != 'Windows':
    EXT_CFLAGS.extend([
        '-std=c99', '-fsigned-char', '-Wall', '-Wsign-compare', '-Wconversion'
    ])

def _compile_parsers(build_lib, inplace=False):
    import parsing

    import edb.edgeql.parser.grammar.single as edgeql_spec
    import edb.edgeql.parser.grammar.block as edgeql_spec2
    import edb.edgeql.parser.grammar.sdldocument as schema_spec

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

    for spec in (edgeql_spec, edgeql_spec2, schema_spec):
        spec_path = pathlib.Path(spec.__file__).parent
        subpath = pathlib.Path(str(spec_path)[len(str(base_path)) + 1:])
        pickle_name = spec.__name__.rpartition('.')[2] + '.pickle'
        pickle_path = subpath / pickle_name
        cache = build_lib / pickle_path
        cache.parent.mkdir(parents=True, exist_ok=True)
        parsing.Spec(spec, pickleFile=str(cache), verbose=True)
        if inplace:
            shutil.copy2(cache, base_path / pickle_path)

def _compile_build_meta(build_lib, version, pg_config, runstatedir):
    import pkg_resources
    from edb.server import buildmeta

    parsed_version = buildmeta.parse_version(
        pkg_resources.parse_version(version))

    vertuple = list(parsed_version._asdict().values())
    vertuple[2] = int(vertuple[2])
    vertuple = tuple(vertuple)

    content = textwrap.dedent('''\
        #
        # This source file is part of the EdgeDB open source project.
        #
        # Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
        #
        # Licensed under the Apache License, Version 2.0 (the "License");
        #
        # THIS FILE HAS BEEN AUTOMATICALLY GENERATED.
        #

        PG_CONFIG_PATH = {pg_config!r}
        RUNSTATE_DIR = {runstatedir!r}
        VERSION = {version!r}
    ''').format(version=vertuple, pg_config=pg_config, runstatedir=runstatedir)

    directory = build_lib / 'edb' / 'server'
    if not directory.exists():
        directory.mkdir(parents=True)

    with open(directory / '_buildmeta.py', 'w+t') as f:
        f.write(content)

def _compile_postgres(build_base, *,
                      force_build=False, fresh_build=True,
                      run_configure=True, build_contrib=True):

    proc = subprocess.run(
        ['git', 'submodule', 'status', 'postgres'],
        stdout=subprocess.PIPE, universal_newlines=True, check=True)
    status = proc.stdout
    if status[0] == '-':
        print(
            'postgres submodule not initialized, '
            'run `git submodule init; git submodule update`')
        exit(1)

    proc = subprocess.run(
        ['git', 'submodule', 'status', 'postgres'],
        stdout=subprocess.PIPE, universal_newlines=True, check=True)
    revision, _, _ = proc.stdout[1:].partition(' ')
    source_stamp = proc.stdout[0] + revision

    postgres_build = (build_base / 'postgres').resolve()
    postgres_src = (pathlib.Path(__file__).parent / 'postgres').resolve()
    postgres_build_stamp = postgres_build / 'stamp'

    if postgres_build_stamp.exists():
        with open(postgres_build_stamp, 'r') as f:
            build_stamp = f.read()
    else:
        build_stamp = None

    is_outdated = source_stamp != build_stamp

    if is_outdated or force_build:
        system = platform.system()
        if system == 'Darwin':
            uuidlib = 'e2fs'
        elif system == 'Linux':
            uuidlib = 'e2fs'
        else:
            raise NotImplementedError('unsupported system: {}'.format(system))

        if fresh_build and postgres_build.exists():
            shutil.rmtree(postgres_build)
        build_dir = postgres_build / 'build'
        if not build_dir.exists():
            build_dir.mkdir(parents=True)

        if run_configure or fresh_build or is_outdated:
            subprocess.run([
                str(postgres_src / 'configure'),
                '--prefix=' + str(postgres_build / 'install'),
                '--with-uuid=' + uuidlib,
            ], check=True, cwd=str(build_dir))

        subprocess.run(
            ['make', 'MAKELEVEL=0', '-j', str(max(os.cpu_count() - 1, 1))],
            cwd=str(build_dir), check=True)

        if build_contrib or fresh_build or is_outdated:
            subprocess.run(
                [
                    'make', '-C', 'contrib', 'MAKELEVEL=0', '-j',
                    str(max(os.cpu_count() - 1, 1))
                ],
                cwd=str(build_dir), check=True)

        subprocess.run(
            ['make', 'MAKELEVEL=0', 'install'],
            cwd=str(build_dir), check=True)

        if build_contrib or fresh_build or is_outdated:
            subprocess.run(
                ['make', '-C', 'contrib', 'MAKELEVEL=0', 'install'],
                cwd=str(build_dir), check=True)

        with open(postgres_build_stamp, 'w') as f:
            f.write(source_stamp)

class build(distutils_build.build):

    user_options = distutils_build.build.user_options + [
        ('pg-config=', None, 'path to pg_config to use with this build'),
        ('runstatedir=', None, 'directory to use for the runtime state'),
    ]

    def initialize_options(self):
        super().initialize_options()
        self.pg_config = None
        self.runstatedir = None

    def finalize_options(self):
        super().finalize_options()

    def run(self, *args, **kwargs):
        super().run(*args, **kwargs)
        build_lib = pathlib.Path(self.build_lib)
        _compile_parsers(build_lib)
        if self.pg_config:
            _compile_build_meta(
                build_lib,
                self.distribution.metadata.version,
                self.pg_config,
                self.runstatedir,
            )

class develop(setuptools_develop.develop):

    def run(self, *args, **kwargs):
        _compile_parsers(pathlib.Path('build/lib'), inplace=True)
        _compile_postgres(pathlib.Path('build').resolve())

        scripts = self.distribution.entry_points['console_scripts']
        patched_scripts = [s + '_dev' for s in scripts]
        patched_scripts.append('edb = edb.tools.edb:edbcommands')
        self.distribution.entry_points['console_scripts'] = patched_scripts

        super().run(*args, **kwargs)

class build_postgres(setuptools.Command):

    description = "build postgres"

    user_options = [
        ('configure', None, 'run ./configure'),
        ('build-contrib', None, 'build contrib'),
        ('fresh-build', None, 'rebuild from scratch'),
    ]

    def initialize_options(self):
        self.configure = False
        self.build_contrib = False
        self.fresh_build = False

    def finalize_options(self):
        pass

    def run(self, *args, **kwargs):
        _compile_postgres(
            pathlib.Path('build').resolve(),
            force_build=True,
            fresh_build=self.fresh_build,
            run_configure=self.configure,
            build_contrib=self.build_contrib)

class build_ext(distutils_build_ext.build_ext):

    user_options = distutils_build_ext.build_ext.user_options + [
        ('cython-annotate', None,
            'Produce a colorized HTML version of the Cython source.'),
        ('cython-directives=', None,
            'Cython compiler directives'),
    ]

    def initialize_options(self):
        # initialize_options() may be called multiple times on the
        # same command object, so make sure not to override previously
        # set options.
        if getattr(self, '_initialized', False):
            return

        super(build_ext, self).initialize_options()

        if os.environ.get('EDGEDB_DEBUG'):
            self.cython_always = True
            self.cython_annotate = True
            self.cython_directives = "linetrace=True"
            self.define = 'PG_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL'
            self.debug = True
        else:
            self.cython_always = False
            self.cython_annotate = None
            self.cython_directives = None
            self.debug = False

    def finalize_options(self):
        # finalize_options() may be called multiple times on the
        # same command object, so make sure not to override previously
        # set options.
        if getattr(self, '_initialized', False):
            return

        import pkg_resources

        # Double check Cython presence in case setup_requires
        # didn't go into effect (most likely because someone
        # imported Cython before setup_requires injected the
        # correct egg into sys.path.
        try:
            import Cython
        except ImportError:
            raise RuntimeError(
                'please install {} to compile edgedb from source'.format(
                    CYTHON_DEPENDENCY))

        cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
        if Cython.__version__ not in cython_dep:
            raise RuntimeError(
                'edgedb requires {}, got Cython=={}'.format(
                    CYTHON_DEPENDENCY, Cython.__version__
                ))

        from Cython.Build import cythonize

        directives = {
            'language_level': '3'
        }

        if self.cython_directives:
            for directive in self.cython_directives.split(','):
                k, _, v = directive.partition('=')
                if v.lower() == 'false':
                    v = False
                if v.lower() == 'true':
                    v = True

                directives[k] = v

        self.distribution.ext_modules[:] = cythonize(
            self.distribution.ext_modules,
            compiler_directives=directives,
            annotate=self.cython_annotate,
            include_path=["edb/server/pgproto/"])

        super(build_ext, self).finalize_options()

setuptools.setup(
    setup_requires=RUNTIME_DEPS + BUILD_DEPS,
    use_scm_version=True,
    name='edgedb-server',
    description='EdgeDB Server',
    author='MagicStack Inc.',
    author_email='hello@magic.io',
    packages=['edb'],
    include_package_data=True,
    cmdclass={
        'build': build,
        'build_ext': build_ext,
        'develop': develop,
        'build_postgres': build_postgres,
    },
    entry_points={
        'console_scripts': [
            'edgedb = edb.cli:cli',
            'edgedb-server = edb.server.main:main',
        ]
    },
    ext_modules=[
        distutils_extension.Extension(
            "edb.server.pgproto.pgproto",
            ["edb/server/pgproto/pgproto.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.dbview.dbview",
            ["edb/server/dbview/dbview.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.mng_port.edgecon",
            ["edb/server/mng_port/edgecon.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.cache.stmt_cache",
            ["edb/server/cache/stmt_cache.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.pgcon.pgcon",
            ["edb/server/pgcon/pgcon.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http.http",
            ["edb/server/http/http.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http_edgeql_port.protocol",
            ["edb/server/http_edgeql_port/protocol.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),

        distutils_extension.Extension(
            "edb.server.http_graphql_port.protocol",
            ["edb/server/http_graphql_port/protocol.pyx"],
            extra_compile_args=EXT_CFLAGS,
            extra_link_args=EXT_LDFLAGS),
    ],
    install_requires=RUNTIME_DEPS,
    extras_require=EXTRA_DEPS,
    test_suite='tests.suite',
)
<|endoftext|>


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

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

version = django_logutils.__version__

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

setup(
    name='django-logutils',
    version=version,
    description="""Various logging-related utilities for Django projects.""",
    long_description=readme + '\n\n' + history,
    author='Sander Smits',
    author_email='jhmsmits@gmail.com',
    url='https://github.com/jsmits/django-logutils',
    packages=[
        'django_logutils',
    ],
    include_package_data=True,
    install_requires=[
        'django',
        'django-appconf'
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-logutils',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],
)
<commit_msg>Fix supported versions in ``setup.py``.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import django_logutils

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

version = django_logutils.__version__

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

setup(
    name='django-logutils',
    version=version,
    description="""Various logging-related utilities for Django projects.""",
    long_description=readme + '\n\n' + history,
    author='Sander Smits',
    author_email='jhmsmits@gmail.com',
    url='https://github.com/jsmits/django-logutils',
    packages=[
        'django_logutils',
    ],
    include_package_data=True,
    install_requires=[
        'django',
        'django-appconf'
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-logutils',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='pbl',
    version='1.0.0',
    description='A Python library for building playlists'
    author="@plamere",
    author_email="paul@spotify.com",
    url='http://pbl.readthedocs.org/',
    install_requires=['requests>=2.5'],
    install_requires=['pyen>=2.3'],
    install_requires=['spotipy>=2.0'],
    license='LICENSE.txt',
    packages=['pbl'])
<commit_msg>Fixed formatting problem in setup<commit_after>from setuptools import setup

setup(
    name='pbl',
    version='1.0.0',
    description='A Python library for building playlists',
    author="@plamere",
    author_email="paul@spotify.com",
    url='http://pbl.readthedocs.org/',
    install_requires=['requests>=2.5'],
    install_requires=['pyen>=2.3'],
    install_requires=['spotipy>=2.0'],
    license='LICENSE.txt',
    packages=['pbl'])
<|endoftext|>


<commit_before># If true, then the svn revision won't be used to calculate the
# revision (set to True for real releases)
import os
import sys
RELEASE = False

#from ez_setup import use_setuptools
#use_setuptools()

from setuptools import setup #, find_packages

# Get description and __version__ without using import
readme = open("readme_pypi.rst", "rt").read()
g_dict = {}
exec(open("ftpsync/_version.py").read(), g_dict)
version = g_dict["__version__"]

# 'setup.py upload' fails on Vista, because .pypirc is searched on 'HOME' path
if not "HOME" in os.environ and  "HOMEPATH" in os.environ:
    os.environ.setdefault("HOME", os.environ.get("HOMEPATH", ""))
    print("Initializing HOME environment variable to '%s'" % os.environ["HOME"])

install_requires = []
if sys.version_info < (2, 7):
    install_requires += ["argparse"]

setup(name="pyftpsync",
      version = version,
      author = "Martin Wendt",
      author_email = "pyftpsync@wwwendt.de",
      maintainer = "Martin Wendt",
      maintainer_email = "pyftpsync@wwwendt.de",
      url = "http://pyftpsync.googlecode.com/",
      description = "Synchronize folders over FTP.",
      long_description = readme, #+ "\n\n" + changes,

        #Development Status :: 2 - Pre-Alpha
        #Development Status :: 3 - Alpha
        #Development Status :: 4 - Beta
        #Development Status :: 5 - Production/Stable

      classifiers = ["Development Status :: 3 - Alpha",
                     "Environment :: Console",
                     "Intended Audience :: Information Technology",
                     "Intended Audience :: Developers",
                     "License :: OSI Approved :: MIT License",
                     "Operating System :: OS Independent",
                     "Programming Language :: Python :: 2",
                     "Programming Language :: Python :: 3",
                     "Topic :: Software Development :: Libraries :: Python Modules",
                     "Topic :: Utilities",
                     ],
      keywords = "python ftp synchronize tool",
#      platforms=["Unix", "Windows"],
      license = "The MIT License",
      install_requires = install_requires,
#      package_dir = {"": "src"},
      packages = ["ftpsync"],
#      packages = find_packages(exclude=[]),

      py_modules = [
#                    "ez_setup",
                    ],
      # See also MANIFEST.in
#      package_data={"": ["*.txt", "*.html", "*.conf"]},
#      include_package_data = True, # TODO: PP
      zip_safe = False,
      extras_require = {},
      test_suite = "test.test_flow",
      entry_points = {
          "console_scripts" : ["pyftpsync = ftpsync.pyftpsync:run"],
          },
      )
<commit_msg>mad setup.py executable<commit_after>#!/usr/bin/env python
# If true, then the svn revision won't be used to calculate the
# revision (set to True for real releases)
import os
import sys
RELEASE = False

#from ez_setup import use_setuptools
#use_setuptools()

from setuptools import setup #, find_packages

# Get description and __version__ without using import
readme = open("readme_pypi.rst", "rt").read()
g_dict = {}
exec(open("ftpsync/_version.py").read(), g_dict)
version = g_dict["__version__"]

# 'setup.py upload' fails on Vista, because .pypirc is searched on 'HOME' path
if not "HOME" in os.environ and  "HOMEPATH" in os.environ:
    os.environ.setdefault("HOME", os.environ.get("HOMEPATH", ""))
    print("Initializing HOME environment variable to '%s'" % os.environ["HOME"])

install_requires = []
if sys.version_info < (2, 7):
    install_requires += ["argparse"]

setup(name="pyftpsync",
      version = version,
      author = "Martin Wendt",
      author_email = "pyftpsync@wwwendt.de",
      maintainer = "Martin Wendt",
      maintainer_email = "pyftpsync@wwwendt.de",
      url = "http://pyftpsync.googlecode.com/",
      description = "Synchronize folders over FTP.",
      long_description = readme, #+ "\n\n" + changes,

        #Development Status :: 2 - Pre-Alpha
        #Development Status :: 3 - Alpha
        #Development Status :: 4 - Beta
        #Development Status :: 5 - Production/Stable

      classifiers = ["Development Status :: 3 - Alpha",
                     "Environment :: Console",
                     "Intended Audience :: Information Technology",
                     "Intended Audience :: Developers",
                     "License :: OSI Approved :: MIT License",
                     "Operating System :: OS Independent",
                     "Programming Language :: Python :: 2",
                     "Programming Language :: Python :: 3",
                     "Topic :: Software Development :: Libraries :: Python Modules",
                     "Topic :: Utilities",
                     ],
      keywords = "python ftp synchronize tool",
#      platforms=["Unix", "Windows"],
      license = "The MIT License",
      install_requires = install_requires,
#      package_dir = {"": "src"},
      packages = ["ftpsync"],
#      packages = find_packages(exclude=[]),

      py_modules = [
#                    "ez_setup",
                    ],
      # See also MANIFEST.in
#      package_data={"": ["*.txt", "*.html", "*.conf"]},
#      include_package_data = True, # TODO: PP
      zip_safe = False,
      extras_require = {},
      test_suite = "test.test_flow",
      entry_points = {
          "console_scripts" : ["pyftpsync = ftpsync.pyftpsync:run"],
          },
      )
<|endoftext|>


<commit_before>#!/usr/bin/env python
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
import glob
import os
import re
import shutil
import subprocess
import sys

from errno import EEXIST
from os import makedirs
from os.path import abspath, dirname, isdir, join

PROJECT_ROOT = abspath(dirname(__file__))
sys.path.insert(0, PROJECT_ROOT)

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

from distutils.spawn import find_executable
from distutils.command import clean, build
from itertools import chain

def check_call(*args, **kwargs):
    print('Calling %s, %s' % (args, kwargs,))
    subprocess.check_call(*args, **kwargs)

ETO_PIQI_URL = 'https://raw.github.com/smarkets/eto_common/v0.3.0/eto.piqi'
SETO_PIQI_URL = 'https://raw.github.com/smarkets/smk_api_common/v0.7.0/seto.piqi'

def _safe_glob(pathname):
    "Do a safe version of glob which copes with win32"
    is_win32 = sys.platform == 'win32'
    for source in glob.glob(pathname):
        yield source.replace('/', '\\') if is_win32 else source

class SmarketsProtocolBuild(build.build):
    "Class to build the protobuf output"

    description = "build the protocol buffer output with protobuf-compiler"

    def check_executables(self):
        "Check that various executables are available"
        self.curl = find_executable("curl")
        if self.curl is None:
            sys.stderr.write("*** Cannot find curl; is it installed?\n")
            sys.exit(-1)

        self.protoc = find_executable("protoc")
        if self.protoc is None:
            sys.stderr.write("*** Cannot find protoc; is the protobuf compiler"
                             " installed?\n")
            sys.exit(-1)

        self.piqi = find_executable("piqi")
        if self.piqi is None:
            sys.stderr.write("*** Cannot find piqi; are the piqi build tools"
                             " installed?\n")
            sys.exit(-1)

    def run(self):
        "Get the .piqi definitions and run the 'protoc' compiler command"
        self.check_executables()

        eto_piqi = join(PROJECT_ROOT, 'eto.piqi')
        if not os.path.exists(eto_piqi):
            check_call((self.curl, '-o', eto_piqi, ETO_PIQI_URL))

        seto_piqi = join(PROJECT_ROOT, 'seto.piqi')
        if not os.path.exists(seto_piqi):
            check_call((self.curl, '-o', seto_piqi, SETO_PIQI_URL))

        eto_proto = join(PROJECT_ROOT, 'smarkets.eto.piqi.proto')
        if not os.path.exists(eto_proto):
            check_call((self.piqi, 'to-proto', eto_piqi, '-o', eto_proto))

        seto_proto = join(PROJECT_ROOT, 'smarkets.seto.piqi.proto')
        if not os.path.exists(seto_proto):
            check_call((self.piqi, 'to-proto', seto_piqi, '-o', seto_proto))
            self.replace_file(seto_proto, self.fix_import)

        for source in _safe_glob('*.proto'):
            check_call((self.protoc, '--python_out=.', source))

        for pkg_dir in ('eto', 'seto'):
            init_file = join(PROJECT_ROOT, 'smarkets', pkg_dir, '__init__.py')
            initf = open(init_file, 'w')
            initf.write(
""""Protocol-buffers generated package"
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
""")
            initf.close()

        build.build.run(self)

    @staticmethod
    def replace_file(filename, line_map):
        "Map line_map for each line in filename"
        with open(filename, "r") as sources:
            lines = sources.readlines()
        with open(filename, "w") as sources:
            for line in lines:
                sources.write(line_map(line))

    @staticmethod
    def fix_import(line):
        "Fix the import line in smarkets.seto.piqi.proto"
        return re.sub(
            r'import "eto\.piqi\.proto"',
            'import "smarkets.eto.piqi.proto"',
            line)

class SmarketsProtocolClean(clean.clean):
    """Class to clean up the built protobuf files."""

    description = "clean up files generated by protobuf-compiler"

    def run(self):
        """Do the clean up"""
        for src_dir in [
            join('build', 'pb'),
            join('smarkets', 'eto'),
            join('smarkets', 'seto'),
                ]:
            src_dir = join(PROJECT_ROOT, src_dir)
            if os.path.exists(src_dir):
                shutil.rmtree(src_dir)
        for filename in chain(
            _safe_glob('*.proto'),
            _safe_glob('*.piqi')):
            if os.path.exists(filename):
                os.unlink(filename)

        # Call the parent class clean command
        clean.clean.run(self)

readme_path = join(PROJECT_ROOT, 'README.md')

with open(readme_path) as f:
    long_description = f.read()

# this is not ideal but at at least we're not repeating ourselved when updating package version

with open(join(PROJECT_ROOT, 'smarkets', '__init__.py')) as f:
    version_line = [line for line in f if line.startswith('__version__')][0]

__version__ = version_line.split('=')[1].strip().strip("'").strip('"')

# smarkets.eto and smarkets.eto in packages break creating source dists in current setup
# also nasty hack to make it buildable on readthedocs.org
if 'sdist' in sys.argv or 'READTHEDOCS' in os.environ:
    extra_packages = []
else:
    extra_packages = ['smarkets.eto', 'smarkets.seto']

sdict = {
    'name' : 'smk_python_sdk',
    'version' : __version__,
    'description' : 'Python client for Smarkets streaming API',
    'long_description' : long_description,
    'url': 'https://github.com/smarkets/smk_python_sdk',
    'download_url' : 'https://github.com/smarkets/smk_python_sdk/downloads/smk_python_sdk-%s.tar.gz' % __version__,
    'author' : 'Smarkets Limited',
    'author_email' : 'support@smarkets.com',
    'maintainer' : 'Smarkets Limited',
    'maintainer_email' : 'support@smarkets.com',
    'keywords' : ['Smarkets', 'betting exchange'],
    'license' : 'MIT',
    'packages' : ['smarkets'] + extra_packages,
    'test_suite' : 'tests.all_tests',
    'classifiers' : [
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python'],
    'cmdclass' : {
        'build': SmarketsProtocolBuild,
        'clean': SmarketsProtocolClean},
    }

setup(**sdict)
<commit_msg>Make installation require protobuf<commit_after>#!/usr/bin/env python
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
import glob
import os
import re
import shutil
import subprocess
import sys

from os.path import abspath, dirname, join

PROJECT_ROOT = abspath(dirname(__file__))
sys.path.insert(0, PROJECT_ROOT)

from distutils.spawn import find_executable
from distutils.command import clean, build
from setuptools import setup
from itertools import chain

def check_call(*args, **kwargs):
    print('Calling %s, %s' % (args, kwargs,))
    subprocess.check_call(*args, **kwargs)

ETO_PIQI_URL = 'https://raw.github.com/smarkets/eto_common/v0.3.0/eto.piqi'
SETO_PIQI_URL = 'https://raw.github.com/smarkets/smk_api_common/v0.7.0/seto.piqi'

def _safe_glob(pathname):
    "Do a safe version of glob which copes with win32"
    is_win32 = sys.platform == 'win32'
    for source in glob.glob(pathname):
        yield source.replace('/', '\\') if is_win32 else source

class SmarketsProtocolBuild(build.build):
    "Class to build the protobuf output"

    description = "build the protocol buffer output with protobuf-compiler"

    def check_executables(self):
        "Check that various executables are available"
        self.curl = find_executable("curl")
        if self.curl is None:
            sys.stderr.write("*** Cannot find curl; is it installed?\n")
            sys.exit(-1)

        self.protoc = find_executable("protoc")
        if self.protoc is None:
            sys.stderr.write("*** Cannot find protoc; is the protobuf compiler"
                             " installed?\n")
            sys.exit(-1)

        self.piqi = find_executable("piqi")
        if self.piqi is None:
            sys.stderr.write("*** Cannot find piqi; are the piqi build tools"
                             " installed?\n")
            sys.exit(-1)

    def run(self):
        "Get the .piqi definitions and run the 'protoc' compiler command"
        self.check_executables()

        eto_piqi = join(PROJECT_ROOT, 'eto.piqi')
        if not os.path.exists(eto_piqi):
            check_call((self.curl, '-o', eto_piqi, ETO_PIQI_URL))

        seto_piqi = join(PROJECT_ROOT, 'seto.piqi')
        if not os.path.exists(seto_piqi):
            check_call((self.curl, '-o', seto_piqi, SETO_PIQI_URL))

        eto_proto = join(PROJECT_ROOT, 'smarkets.eto.piqi.proto')
        if not os.path.exists(eto_proto):
            check_call((self.piqi, 'to-proto', eto_piqi, '-o', eto_proto))

        seto_proto = join(PROJECT_ROOT, 'smarkets.seto.piqi.proto')
        if not os.path.exists(seto_proto):
            check_call((self.piqi, 'to-proto', seto_piqi, '-o', seto_proto))
            self.replace_file(seto_proto, self.fix_import)

        for source in _safe_glob('*.proto'):
            check_call((self.protoc, '--python_out=.', source))

        for pkg_dir in ('eto', 'seto'):
            init_file = join(PROJECT_ROOT, 'smarkets', pkg_dir, '__init__.py')
            initf = open(init_file, 'w')
            initf.write(
""""Protocol-buffers generated package"
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
""")
            initf.close()

        build.build.run(self)

    @staticmethod
    def replace_file(filename, line_map):
        "Map line_map for each line in filename"
        with open(filename, "r") as sources:
            lines = sources.readlines()
        with open(filename, "w") as sources:
            for line in lines:
                sources.write(line_map(line))

    @staticmethod
    def fix_import(line):
        "Fix the import line in smarkets.seto.piqi.proto"
        return re.sub(
            r'import "eto\.piqi\.proto"',
            'import "smarkets.eto.piqi.proto"',
            line)

class SmarketsProtocolClean(clean.clean):
    """Class to clean up the built protobuf files."""

    description = "clean up files generated by protobuf-compiler"

    def run(self):
        """Do the clean up"""
        for src_dir in [
            join('build', 'pb'),
            join('smarkets', 'eto'),
            join('smarkets', 'seto'),
                ]:
            src_dir = join(PROJECT_ROOT, src_dir)
            if os.path.exists(src_dir):
                shutil.rmtree(src_dir)
        for filename in chain(
            _safe_glob('*.proto'),
            _safe_glob('*.piqi')):
            if os.path.exists(filename):
                os.unlink(filename)

        # Call the parent class clean command
        clean.clean.run(self)

readme_path = join(PROJECT_ROOT, 'README.md')

with open(readme_path) as f:
    long_description = f.read()

# this is not ideal but at at least we're not repeating ourselved when updating package version

with open(join(PROJECT_ROOT, 'smarkets', '__init__.py')) as f:
    version_line = [line for line in f if line.startswith('__version__')][0]

__version__ = version_line.split('=')[1].strip().strip("'").strip('"')

# smarkets.eto and smarkets.eto in packages break creating source dists in current setup
# also nasty hack to make it buildable on readthedocs.org
if 'sdist' in sys.argv or 'READTHEDOCS' in os.environ:
    extra_packages = []
else:
    extra_packages = ['smarkets.eto', 'smarkets.seto']

sdict = {
    'name' : 'smk_python_sdk',
    'version' : __version__,
    'description' : 'Python client for Smarkets streaming API',
    'long_description' : long_description,
    'url': 'https://github.com/smarkets/smk_python_sdk',
    'download_url' : 'https://github.com/smarkets/smk_python_sdk/downloads/smk_python_sdk-%s.tar.gz' % __version__,
    'author' : 'Smarkets Limited',
    'author_email' : 'support@smarkets.com',
    'maintainer' : 'Smarkets Limited',
    'maintainer_email' : 'support@smarkets.com',
    'keywords' : ['Smarkets', 'betting exchange'],
    'license' : 'MIT',
    'packages' : ['smarkets'] + extra_packages,
    'test_suite' : 'tests.all_tests',
    'classifiers' : [
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python'],
    'install_requires': [
        'protobuf',
    ],
    'cmdclass' : {
        'build': SmarketsProtocolBuild,
        'clean': SmarketsProtocolClean,
    },
}

setup(**sdict)
<|endoftext|>


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

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# INFO:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

"""
Author: Evan Hubinger
Date Created: 2014
Description: Coconut Language Installer.
"""

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# IMPORTS:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

from __future__ import with_statement, print_function, absolute_import, unicode_literals, division

import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

from coconut.util import *
import setuptools

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# MAIN:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with openfile("README.rst", "r") as opened:
    readme = readfile(opened)

setuptools.setup(
    name="coconut",
    version=VERSION,
    description="The Coconut Programming Language.",
    long_description=readme,
    url="https://github.com/evhub/coconut",
    author="Evan Hubinger",
    author_email="evanjhub@gmail.com",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Intended Audience :: Information Technology",
        "Topic :: Software Development :: Code Generators",
        "Topic :: Software Development :: Compilers",
        "Topic :: Software Development :: Interpreters",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Utilities",
        "Environment :: Console",
        "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",
        "Operating System :: OS Independent",
        "License :: OSI Approved :: Apache Software License",
        "Framework :: IPython",
        "Programming Language :: Other",
        "Programming Language :: Other Scripting Engines"
        ],
    keywords=["functional programming language"],
    packages=setuptools.find_packages(),
    install_requires=["pyparsing"],
    entry_points={"console_scripts":[
        "coconut = coconut.__main__:main"
        ]}
    )
<commit_msg>Reorders pypi tags<commit_after>#!/usr/bin/env python

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# INFO:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

"""
Author: Evan Hubinger
Date Created: 2014
Description: Coconut Language Installer.
"""

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# IMPORTS:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

from __future__ import with_statement, print_function, absolute_import, unicode_literals, division

import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

from coconut.util import *
import setuptools

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# MAIN:
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with openfile("README.rst", "r") as opened:
    readme = readfile(opened)

setuptools.setup(
    name="coconut",
    version=VERSION,
    description="The Coconut Programming Language.",
    long_description=readme,
    url="https://github.com/evhub/coconut",
    author="Evan Hubinger",
    author_email="evanjhub@gmail.com",
    classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Intended Audience :: Developers",
        "Intended Audience :: Information Technology",
        "Topic :: Software Development :: Code Generators",
        "Topic :: Software Development :: Compilers",
        "Topic :: Software Development :: Interpreters",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Utilities",
        "Environment :: Console",
        "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 :: Other",
        "Programming Language :: Other Scripting Engines",
        "Framework :: IPython",
        "Development Status :: 3 - Alpha"
        ],
    keywords=["functional programming language"],
    packages=setuptools.find_packages(),
    install_requires=["pyparsing"],
    entry_points={"console_scripts":[
        "coconut = coconut.__main__:main"
        ]}
    )
<|endoftext|>


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

ROOT = os.path.dirname(__file__)
VERSION_RE = re.compile(r'''__version__ = \'([0-9.]+)\'''')

def get_version():
    init = open(os.path.join(ROOT, 'application', '__init__.py')).read()
    return VERSION_RE.search(init).group(1)

setup(
    name='groceries-api',
    version=get_version(),
    license='MIT',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'alembic==0.7.5.post2',
        'APScheduler==3.1.0',
        'Flask==0.10.1',
        'Flask-Cors==2.0.0',
        'Flask-SQLAlchemy==2.0',
        'gunicorn==19.3.0',
        'psycopg2==2.6.1',
        'PyJWT==1.1.0',
        'six==1.9.0',
    ],
    extras_require={
        'dev': {
            'coverage==3.7.1',
            'coveralls==0.5',
            'flake8==2.4.0',
            'mock==1.0.1',
            'pytest==2.7.0',
            'tox==2.1.1',
        },
    },
)
<commit_msg>Install requests.<commit_after>#!/usr/bin/env python
from setuptools import find_packages, setup
import os
import re

ROOT = os.path.dirname(__file__)
VERSION_RE = re.compile(r'''__version__ = \'([0-9.]+)\'''')

def get_version():
    init = open(os.path.join(ROOT, 'application', '__init__.py')).read()
    return VERSION_RE.search(init).group(1)

setup(
    name='groceries-api',
    version=get_version(),
    license='MIT',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'alembic==0.7.5.post2',
        'APScheduler==3.1.0',
        'Flask==0.10.1',
        'Flask-Cors==2.0.0',
        'Flask-SQLAlchemy==2.0',
        'gunicorn==19.3.0',
        'psycopg2==2.6.1',
        'PyJWT==1.1.0',
        'requests==2.8.1',
        'six==1.9.0',
    ],
    extras_require={
        'dev': {
            'coverage==3.7.1',
            'coveralls==0.5',
            'flake8==2.4.0',
            'mock==1.0.1',
            'pytest==2.7.0',
            'tox==2.1.1',
        },
    },
)
<|endoftext|>