Initial commit, simple python scaffold
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.*.swp
|
||||
*~
|
||||
*.py[co]
|
||||
.coverage
|
||||
elasticsearch.egg-info
|
||||
+10
@@ -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
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
Python Elasticsearch Client
|
||||
===========================
|
||||
@@ -0,0 +1,4 @@
|
||||
-r requirements.txt
|
||||
|
||||
nose
|
||||
coverage
|
||||
@@ -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,
|
||||
)
|
||||
Executable
+29
@@ -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)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
from nose import tools
|
||||
|
||||
def test_passing():
|
||||
tools.assert_equals(1+1, 2)
|
||||
|
||||
Reference in New Issue
Block a user