TST: test_wcsapi_extension fails on Windows
See original GitHub issueNot sure what is going on here. Needs investigation. cc @astrofrog and @Cadair
____________________________ test_wcsapi_extension ____________________________
tmpdir = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-0\\test_wcsapi_extension0')
def test_wcsapi_extension(tmpdir):
# Test that we can build a simple C extension with the astropy.wcs C API
build_dir = tmpdir.mkdir('build').strpath
install_dir = tmpdir.mkdir('install').strpath
record_file = os.path.join(build_dir, 'record.txt')
setup_path = os.path.dirname(__file__)
astropy_path = os.path.dirname(astropy.__path__[0])
env = os.environ.copy()
paths = [install_dir, astropy_path]
if env.get('PYTHONPATH'):
paths.append(env.get('PYTHONPATH'))
env['PYTHONPATH'] = os.pathsep.join(paths)
# Build the extension
# This used to use subprocess.check_call, but on Python 3.4 there was
# a mysterious Heisenbug causing this to fail with a non-zero exit code
# *unless* the output is redirected. This bug also did not occur in an
# interactive session, so it likely had something to do with pytest's
# output capture
#
# --single-version-externally-managed --record is essentially equivalent to
# what pip does; otherwise setuptools' `setup.py install` will try to build
# and install an egg (deprecated behavior, but still the default for
# backwards-compat).
# In the future we might change this to just run pip.
p = subprocess.Popen([sys.executable, 'setup.py', 'build',
f'--build-base={build_dir}', 'install',
f'--install-lib={install_dir}',
'--single-version-externally-managed',
f'--record={record_file}'],
cwd=setup_path, env=env,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Whether the process fails or not this isn't likely to produce a great
# deal of output so communicate should be fine in almost all cases
stdout, stderr = p.communicate()
try:
stdout, stderr = stdout.decode('utf8'), stderr.decode('utf8')
except UnicodeDecodeError:
# Don't try to guess about encoding; just display the text
stdout, stderr = stdout.decode('latin1'), stderr.decode('latin1')
# If compilation fails, we can skip this test, since the
# dependencies necessary to compile an extension may be missing.
# If it passes, however, we want to continue and ensure that the
# extension created is actually usable. However, if we're on
# continuous integration setup, we
# don't want to ever skip, because having it fail in that
# environment probably indicates something more serious that we
# want to know about.
if (not ('CI' in os.environ or
'CONTINUOUS_INTEGRATION' in os.environ) and
p.returncode):
pytest.skip("system unable to compile extensions")
return
> assert p.returncode == 0, (
"setup.py exited with non-zero return code {}\n"
"stdout:\n\n{}\n\nstderr:\n\n{}\n".format(
p.returncode, stdout, stderr))
E AssertionError: setup.py exited with non-zero return code 1
E stdout:
E
E running build
E running build_ext
E building 'wcsapi_test' extension
E creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8
E creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release
E C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DYY_NO_UNISTD_H -D_CRT_SECURE_NO_WARNINGS -D_NO_OLDNAMES -DNO_OLDNAMES -D__STDC__ -ID:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\numpy\core\include -ID:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\astropy\wcs\include\astropy_wcs -ID:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\astropy\wcs\include\wcslib -I/usr/include\wcslib -ID:\a\astropy\astropy\.tox\py38-test-alldeps\include -IC:\hostedtoolcache\windows\Python\3.8.10\x64\include -IC:\hostedtoolcache\windows\Python\3.8.10\x64\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" /Tcwcsapi_test.c /FoC:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release\wcsapi_test.obj
E wcsapi_test.c
E creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\lib.win-amd64-3.8
E C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\a\astropy\astropy\.tox\py38-test-alldeps\libs /LIBPATH:C:\hostedtoolcache\windows\Python\3.8.10\x64\libs /LIBPATH:C:\hostedtoolcache\windows\Python\3.8.10\x64 /LIBPATH:D:\a\astropy\astropy\.tox\py38-test-alldeps\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64" /EXPORT:PyInit_wcsapi_test C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release\wcsapi_test.obj /OUT:C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\lib.win-amd64-3.8\wcsapi_test.cp38-win_amd64.pyd /IMPLIB:C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release\wcsapi_test.cp38-win_amd64.lib
E wcsapi_test.obj : warning LNK4197: export 'PyInit_wcsapi_test' specified multiple times; using first specification
E Creating library C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release\wcsapi_test.cp38-win_amd64.lib and object C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\temp.win-amd64-3.8\Release\wcsapi_test.cp38-win_amd64.exp
E Generating code
E Finished generating code
E running install
E running install_lib
E copying C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\build\lib.win-amd64-3.8\wcsapi_test.cp38-win_amd64.pyd -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-unknown\pytest-0\test_wcsapi_extension0\install
E running install_egg_info
E running egg_info
E creating wcsapi_test.egg-info
E writing wcsapi_test.egg-info\PKG-INFO
E writing dependency_links to wcsapi_test.egg-info\dependency_links.txt
E writing top-level names to wcsapi_test.egg-info\top_level.txt
E writing manifest file 'wcsapi_test.egg-info\SOURCES.txt'
E
E
E stderr:
E
E D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
E warnings.warn(
E Traceback (most recent call last):
E File "setup.py", line 43, in <module>
E setup(
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\__init__.py", line 159, in setup
E return distutils.core.setup(**attrs)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\core.py", line 148, in setup
E dist.run_commands()
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\dist.py", line 966, in run_commands
E self.run_command(cmd)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\dist.py", line 985, in run_command
E cmd_obj.run()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\install.py", line 68, in run
E return orig.install.run(self)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\command\install.py", line 557, in run
E self.run_command(cmd_name)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\cmd.py", line 313, in run_command
E self.distribution.run_command(command)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\dist.py", line 985, in run_command
E cmd_obj.run()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
E self.run_command('egg_info')
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\cmd.py", line 313, in run_command
E self.distribution.run_command(command)
E File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\distutils\dist.py", line 985, in run_command
E cmd_obj.run()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\egg_info.py", line 299, in run
E self.find_sources()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
E mm.run()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\egg_info.py", line 541, in run
E self.add_defaults()
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\egg_info.py", line 581, in add_defaults
E rcfiles = list(walk_revctrl())
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools\command\sdist.py", line 18, in walk_revctrl
E for item in ep.load()(dirname):
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools_scm\integration.py", line 75, in find_files
E res = command(path)
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools_scm\file_finder_git.py", line 86, in git_find_files
E toplevel = _git_toplevel(path)
E File "D:\a\astropy\astropy\.tox\py38-test-alldeps\lib\site-packages\setuptools_scm\file_finder_git.py", line 36, in _git_toplevel
E assert cwd.replace("\\", "/").endswith(out), f"cwd={cwd!r}\nout={out!r}"
E AssertionError: cwd='D:\\a\\astropy\\astropy\\.tox\\py38-test-alldeps\\lib\\site-packages\\astropy\\wcs\\tests\\extension'
E out='.tox/py38-test-alldeps/Lib/site-packages/astropy/wcs/tests/extension'
E
E
E assert 1 == 0
E + where 1 = <subprocess.Popen object at 0x000002701EE3BBE0>.returncode
..\..\.tox\py38-test-alldeps\lib\site-packages\astropy\wcs\tests\extension\test_extension.py:73: AssertionError
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
I am getting WCSAPI setscan error on MC320N handheld ...
Hello, I use a Motorola MC32N Handheld device. I see an "x" symbol on the Wifi symbol after I start the device and...
Read more >WCSAPI Error: How can I connect a ... - Microsoft Community
Hi,. I am trying to connect a Motorola MC9090 with an Windows CE 5 operating system to our WIFI. I am getting the...
Read more >Tuberculin Skin Testing Fact Sheet - Tuberculosis (TB) - CDC
The Mantoux tuberculin skin test (TST) is one method of determining whether a person is infected with Mycobacterium tuberculosis.
Read more >From the computer screen (screen sharing) in a browser via ...
The screen sharing function can be used to publish a video stream that demonstrates the desktop or an application window. WCS API uses...
Read more >Mantoux test and its interpretation - PMC - NCBI
The tuberculin skin test is one of the few investigations dating from the 19 th ... Conventionally, the test is given on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is happening 😱
Diffing the log with the last successful build reveals that the version of the actions runner has changed from:
Job is about to start running on the hosted runner: GitHub Actions 8 (hosted)
to
Job is about to start running on the hosted runner: GitHub Actions 11 (hosted)
So this is likely related somehow.