From eceb8c1c01cd6ce60a3e0f0cd6a8439391e254eb Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Tue, 27 Oct 2020 21:48:20 -0600 Subject: [PATCH] TST: Simplify source path names in test_extending. This is a fix for Python 3.9 Azure windows builds that were failing on account of too long temporary file names. --- numpy/random/_examples/cython/setup.py | 4 ++-- numpy/random/tests/test_extending.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/numpy/random/_examples/cython/setup.py b/numpy/random/_examples/cython/setup.py index 42425c2c199f..83f06fde8581 100644 --- a/numpy/random/_examples/cython/setup.py +++ b/numpy/random/_examples/cython/setup.py @@ -19,7 +19,7 @@ lib_path = join(np.get_include(), '..', '..', 'random', 'lib') extending = Extension("extending", - sources=[join(path, 'extending.pyx')], + sources=[join('.', 'extending.pyx')], include_dirs=[ np.get_include(), join(path, '..', '..') @@ -27,7 +27,7 @@ define_macros=defs, ) distributions = Extension("extending_distributions", - sources=[join(path, 'extending_distributions.pyx')], + sources=[join('.', 'extending_distributions.pyx')], include_dirs=[inc_path], library_dirs=[lib_path], libraries=['npyrandom'], diff --git a/numpy/random/tests/test_extending.py b/numpy/random/tests/test_extending.py index 428736203299..1d872a5bef92 100644 --- a/numpy/random/tests/test_extending.py +++ b/numpy/random/tests/test_extending.py @@ -41,8 +41,6 @@ cython = None -@pytest.mark.skipif(sys.platform == "win32" and sys.version_info[:2] == (3, 9), - reason="temp filename problem with Python 3.9 on Windows") @pytest.mark.skipif(cython is None, reason="requires cython") @pytest.mark.slow def test_cython(tmp_path):