Exemplo n.º 1
0
#!/usr/bin/env python
import sys
import os
import re
from setuptools import setup

try:
    from semantic_release import setup_hook
    setup_hook(sys.argv)
except ImportError:
    pass


def read(filename):
    return open(os.path.join(os.path.dirname(__file__), filename)).read()


version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                    read('simple_elastic/__init__.py'), re.MULTILINE).group(1)

long_description = read('README.md')

setup(name='simple-elastic',
      packages=['simple_elastic'],
      version=version,
      description='A simple wrapper for the elasticsearch package.',
      author='Jonas Waeber',
      author_email='*****@*****.**',
      install_requires=['elasticsearch7'],
      url='https://github.com/UB-UNIBAS/simple-elastic',
      long_description=long_description,
Exemplo n.º 2
0
 def test_setup_hook_should_call_main(self, mock_main):
     setup_hook(['setup.py', 'publish'])
     self.assertTrue(mock_main.called)
Exemplo n.º 3
0
    try:
        import pypandoc
        return pypandoc.convert('README.md', 'rst')
    except ImportError:
        return None

with open('nopassword/__init__.py', 'r') as fd:
    version = re.search(
        r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
        fd.read(),
        re.MULTILINE
    ).group(1)

try:
    from semantic_release import setup_hook
    setup_hook(sys.argv)
except ImportError:
    pass

setup(
    name="django-nopassword",
    version=version,
    url='http://github.com/relekang/django-nopassword',
    author='Rolf Erik Lekang',
    author_email='*****@*****.**',
    description='Authentication backend for django that uses a one time code instead of passwords',
    long_description=_read_long_description(),
    packages=find_packages(exclude='tests'),
    install_require=[
        'django>=1.4',
    ],
Exemplo n.º 4
0
 def test_setup_hook_should_not_call_main_if_to_few_args(self, mock_main):
     setup_hook(['setup.py'])
     self.assertFalse(mock_main.called)