diff -Nru cracklib2-2.9.2/debian/changelog cracklib2-2.9.2/debian/changelog
--- cracklib2-2.9.2/debian/changelog	2018-03-21 22:39:38.000000000 +0100
+++ cracklib2-2.9.2/debian/changelog	2018-04-01 15:31:33.000000000 +0200
@@ -1,3 +1,10 @@
+cracklib2 (2.9.2-5.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add support for a "nopython" build-profile. (Closes: #894385)
+
+ -- Karsten Merker <merker@debian.org>  Sun, 01 Apr 2018 15:31:33 +0200
+
 cracklib2 (2.9.2-5.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru cracklib2-2.9.2/debian/control cracklib2-2.9.2/debian/control
--- cracklib2-2.9.2/debian/control	2018-03-21 22:39:20.000000000 +0100
+++ cracklib2-2.9.2/debian/control	2018-04-01 15:31:09.000000000 +0200
@@ -14,10 +14,10 @@
                docbook-xml,
                dpkg-dev (>= 1.16.1~),
                libtool,
-               python-all-dev (>= 2.6.6-3~),
-               python-setuptools,
-               python3-all-dev (>= 3.1.3-2~),
-               python3-setuptools
+               python-all-dev (>= 2.6.6-3~) <!nopython>,
+               python-setuptools <!nopython>,
+               python3-all-dev (>= 3.1.3-2~) <!nopython>,
+               python3-setuptools <!nopython>
 Homepage: http://sourceforge.net/projects/cracklib
 Vcs-Git: https://anonscm.debian.org/git/pkg-cracklib/pkg-cracklib.git
 Vcs-Browser: https://anonscm.debian.org/gitweb/?p=pkg-cracklib/pkg-cracklib.git
@@ -90,6 +90,7 @@
          ${shlibs:Depends}
 Provides: ${python:Provides}
 Conflicts: python-crack
+Build-Profiles: <!nopython>
 Description: Python bindings for password checker library cracklib2
  This package provides Python bindings for cracklib. It contains a
  pythonic interface to cracklib's functions and some Python
@@ -108,6 +109,7 @@
          ${python3:Depends},
          ${shlibs:Depends}
 Provides: ${python3:Provides}
+Build-Profiles: <!nopython>
 Description: Python3 bindings for password checker library cracklib2
  This package provides Python bindings for cracklib. It contains a
  pythonic interface to cracklib's functions and some Python
diff -Nru cracklib2-2.9.2/debian/rules cracklib2-2.9.2/debian/rules
--- cracklib2-2.9.2/debian/rules	2016-08-25 17:22:00.000000000 +0200
+++ cracklib2-2.9.2/debian/rules	2018-04-01 15:31:09.000000000 +0200
@@ -10,11 +10,13 @@
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 PYVERS := $(shell pyversions -vs)
 PY3VERS := $(shell py3versions -vs)
+DH_WITH_PARAMETERS := python2,python3,autotools_dev
 else
 NOPYTHON_OPTIONS = -Npython-cracklib -Npython3-cracklib
+DH_WITH_PARAMETERS := autotools_dev
 endif
 
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
@@ -48,7 +50,7 @@
 
 override_dh_auto_build:
 	$(MAKE) -C $(CURDIR)/debian/buildtmp/base
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 	ln -s $(CURDIR)/debian/crack.py $(CURDIR)/python; \
 	for i in $(PYVERS) $(PY3VERS); do \
 		cd $(CURDIR)/debian/buildtmp/python$$i; \
@@ -62,7 +64,7 @@
 
 override_dh_auto_test:
 	mkdir $(CURDIR)/debian/tmp
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 	$(CRACKLIB_PACKER) $(CURDIR)/debian/tmp/cracklib_dict < \
 	 $(CURDIR)/dicts/cracklib-small
 	for i in $(PYVERS) $(PY3VERS); do \
@@ -120,7 +122,7 @@
 	  $(CURDIR)/debian/cracklib-runtime/usr/sbin/cracklib-packer \
 	  $(CURDIR)/debian/cracklib-runtime/usr/sbin/cracklib-unpacker
 
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 	for i in $(PYVERS); do \
 		cd $(CURDIR)/debian/buildtmp/python$$i/python; \
 		python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/python-cracklib; \
@@ -139,7 +141,7 @@
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
 
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 override_dh_python2:
 	dh_python2 -ppython-cracklib
 
@@ -148,4 +150,4 @@
 endif
 
 %:
-	dh $@ --with python2,python3,autotools_dev $(NOPYTHON_OPTIONS)
+	dh $@ --with $(DH_WITH_PARAMETERS) $(NOPYTHON_OPTIONS)
