diff --git a/.gitignore b/.gitignore index 1f0dc15..1f39df9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,30 @@ +# Compiled files +*.py[co] +*.a +*.o +*.so + +# Sphinx +_build + +# Packages/installer info +*.egg *.egg-info -*.pyc +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Other +.testrepository .tox +.*.swp +.coverage +cover AUTHORS -build/* ChangeLog -doc/build/* -dist/ diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..7409a5a --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..ebf8c17 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,17 @@ +If you would like to contribute to the development of OpenStack, +you must follow the steps in the "If you're a developer, start here" +section of this page: + + http://wiki.openstack.org/HowToContribute + +Once those steps have been completed, changes to OpenStack +should be submitted for review via the Gerrit tool, following +the workflow documented at: + + http://wiki.openstack.org/GerritWorkflow + +Pull requests submitted through GitHub will be ignored. + +Bugs should be filed on Launchpad, not GitHub: + + https://bugs.launchpad.net/python-gear diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0aceb71 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +include AUTHORS +include ChangeLog +include README.rst +include requirements.txt +include test-requirements.txt +exclude .gitignore +exclude .gitreview + +global-exclude *.pyc diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..3a3e3e6 --- /dev/null +++ b/README.rst @@ -0,0 +1,4 @@ +python-gear +=========== + +A pure-Python asynchronous library to interface with Gearman. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..62c6e86 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +d2to1 +pbr diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..aafebd6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,30 @@ +[metadata] +name = gear +author = OpenStack +author-email = openstack-dev@lists.openstack.org +summary = Pure Python Async Gear Protocol Library +description-file = + README.rst +home-page = http://pypi.python.org/pypi/gear +classifier = + Development Status :: 4 - Beta + Environment :: Console + Environment :: OpenStack + Intended Audience :: Developers + Intended Audience :: Information Technology + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Programming Language :: Python + +[files] +packages = + gear + +[global] +setup-hooks = + pbr.hooks.setup_hook + +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..59a0090 --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. +# +# 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 setuptools + +setuptools.setup( + setup_requires=['d2to1', 'pbr'], + d2to1=True) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..6efd99e --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,9 @@ +coverage>=3.6 +discover +fixtures>=0.3.12 +flake8 +python-subunit +sphinx>=1.1.2 +testrepository>=0.0.13 +testscenarios +testtools>=0.9.27 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..3c1492e --- /dev/null +++ b/tox.ini @@ -0,0 +1,31 @@ +[tox] +envlist = py26,py27,pep8 + +[testenv] +setenv = VIRTUAL_ENV={envdir} + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = + python setup.py testr --slowest --testr-args='{posargs}' + +[tox:jenkins] +sitepackages = True +downloadcache = ~/cache/pip + +[testenv:pep8] +commands = flake8 + +[testenv:cover] +setenv = VIRTUAL_ENV={envdir} +commands = + python setup.py testr --coverage + +[testenv:venv] +commands = {posargs} + +[flake8] +exclude = .venv,.tox,dist,doc,*.egg +show-source = true