Skip to content

Commit

Permalink
Add /usr/lib/python3/dist-packages to ld search path
Browse files Browse the repository at this point in the history
Fixes module import on older Ubuntu releases
  • Loading branch information
Dan Fuhry committed Feb 27, 2017
1 parent d0fab0d commit e947af1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debian/python3-iptables.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

/sbin/ldconfig
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ override_dh_auto_install:
$$py -B setup.py install --root debian/python3-iptables --install-layout deb; \
$$py-dbg -B setup.py install --root debian/python3-iptables-dbg --install-layout deb; \
done

# On Ubuntu 14.04 and possibly other versions, /usr/lib/python3/dist-packages is not
# included in the system library search path, so we add it here.
set -e; \
mkdir -p $(CURDIR)/debian/python3-iptables/etc/ld.so.conf.d; \
echo "/usr/lib/python3/dist-packages" > $(CURDIR)/debian/python3-iptables/etc/ld.so.conf.d/python3-dist-packages.conf

set -e; \
for py in $(PY2VERS); do \
$$py -B setup.py install --root debian/python-iptables --install-layout deb; \
Expand Down

0 comments on commit e947af1

Please sign in to comment.