summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-08-23 18:16:31 +0100
committerLars Wirzenius <liw@liw.fi>2011-08-23 18:16:31 +0100
commitdb6b49165e085c12093c08fd6b533e3f70ff40f4 (patch)
tree7977ccca3f846596be89ed00d0a6564e8426d674
parent8edf20033744ab2486631fc38aa6d8782afecfe2 (diff)
parent3ff86843f666e60076940e5b802d866fcf5764ef (diff)
downloadobnam-db6b49165e085c12093c08fd6b533e3f70ff40f4.tar.gz
Release version 0.21.
-rw-r--r--Makefile36
-rw-r--r--NEWS6
-rw-r--r--debian/changelog7
-rwxr-xr-xdebian/rules6
-rw-r--r--obnamlib/__init__.py16
-rw-r--r--project.meta2
-rw-r--r--setup.py70
7 files changed, 93 insertions, 50 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 92c89838..00000000
--- a/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-PYTHON = python
-
-prefix = /usr/local
-bindir = $(prefix)/bin
-
-all: _obnam.so obnam.1 obnam-benchmark.1
-
-_obnam.so: _obnammodule.c
- if $(PYTHON) setup.py build > setup.log 2>&1; then \
- rm setup.log; else cat setup.log; exit 1; fi
- cp build/lib*/*.so .
- rm -rf build
-
-obnam.1: obnam.1.in
- ./obnam --generate-manpage=obnam.1.in > obnam.1
-
-obnam-benchmark.1: obnam-benchmark.1.in obnam-benchmark
- ./obnam-benchmark --generate-manpage=obnam-benchmark.1.in \
- > obnam-benchmark.1
-
-fast-check:
- python -m CoverageTestRunner --ignore-missing-from=without-tests
- rm .coverage
-
-check: fast-check
- python blackboxtest
-
-network-tests:
- ./test-sftpfs
- OBNAM_TEST_SFTP_ROOT=yes OBNAM_TEST_SFTP_REPOSITORY=yes ./blackboxtest
-
-clean:
- rm -f _obnam.so obnamlib/*.pyc obnamlib/plugins/*.pyc test-plugins/*.pyc
- rm -f blackboxtest.log blackboxtest-obnam.log obnam.prof obnam.1
- rm -f obnam-benchmark.1
- rm -rf build
diff --git a/NEWS b/NEWS
index 006227cc..ddaf9f15 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Obnam NEWS
This file summarizes changes between releases of Obnam.
-Version 0.21, released UNRELEASED; a BETA release
+Version 0.21, released 2011-08-23; a BETA release
-------------------------------------------------
USER VISIBLE CHANGES:
@@ -18,6 +18,10 @@ BUG FIXES:
* Negative timestamps for files now work. Thanks to Jamil Djadala
for reporting the bug.
+* The documentation for --checkpoint units fixed. Thanks, user weinzwang
+ from IRC.
+* The connections to the repository and live data filesystem are now
+ properly closed. This makes benchmark read/write statistics be correct.
Version 0.20.1, released 2011-08-11; a BETA release
-------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index 49781b47..12e5ddac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,13 @@
-obnam (0.21-1) UNRELEASED; urgency=low
+obnam (0.21-1) unstable; urgency=low
* New upstream release.
+ * First upload to Debian. (Closes: #636444)
* debian/control: Update python-cliapp versioned dependency to match
the version that provides dump_memory_profile.
+ * Tweak packaging to match upstream change from Makefile+setup.py to just
+ setup.py.
- -- Lars Wirzenius <liw@liw.fi> Mon, 22 Aug 2011 18:16:27 +0100
+ -- Lars Wirzenius <liw@liw.fi> Tue, 23 Aug 2011 18:07:07 +0100
obnam (0.20.1-1) squeeze; urgency=low
diff --git a/debian/rules b/debian/rules
index 58b96d7f..ef1439ef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,3 @@
%:
dh $@ --with=python2 --with-buildsystem=python_distutils
-override_dh_auto_build:
- $(MAKE) all
-
-override_dh_auto_install:
- python setup.py install --prefix=debian/obnam/usr --install-layout=deb
-
diff --git a/obnamlib/__init__.py b/obnamlib/__init__.py
index 0223c439..f833878e 100644
--- a/obnamlib/__init__.py
+++ b/obnamlib/__init__.py
@@ -17,10 +17,22 @@
import cliapp
-__version__ = '0.20.1'
+__version__ = '0.21'
-import _obnam
+
+# Import _obnam if it is there. We need to be able to do things without
+# it, especially at build time, while we're generating manual pages.
+# If _obnam is not there, substitute a dummy that throws an exception
+# if used.
+class DummyExtension(object):
+ def __getattr__(self, name):
+ raise Exception('Trying to use _obnam, but that was not found.')
+try:
+ import _obna
+except ImportError:
+ _obnam = DummyExtension()
+
from pluginmgr import PluginManager
diff --git a/project.meta b/project.meta
new file mode 100644
index 00000000..d3942094
--- /dev/null
+++ b/project.meta
@@ -0,0 +1,2 @@
+[config]
+basetgz = /home/pbuilder-tgz/sid-amd64-pristine.tgz, squeeze:amd64:/home/pbuilder-tgz/squeeze-amd64-custom.tgz, squeeze:i386:/home/pbuilder-tgz/squeeze-i386-custom.tgz
diff --git a/setup.py b/setup.py
index 9eb39b6b..bdb05365 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (C) 2008 Lars Wirzenius <liw@liw.fi>
+# Copyright (C) 2008-2011 Lars Wirzenius <liw@liw.fi>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,16 +16,80 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from distutils.core import setup, Extension
+from distutils.cmd import Command
+from distutils.command.build import build
+from distutils.command.clean import clean
import glob
+import os
+import subprocess
+
+class GenerateManpage(build):
+
+ def run(self):
+ build.run(self)
+ print 'building manpages'
+ for x in ['obnam', 'obnam-benchmark']:
+ with open('%s.1' % x, 'w') as f:
+ subprocess.check_call(['python', x,
+ '--generate-manpage=%s.1.in' % x,
+ '--output=%s.1' % x], stdout=f)
+
+
+class CleanMore(clean):
+
+ def run(self):
+ clean.run(self)
+ for x in ['blackboxtest.log', 'blackboxtest-obnam.log',
+ 'obnam.1', 'obnam-benchmark.1']:
+ if os.path.exists(x):
+ os.remove(x)
+
+
+class Check(Command):
+
+ user_options = [
+ ('fast', 'f', 'run fast tests only?'),
+ ('network', 'n', 'run network tests to localhost?'),
+ ]
+
+ def initialize_options(self):
+ self.fast = False
+ self.network = False
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ subprocess.check_call(['python', '-m', 'CoverageTestRunner',
+ '--ignore-missing-from=without-tests'])
+ os.remove('.coverage')
+ if self.fast:
+ return
+
+ subprocess.check_call(['python', 'blackboxtest'])
+
+ if self.network:
+ subprocess.check_call(['./test-sftpfs'])
+
+ env = dict(os.environ)
+ env['OBNAM_TEST_SFTP_ROOT'] = 'yes'
+ env['OBNAM_TEST_SFTP_REPOSITORY'] = 'yes'
+ subprocess.check_call(['./blackboxtest'], env=env)
+
setup(name='obnam',
- version='0.20.1',
+ version='0.21',
description='Backup software',
author='Lars Wirzenius',
author_email='liw@liw.fi',
url='http://braawi.org/obnam/',
scripts=['obnam', 'obnam-benchmark'],
packages=['obnamlib', 'obnamlib.plugins'],
- ext_modules=[Extension('_obnam', sources=['_obnammodule.c'])],
+ ext_modules=[Extension('obnamlib._obnam', sources=['_obnammodule.c'])],
data_files=[('share/man/man1', glob.glob('*.1'))],
+ cmdclass={
+ 'build': GenerateManpage,
+ 'check': Check,
+ 'clean': CleanMore,
+ },
)