aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-10-24 01:29:53 -0700
committerGitHub <noreply@github.com>2017-10-24 01:29:53 -0700
commit87d332dcdbffe8ff60d99f74b1ad241c0967b055 (patch)
tree5237dbe65d2354c16cc71b0b5d13b1eb52b75d4e /Makefile.pre.in
parentfixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066) (diff)
downloadcpython-87d332dcdbffe8ff60d99f74b1ad241c0967b055.tar.gz
cpython-87d332dcdbffe8ff60d99f74b1ad241c0967b055.tar.bz2
cpython-87d332dcdbffe8ff60d99f74b1ad241c0967b055.zip
bpo-31810: Add smelly.py to check exported symbols (#4057)
* Add Tools/scripts/smelly.py: script checking if all symbols exported by libpython start with "Py" or "_Py". * Modify "make smelly" to run smelly.py: the command now fails with a non-zero exit code if libpython leaks a "smelly" symbol. * Travis CI now runs "make smelly"
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index e8df8f7355e..6dacb872e0c 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1659,10 +1659,9 @@ distclean: clobber
-o -name '*.bak' ')' \
-exec rm -f {} ';'
-# Check for smelly exported symbols (not starting with Py/_Py)
+# Check that all symbols exported by libpython start with "Py" or "_Py"
smelly: @DEF_MAKE_RULE@
- nm -p $(LIBRARY) | \
- sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
+ $(RUNSHARED) ./$(BUILDPYTHON) Tools/scripts/smelly.py
# Find files with funny names
funny: