diff --git a/packages/hxtorch/package.py b/packages/hxtorch/package.py
index 833194e156b828a477e8d174f940c589ce7d2599..f460b31b5ed963e5790409e13b025781c38a8870 100644
--- a/packages/hxtorch/package.py
+++ b/packages/hxtorch/package.py
@@ -62,7 +62,7 @@ class Hxtorch(WafPackage):
             query = self.spec[dep.name]
             try:
                 if dep.name in ['pthreadpool', 'fxdiv']:
-                    print('skipping {} in SPACK_INCLUDE_DIRS/CPATH/C{,_PLUS}_INCLUDE_PATH\n'.format(dep.name))
+                    print('skipping {} in SPACK_INCLUDE_DIRS/CPATH/C{{,_PLUS}}_INCLUDE_PATH\n'.format(dep.name))
                     for d in query.headers.directories:
                         if os.path.exists(d):
                             env.remove_path('SPACK_INCLUDE_DIRS', d)