summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-04-05 19:10:41 -0400
committerMonty Taylor <mordred@inaugust.com>2013-04-08 12:31:53 -0400
commit855b217f6dac1fd6a613ba8bfda120f8c96734b8 (patch)
treee75ce4ac6f49ffe0b6006b3c14b1e25a7a9c1b5a
parentb6097dc7ed885ff7241ca90f95246c66dbe7cf10 (diff)
downloadgear-855b217f6dac1fd6a613ba8bfda120f8c96734b8.tar.gz
Add pbr-based setup.
Change-Id: I8ff06c6711e1d9f5bf4d1278f37d4e2f7f799e3d
-rw-r--r--.gitignore30
-rw-r--r--.testr.conf4
-rw-r--r--CONTRIBUTING.rst17
-rw-r--r--MANIFEST.in9
-rw-r--r--README.rst4
-rw-r--r--requirements.txt2
-rw-r--r--setup.cfg30
-rwxr-xr-xsetup.py21
-rw-r--r--test-requirements.txt9
-rw-r--r--tox.ini31
10 files changed, 153 insertions, 4 deletions
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