From 5f6db672a7a1ad573c1137ed5aab7b9b8210d959 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 5 Jan 2021 15:57:01 -0600 Subject: [PATCH] add test on docs in the package --- Makefile | 2 +- scripts/build_sdist.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c3d3cab..c25ca92 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ pandas/dist/$(TARGZ): -v ${CURDIR}/pandas:/pandas \ -v ${CURDIR}/scripts:/scripts \ pandas-build \ - sh /scripts/build_sdist.sh + /scripts/build_sdist.sh # ----------------------------------------------------------------------------- # Tests diff --git a/scripts/build_sdist.sh b/scripts/build_sdist.sh index dbacde7..3e0fcb1 100755 --- a/scripts/build_sdist.sh +++ b/scripts/build_sdist.sh @@ -9,3 +9,18 @@ rm -rf dist git clean -xfd python setup.py clean --quiet python setup.py sdist --formats=gztar --quiet + +# as of https://github.com/pandas-dev/pandas/pull/38846, docs should not +# be included in the package tarball +num_docs_files=$( + grep --count -E "^doc" < pandas.egg-info/SOURCES.txt +) +if [[ ${num_docs_files} -gt 0 ]]; then + echo "" + echo "Files from doc/ should not be included in the package, but ${num_docs_files} were found." + echo "first few files:" + echo "" + cat pandas.egg-info/SOURCES.txt | grep -E "^doc" | head -n 20 + echo "" + exit 1 +fi