Skip to content

Commit

Permalink
add package with debug symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
kalikaneko committed Feb 3, 2015
1 parent 2d164a5 commit aba74e0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
amalgamation
build
*.pyc
.pybuild/
dist/
MANIFEST
debian/python-sqlcipher
debian/python-sqlcipher-dbg
debian/*.log
debian/files
debian/*.substvars
Expand Down
13 changes: 12 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Maintainer: Ben Carrillo <ben@futeisha.org>
Section: python
Priority: optional
Build-Depends: python-all-dev (>= 2.6.6-3), libsqlcipher-dev (>=2.2.1-2~), debhelper (>= 9)
Standards-Version: 3.9.4
Standards-Version: 3.9.6
Uploaders: Micah Anderson <micah@debian.org>
X-Python-Version: >= 2.5

Expand All @@ -17,3 +17,14 @@ Description: DB-API 2.0 interface for SQLCIPHER 3.x
database engine. It is almost fully compliant with the Python database API
version 2.0. At the same time, it also exposes the unique features of
SQLCipher.

Package: python-sqlcipher-dbg
Section: debug
Priority: extra
Architecture: any
Depends: python-dbg, python-sqlcipher, libsqlcipher0 (>=2.2.1-2),
${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
Description: DB-API 2.0 interface for SQLCIPHER 3.x
Python interface to SQLCipher (debug extension)
.
This package contains the extensions built for the python debug interpreter.
16 changes: 15 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,30 @@
# Prevent setuptools/distribute from accessing the internet.
export http_proxy = http://127.0.0.1:9

PACKAGE=python-sqlcipher

%:
dh $@ --with python2 --buildsystem=python_distutils
dh $@ --with python2 --buildsystem=pybuild

override_dh_auto_build:
python$* setup.py build_sqlcipher
python$* setup.py build_py
python$*-dbg setup.py build_sqlcipher
python$*-dbg setup.py build_py

override_dh_auto_install:
python$* setup.py install --skip-build --root=debian/python-sqlcipher \
--install-layout=deb
python$*-dbg setup.py install --skip-build --root=debian/python-sqlcipher-dbg \
--install-layout=deb

override_dh_installdocs:
dh_installdocs
rm -rf debian/$(PACKAGE)-dbg/usr/share/doc/$(PACKAGE)-dbg
ln -s $(PACKAGE) debian/$(PACKAGE)-dbg/usr/share/doc/$(PACKAGE)-dbg

override_dh_strip:
dh_strip --dbg-package=$(PACKAGE)-dbg

override_dh_python2:
dh_python2 --no-guessing-versions
Expand Down
4 changes: 0 additions & 4 deletions debian/watch

This file was deleted.

3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ class LibSQLCipherBuilder(build_ext):
description = ("Build C extension linking against libsqlcipher library.")

def build_extension(self, ext):
if self.debug:
self.__add_compiler_options("-O")

ext.extra_compile_args.append("-I/usr/include/sqlcipher/")
ext.extra_link_args.append("-lsqlcipher")
build_ext.build_extension(self, ext)
Expand Down

0 comments on commit aba74e0

Please sign in to comment.