Skip to content

Commit aba74e0

Browse files
committed
add package with debug symbols
1 parent 2d164a5 commit aba74e0

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
amalgamation
22
build
33
*.pyc
4+
.pybuild/
45
dist/
56
MANIFEST
67
debian/python-sqlcipher
8+
debian/python-sqlcipher-dbg
79
debian/*.log
810
debian/files
911
debian/*.substvars

debian/control

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Maintainer: Ben Carrillo <[email protected]>
33
Section: python
44
Priority: optional
55
Build-Depends: python-all-dev (>= 2.6.6-3), libsqlcipher-dev (>=2.2.1-2~), debhelper (>= 9)
6-
Standards-Version: 3.9.4
6+
Standards-Version: 3.9.6
77
Uploaders: Micah Anderson <[email protected]>
88
X-Python-Version: >= 2.5
99

@@ -17,3 +17,14 @@ Description: DB-API 2.0 interface for SQLCIPHER 3.x
1717
database engine. It is almost fully compliant with the Python database API
1818
version 2.0. At the same time, it also exposes the unique features of
1919
SQLCipher.
20+
21+
Package: python-sqlcipher-dbg
22+
Section: debug
23+
Priority: extra
24+
Architecture: any
25+
Depends: python-dbg, python-sqlcipher, libsqlcipher0 (>=2.2.1-2),
26+
${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
27+
Description: DB-API 2.0 interface for SQLCIPHER 3.x
28+
Python interface to SQLCipher (debug extension)
29+
.
30+
This package contains the extensions built for the python debug interpreter.

debian/rules

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,30 @@
55
# Prevent setuptools/distribute from accessing the internet.
66
export http_proxy = http://127.0.0.1:9
77

8+
PACKAGE=python-sqlcipher
9+
810
%:
9-
dh $@ --with python2 --buildsystem=python_distutils
11+
dh $@ --with python2 --buildsystem=pybuild
1012

1113
override_dh_auto_build:
1214
python$* setup.py build_sqlcipher
1315
python$* setup.py build_py
16+
python$*-dbg setup.py build_sqlcipher
17+
python$*-dbg setup.py build_py
1418

1519
override_dh_auto_install:
1620
python$* setup.py install --skip-build --root=debian/python-sqlcipher \
1721
--install-layout=deb
22+
python$*-dbg setup.py install --skip-build --root=debian/python-sqlcipher-dbg \
23+
--install-layout=deb
24+
25+
override_dh_installdocs:
26+
dh_installdocs
27+
rm -rf debian/$(PACKAGE)-dbg/usr/share/doc/$(PACKAGE)-dbg
28+
ln -s $(PACKAGE) debian/$(PACKAGE)-dbg/usr/share/doc/$(PACKAGE)-dbg
29+
30+
override_dh_strip:
31+
dh_strip --dbg-package=$(PACKAGE)-dbg
1832

1933
override_dh_python2:
2034
dh_python2 --no-guessing-versions

debian/watch

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ class LibSQLCipherBuilder(build_ext):
146146
description = ("Build C extension linking against libsqlcipher library.")
147147

148148
def build_extension(self, ext):
149+
if self.debug:
150+
self.__add_compiler_options("-O")
151+
149152
ext.extra_compile_args.append("-I/usr/include/sqlcipher/")
150153
ext.extra_link_args.append("-lsqlcipher")
151154
build_ext.build_extension(self, ext)

0 commit comments

Comments
 (0)