summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2009-12-19 09:45:30 +1100
committerRobert Collins <robertc@robertcollins.net>2009-12-19 09:45:30 +1100
commita7b16c720bc9d62222c72d2f9fb268a88a51162a (patch)
treef16cc206ce2f07d44e98da67f8cdde3293ba0b1b /setup.py
downloadtestrepository-git-a7b16c720bc9d62222c72d2f9fb268a88a51162a.tar.gz
Base project infrastructure.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..e923419
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2009 Testrepository Contributors
+#
+# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
+# license at the users choice. A copy of both licenses are available in the
+# project source as Apache-2.0 and BSD. You may not use this file except in
+# compliance with one of these two licences.
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# license you chose for the specific language governing permissions and
+# limitations under that license.
+
+from distutils.core import setup
+import testrepository
+version = '.'.join(str(component) for component in testrepository.__version__[0:3])
+phase = testrepository.__version__[3]
+if phase != 'final':
+ import bzrlib.workingtree
+ t = bzrlib.workingtree.WorkingTree.open_containing(__file__)[0]
+ if phase == 'alpha':
+ # No idea what the next version will be
+ version = 'next-%s' % t.branch.revno()
+ else:
+ # Preserve the version number but give it a revno prefix
+ version = version + '~%s' % t.branch.revno()
+
+setup(name='testrepository',
+ author='Robert Collins',
+ author_email='robertc@robertcollins.net',
+ url='https://launchpad.net/testrepository',
+ description=('A repository of test results.'),
+ version=version,
+ packages=['testrepository', 'testrepository.tests'])