Skip to content

Commit

Permalink
Merge pull request #15 from reidrac/debian-packaging
Browse files Browse the repository at this point in the history
Debian packaging support
  • Loading branch information
williballenthin committed Apr 5, 2012
2 parents 156233b + fe56c3f commit 354ad7c
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Registry/__init__.py
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

_version_ = '0.2.3'

__all__ = [
'Registry',
'RegistryParse',
Expand Down
6 changes: 6 additions & 0 deletions debian/README.source
@@ -0,0 +1,6 @@
You'll need fakeroot and the Debian packaging tools.

Run: ./debian/makedeb

***

13 changes: 13 additions & 0 deletions debian/changelog.py
@@ -0,0 +1,13 @@
#!/usr/bin/env python

from Registry import _version_
from datetime import datetime

with open("debian/changelog", "w") as fd:
fd.write("""python-registry (%s) unstable; urgency=low
* Upstream release
-- Willy Ballenthin <willi.ballenthin@gmail.com> %s
""" % (_version_, datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S GMT')))

1 change: 1 addition & 0 deletions debian/compat
@@ -0,0 +1 @@
8
15 changes: 15 additions & 0 deletions debian/control
@@ -0,0 +1,15 @@
Source: python-registry
Section: python
Priority: extra
Maintainer: Willy Ballenthin <willi.ballenthin@gmail.com>
Standards-Version: 3.8.4
Build-Depends: debhelper (>= 8.0),
python-all-dev,
python-support
Homepage: http://www.williballenthin.com/registry/


Package: python-registry
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}
Description: Python module providing access to Windows registry files.
14 changes: 14 additions & 0 deletions debian/makedeb
@@ -0,0 +1,14 @@
#!/bin/sh
set -e

echo "Making .deb"
PYTHONPATH=. debian/changelog.py
fakeroot ./debian/rules binary
mkdir -p dist
fakeroot ./debian/rules clean
rm debian/changelog
python setup.py clean
rmdir dist
mv -i ../*.deb .
echo "Made .deb"

1 change: 1 addition & 0 deletions debian/pyversions
@@ -0,0 +1 @@
2.6-
8 changes: 8 additions & 0 deletions debian/rules
@@ -0,0 +1,8 @@
#!/usr/bin/make -f

export DH_ALWAYS_EXCLUDE=.git
export DH_MD5SUMS_ARGS := --exclude=.git
export DH_VERBOSE=1

%:
dh $@
5 changes: 4 additions & 1 deletion setup.py
@@ -1,12 +1,15 @@
#!/usr/bin/env python

from distutils.core import setup
from Registry import _version_

setup(name='python-registry',
version='0.2.3',
version=_version_,
description='Read access to Windows Registry files.',
author='Willi Ballenthin',
author_email='willi.ballenthin@gmail.com',
url='http://www.williballenthin.com/registry/',
license='Apache License (2.0)',
packages=['Registry'],
)

0 comments on commit 354ad7c

Please sign in to comment.