Skip to content

Commit 2c216aa

Browse files
authored
Merge pull request #142 from hoefling/escape-xmlsec-crypto-macro-value
escape the XMLSEC_CRYPTO macro value, just as it was done in the original setup
2 parents 75c1549 + 50ec2d9 commit 2c216aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ def run(self):
7575
ext.define_macros.extend(
7676
[('MODULE_NAME', self.distribution.metadata.name), ('MODULE_VERSION', self.distribution.metadata.version)]
7777
)
78+
# escape the XMLSEC_CRYPTO macro value, see mehcode/python-xmlsec#141
79+
for (key, value) in ext.define_macros:
80+
if key == 'XMLSEC_CRYPTO' and not (value.startswith('"') and value.endswith('"')):
81+
ext.define_macros.remove((key, value))
82+
ext.define_macros.append((key, '"{0}"'.format(value)))
83+
break
7884

7985
if sys.platform == 'win32':
8086
ext.extra_compile_args.append('/Zi')

0 commit comments

Comments
 (0)