Skip to content

Commit 189c585

Browse files
committed
BLD: Install scripts tests only during inplace
The scripts directory is not visible if the installation is not inplace. Follow-up to gh-20061.
1 parent f2302d6 commit 189c585

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,15 @@ def get_tag(self):
435435
# args to ignore warnings
436436
extra_compile_args = ['-Wno-unused-function']
437437

438+
# If we're doing an inplace installation, the "scripts" directory is visible.
439+
# Thus, testing involving that directory should be "installed". Otherwise,
440+
# they should be excluded.
441+
for arg in ("develop", "-i", "--inplace"):
442+
if arg in sys.argv:
443+
exclude = []
444+
break
445+
else:
446+
exclude = ["pandas.tests.scripts"]
438447

439448
# enable coverage by building cython files by setting the environment variable
440449
# "PANDAS_CYTHON_COVERAGE" (with a Truthy value) or by running build_ext
@@ -727,7 +736,8 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
727736
setup(name=DISTNAME,
728737
maintainer=AUTHOR,
729738
version=versioneer.get_version(),
730-
packages=find_packages(include=['pandas', 'pandas.*']),
739+
packages=find_packages(include=['pandas', 'pandas.*'],
740+
exclude=exclude),
731741
package_data={'': ['templates/*', '_libs/*.dll']},
732742
ext_modules=maybe_cythonize(extensions, compiler_directives=directives),
733743
maintainer_email=EMAIL,

0 commit comments

Comments
 (0)