Initial commit, simple python scaffold

This commit is contained in:
Honza Kral
2013-05-01 16:37:32 +02:00
commit 20fbba1230
12 changed files with 107 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
.*.swp
*~
*.py[co]
.coverage
elasticsearch.egg-info
+10
View File
@@ -0,0 +1,10 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "pypy"
install:
- pip install -r dev_requirements.txt --use-mirrors
script:
- python setup.py test
+12
View File
@@ -0,0 +1,12 @@
include AUTHORS
include INSTALL
include LICENSE
include MANIFEST.in
include README.rst
include README
include dev_requirements.txt
include requirements.txt
recursive-include doc *
recursive-include test_elasticsearch *
global-exclude .coverage
Symlink
+1
View File
@@ -0,0 +1 @@
README.rst
+2
View File
@@ -0,0 +1,2 @@
Python Elasticsearch Client
===========================
+4
View File
@@ -0,0 +1,4 @@
-r requirements.txt
nose
coverage
View File
View File
+39
View File
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
from os.path import join, dirname
from setuptools import setup
VERSION = (0, 0, 1)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
f = open(join(dirname(__file__), 'README.rst'))
long_description = f.read().strip()
f.close()
install_requires = [
]
test_requires = [
'nose',
'coverage',
]
setup(
name = 'elasticsearch',
description = "Python client for Elasticsearch",
url = "https://github.com/elasticsearch/elasticsearch/",
long_description = long_description,
version = __versionstr__,
author = "Honza Král",
author_email = "honza.kral@gmail.com",
packages = ['elasticsearch'],
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Operating System :: OS Independent",
],
install_requires=install_requires,
test_suite='test_elasticsearch.run_tests.run_all',
test_requires=test_requires,
)
View File
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python
import sys
from os import path
import nose
def run_all(argv=None):
sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n')
# always insert coverage when running tests
if argv is None:
argv = [
'nosetests',
'--with-coverage', '--cover-package=elasticsearch', '--cover-erase',
'--nocapture', '--nologcapture',
'--verbose', '--no-skip'
]
else:
for p in ('--with-coverage', '--cover-package=elasticsearch', '--cover-erase'):
if p not in argv:
argv.append(p)
nose.run_exit(
argv=argv,
defaultTest=path.abspath(path.dirname(__file__))
)
if __name__ == '__main__':
run_all(sys.argv)
+5
View File
@@ -0,0 +1,5 @@
from nose import tools
def test_passing():
tools.assert_equals(1+1, 2)