@@ -15,17 +15,38 @@ override_dh_installinit:
1515# we don't really want to strip the symbols from our object files.
1616override_dh_strip :
1717
18+ # dh_shlibdeps calls dpkg-shlibdeps, which finds all the binary files
19+ # (executables and shared libs) in the package, and looks for the shared
20+ # libraries that they depend on. It then adds a dependency on the package that
21+ # contains that library to the package.
22+ #
23+ # We make two modifications to that process...
24+ #
1825override_dh_shlibdeps :
19- # make the postgres package's dependencies a recommendation
20- # rather than a hard dependency.
26+ # Firstly, postgres is not a hard dependency for us, so we want to make
27+ # the things that psycopg2 depends on (such as libpq) be
28+ # recommendations rather than hard dependencies. We do so by
29+ # running dpkg-shlibdeps manually on psycopg2's libs.
30+ #
2131 find debian/$(PACKAGE_NAME)/ -path '*/site-packages/psycopg2/*.so' | \
2232 xargs dpkg-shlibdeps -Tdebian/$(PACKAGE_NAME).substvars \
2333 -pshlibs1 -dRecommends
2434
25- # all the other dependencies can be normal 'Depends' requirements,
26- # except for PIL's, which is self-contained and which confuses
27- # dpkg-shlibdeps.
28- dh_shlibdeps -X site-packages/PIL/.libs -X site-packages/psycopg2
35+ # secondly, we exclude PIL's libraries from the process. They are known
36+ # to be self-contained, but they have interdependencies and
37+ # dpkg-shlibdeps doesn't know how to resolve them.
38+ #
39+ # As of Pillow 7.1.0, these libraries are in
40+ # site-packages/Pillow.libs. Previously, they were in
41+ # site-packages/PIL/.libs.
42+ #
43+ # (we also need to exclude psycopg2, of course, since we've already
44+ # dealt with that.)
45+ #
46+ dh_shlibdeps \
47+ -X site-packages/PIL/.libs \
48+ -X site-packages/Pillow.libs \
49+ -X site-packages/psycopg2
2950
3051override_dh_virtualenv :
3152 ./debian/build_virtualenv
0 commit comments