Title: Missing unit test dependencies on Linux? · Issue #12903 · python/mypy · GitHub
Open Graph Title: Missing unit test dependencies on Linux? · Issue #12903 · python/mypy
X Title: Missing unit test dependencies on Linux? · Issue #12903 · python/mypy
Description: Bug Report It appears that there are several missing dependencies in test-requirements.txt, including: gcc and make. Some other dependency, whose symptom is that #include
Open Graph Description: Bug Report It appears that there are several missing dependencies in test-requirements.txt, including: gcc and make. Some other dependency, whose symptom is that #include
X Description: Bug Report It appears that there are several missing dependencies in test-requirements.txt, including: gcc and make. Some other dependency, whose symptom is that #include <Python.h> fails. Fo...
Opengraph URL: https://github.com/python/mypy/issues/12903
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing unit test dependencies on Linux?","articleBody":"**Bug Report**\r\n\r\nIt appears that there are several missing dependencies in test-requirements.txt, including:\r\n\r\n1. gcc and make.\r\n2. Some other dependency, whose symptom is that `#include \u003cPython.h>` fails. For example:\r\n\r\n```console\r\nx86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/edreamleo/mypy/mypyc/lib-rt -I/home/edreamleo/mypy/venv/include -I/usr/include/python3.8 -c build/__native.c -o build/temp.linux-x86_64-3.8/build/__native.o -O0 -g1 -Werror -Wno-unused-function -Wno-unused-label -Wno-unreachable-code -Wno-unused-variable -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-unused-but-set-variable\r\n---------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------\r\nIn file included from build/__native.c:1:\r\n/home/edreamleo/mypy/mypyc/lib-rt/init.c:1:10: fatal error: Python.h: No such file or directory\r\n 1 | #include \u003cPython.h>\r\n | ^~~~~~~~~~\r\ncompilation terminated.\r\n```\r\n\r\n**To Reproduce**\r\n\r\nRather than including multiple (huge) console logs, I'll summarize. I'll be happy to run any tests that you might want.\r\n\r\n```console\r\napt-get remove gcc\r\napt-get remove make\r\n\u003c\u003c install mypy >>\r\nsource venv/bin/activate\r\npython3 -m pytest\r\n```\r\nHundreds of tests will fail, complaining either that `x86_64-linux-gnu-gcc` does not exist or that `make` does not exist.\r\n\r\nAfter:\r\n\r\n```console\r\napt-get install gcc\r\napt-get install make\r\n```\r\nI still get many failures: `346 failed, 9620 passed, 370 skipped, 9 xfailed`,\r\nwith many tests failing because `#include \u003cPython.h>` fails, as shown above.\r\n\r\n**Expected Behavior**\r\n\r\nAll unit tests pass (in the venv) after installing mypy.\r\n\r\n**Actual Behavior**\r\n\r\nSee above.\r\n\r\n**Your Environment**\r\n\r\nmypy installation:\r\n\r\n\u003cdetails>\r\n\r\n```console\r\n(venv) edreamleo@edreamleo-MS-7D09:~/mypy$ python3 -m pip install -r test-requirements.txt\r\n\r\nIgnoring typed-ast: markers 'python_version \u003c \"3.8\"' don't match your environment\r\nIgnoring typed-ast: markers 'python_version \u003c \"3.8\"' don't match your environment\r\nIgnoring filelock: markers 'python_version \u003c \"3.7\"' don't match your environment\r\nCollecting typing_extensions>=3.10\r\n Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)\r\nCollecting mypy_extensions>=0.4.3\r\n Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)\r\nCollecting tomli>=1.1.0\r\n Using cached tomli-2.0.1-py3-none-any.whl (12 kB)\r\nCollecting types-typed-ast\u003c1.6.0,>=1.5.0\r\n Using cached types_typed_ast-1.5.6-py3-none-any.whl (5.9 kB)\r\nCollecting attrs>=18.0\r\n Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)\r\nCollecting filelock>=3.0.0\r\n Using cached filelock-3.7.0-py3-none-any.whl (10 kB)\r\nCollecting flake8==3.9.2\r\n Using cached flake8-3.9.2-py2.py3-none-any.whl (73 kB)\r\nCollecting flake8-bugbear==22.3.20\r\n Using cached flake8_bugbear-22.3.20-py3-none-any.whl (19 kB)\r\nCollecting flake8-pyi>=20.5\r\n Using cached flake8_pyi-22.5.1-py37-none-any.whl (20 kB)\r\nCollecting lxml>=4.4.0\r\n Using cached lxml-4.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)\r\nCollecting psutil>=4.0\r\n Using cached psutil-5.9.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (284 kB)\r\nCollecting pytest>=6.2.4\r\n Using cached pytest-7.1.2-py3-none-any.whl (297 kB)\r\nCollecting pytest-xdist>=1.34.0\r\n Using cached pytest_xdist-2.5.0-py3-none-any.whl (41 kB)\r\nCollecting pytest-forked\u003c2.0.0,>=1.3.0\r\n Using cached pytest_forked-1.4.0-py3-none-any.whl (4.9 kB)\r\nCollecting pytest-cov\u003c3.0.0,>=2.10.0\r\n Using cached pytest_cov-2.12.1-py2.py3-none-any.whl (20 kB)\r\nCollecting py>=1.5.2\r\n Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)\r\nCollecting typed_ast\u003c2,>=1.5.4\r\n Using cached typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (897 kB)\r\nCollecting virtualenv>=20.6.0\r\n Using cached virtualenv-20.14.1-py2.py3-none-any.whl (8.8 MB)\r\nRequirement already satisfied: setuptools!=50 in ./venv/lib/python3.8/site-packages (from -r test-requirements.txt (line 19)) (44.0.0)\r\nCollecting importlib-metadata\u003c5.0.0,>=4.6.1\r\n Using cached importlib_metadata-4.11.4-py3-none-any.whl (18 kB)\r\nCollecting pyflakes\u003c2.4.0,>=2.3.0\r\n Using cached pyflakes-2.3.1-py2.py3-none-any.whl (68 kB)\r\nCollecting pycodestyle\u003c2.8.0,>=2.7.0\r\n Using cached pycodestyle-2.7.0-py2.py3-none-any.whl (41 kB)\r\nCollecting mccabe\u003c0.7.0,>=0.6.0\r\n Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)\r\nCollecting ast-decompiler\u003c0.5.0,>=0.4.0; python_version \u003c \"3.9\"\r\n Using cached ast_decompiler-0.4.0-py2.py3-none-any.whl (12 kB)\r\nCollecting packaging\r\n Using cached packaging-21.3-py3-none-any.whl (40 kB)\r\nCollecting pluggy\u003c2.0,>=0.12\r\n Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)\r\nCollecting iniconfig\r\n Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)\r\nCollecting execnet>=1.1\r\n Using cached execnet-1.9.0-py2.py3-none-any.whl (39 kB)\r\nCollecting toml\r\n Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)\r\nCollecting coverage>=5.2.1\r\n Using cached coverage-6.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)\r\nCollecting platformdirs\u003c3,>=2\r\n Using cached platformdirs-2.5.2-py3-none-any.whl (14 kB)\r\nCollecting six\u003c2,>=1.9.0\r\n Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)\r\nCollecting distlib\u003c1,>=0.3.1\r\n Using cached distlib-0.3.4-py2.py3-none-any.whl (461 kB)\r\nCollecting zipp>=0.5\r\n Using cached zipp-3.8.0-py3-none-any.whl (5.4 kB)\r\nCollecting pyparsing!=3.0.5,>=2.0.2\r\n Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)\r\nInstalling collected packages: typing-extensions, mypy-extensions, tomli, types-typed-ast, attrs, filelock, pyflakes, pycodestyle, mccabe, flake8, flake8-bugbear, ast-decompiler, flake8-pyi, lxml, psutil, pyparsing, packaging, py, pluggy, iniconfig, pytest, execnet, pytest-forked, pytest-xdist, toml, coverage, pytest-cov, typed-ast, platformdirs, six, distlib, virtualenv, zipp, importlib-metadata\r\nSuccessfully installed ast-decompiler-0.4.0 attrs-21.4.0 coverage-6.4 distlib-0.3.4 execnet-1.9.0 filelock-3.7.0 flake8-3.9.2 flake8-bugbear-22.3.20 flake8-pyi-22.5.1 importlib-metadata-4.11.4 iniconfig-1.1.1 lxml-4.8.0 mccabe-0.6.1 mypy-extensions-0.4.3 packaging-21.3 platformdirs-2.5.2 pluggy-1.0.0 psutil-5.9.1 py-1.11.0 pycodestyle-2.7.0 pyflakes-2.3.1 pyparsing-3.0.9 pytest-7.1.2 pytest-cov-2.12.1 pytest-forked-1.4.0 pytest-xdist-2.5.0 six-1.16.0 toml-0.10.2 tomli-2.0.1 typed-ast-1.5.4 types-typed-ast-1.5.6 typing-extensions-4.2.0 virtualenv-20.14.1 zipp-3.8.0\r\n\r\n(venv) edreamleo@edreamleo-MS-7D09:~/mypy$ python3 -m pip install -e .\r\n\r\nObtaining file:///home/edreamleo/mypy\r\n Installing build dependencies ... done\r\n Getting requirements to build wheel ... done\r\n Preparing wheel metadata ... done\r\nRequirement already satisfied: typing-extensions>=3.10 in ./venv/lib/python3.8/site-packages (from mypy==0.970+dev.568b98a6f08205cd364a2511f8c8873f67e8b879) (4.2.0)\r\nRequirement already satisfied: tomli>=1.1.0; python_version \u003c \"3.11\" in ./venv/lib/python3.8/site-packages (from mypy==0.970+dev.568b98a6f08205cd364a2511f8c8873f67e8b879) (2.0.1)\r\nRequirement already satisfied: mypy-extensions>=0.4.3 in ./venv/lib/python3.8/site-packages (from mypy==0.970+dev.568b98a6f08205cd364a2511f8c8873f67e8b879) (0.4.3)\r\nInstalling collected packages: mypy\r\n Attempting uninstall: mypy\r\n Found existing installation: mypy 0.970+dev.568b98a6f08205cd364a2511f8c8873f67e8b879\r\n Not uninstalling mypy at /home/edreamleo/mypy, outside environment /home/edreamleo/mypy/venv\r\n Can't uninstall 'mypy'. No files were found to uninstall.\r\n Running setup.py develop for mypy\r\nSuccessfully installed mypy\r\n\r\n(venv) edreamleo@edreamleo-MS-7D09:~/mypy$ hash -r\r\n```\r\n\r\n\u003c/details>\r\n\r\nEnvironment:\r\n\r\n```console\r\nPython 3.8.10 (default, Mar 15 2022, 12:22:08) \r\n[GCC 9.4.0] on linux\r\n```\r\n\r\n`pip list` (outer):\r\n\r\n\u003cdetails>\r\n\r\n```console\r\nPackage Version Editable project location\r\n---------------------- -------------------- --------------------------\r\nappdirs 1.4.3\r\napturl 0.5.2\r\nastroid 2.11.5\r\nattrs 21.4.0\r\nbcrypt 3.1.7\r\nblinker 1.4\r\nBrlapi 0.7.0\r\ncertifi 2019.11.28\r\nchardet 3.0.4\r\nClick 7.0\r\ncolorama 0.4.3\r\ncommand-not-found 0.3\r\ncryptography 2.8\r\ncupshelpers 1.0\r\ndbus-python 1.2.16\r\ndefer 1.0.6\r\ndill 0.3.4\r\ndistlib 0.3.0\r\ndistro 1.4.0\r\ndistro-info 0.23ubuntu1\r\ndocutils 0.18.1\r\nduplicity 0.8.12.0\r\nentrypoints 0.3\r\nfasteners 0.14.1\r\nfilelock 3.0.12\r\nfuture 0.18.2\r\ngitdb 4.0.9\r\nGitPython 3.1.27\r\nhttplib2 0.14.0\r\nidna 2.8\r\nimportlib-metadata 1.5.0\r\niniconfig 1.1.1\r\nisort 5.10.1\r\nkeyring 18.0.1\r\nlanguage-selector 0.1\r\nlaunchpadlib 1.10.13\r\nlazr.restfulclient 0.14.2\r\nlazr.uri 1.0.3\r\nlazy-object-proxy 1.7.1\r\nlockfile 0.12.2\r\nlouis 3.12.0\r\nmacaroonbakery 1.3.1\r\nMako 1.1.0\r\nMarkupSafe 1.1.0\r\nmccabe 0.7.0\r\nmonotonic 1.5\r\nmore-itertools 4.2.0\r\nnetifaces 0.10.4\r\noauthlib 3.1.0\r\nolefile 0.46\r\npackaging 21.3\r\nparamiko 2.6.0\r\npexpect 4.6.0\r\nPillow 7.0.0\r\npip 22.0.4\r\nplatformdirs 2.5.2\r\npluggy 1.0.0\r\nprotobuf 3.6.1\r\npy 1.11.0\r\npy-cpuinfo 8.0.0\r\npycairo 1.16.2\r\npycups 1.9.73\r\npyenchant 3.2.2\r\nPyGObject 3.36.0\r\nPyJWT 1.7.1\r\npylint 2.14.0b1 /home/edreamleo/ekr-pylint\r\npymacaroons 0.13.0\r\nPyNaCl 1.3.0\r\npyparsing 3.0.8\r\nPyQt6 6.3.0\r\nPyQt6-Qt6 6.3.0\r\nPyQt6-sip 13.3.1\r\nPyQt6-WebEngine 6.3.0\r\nPyQt6-WebEngine-Qt6 6.3.0\r\npyRFC3339 1.1\r\npytest 7.1.2\r\npytest-benchmark 3.4.1\r\npytest-timeout 2.1.0\r\npython-apt 2.0.0+ubuntu0.20.4.7\r\npython-dateutil 2.7.3\r\npython-debian 0.1.36ubuntu1\r\npytz 2019.3\r\npyxdg 0.26\r\nPyYAML 5.3.1\r\nreportlab 3.5.34\r\nrequests 2.22.0\r\nrequests-unixsocket 0.2.0\r\nSecretStorage 2.3.1\r\nsetuptools 62.1.0\r\nsimplejson 3.16.0\r\nsix 1.14.0\r\nsmmap 5.0.0\r\nsystemd-python 234\r\ntoml 0.10.0\r\ntomli 2.0.1\r\ntomlkit 0.10.2\r\ntox 3.13.2\r\ntyping_extensions 4.2.0\r\nubuntu-advantage-tools 27.8\r\nubuntu-drivers-common 0.0.0\r\nufw 0.36\r\nunattended-upgrades 0.1\r\nurllib3 1.25.8\r\nusb-creator 0.3.7\r\nvirtualenv 20.0.17\r\nwadllib 1.3.3\r\nwheel 0.37.1\r\nwrapt 1.14.1\r\nxkit 0.0.0\r\nzipp 1.0.0\r\n```\r\n\r\n\u003c/details>\r\n\r\n`(venv) pip list`:\r\n\r\n\u003cdetails>\r\n\r\n```console\r\nedreamleo@edreamleo-MS-7D09:~$ cd mypy\r\nedreamleo@edreamleo-MS-7D09:~/mypy$ source venv/bin/activate\r\n(venv) edreamleo@edreamleo-MS-7D09:~/mypy$ pip list\r\nPackage Version Location \r\n------------------ -------------------------------------------------- --------------------\r\nast-decompiler 0.4.0 \r\nattrs 21.4.0 \r\ncoverage 6.4 \r\ndistlib 0.3.4 \r\nexecnet 1.9.0 \r\nfilelock 3.7.0 \r\nflake8 3.9.2 \r\nflake8-bugbear 22.3.20 \r\nflake8-pyi 22.5.1 \r\nimportlib-metadata 4.11.4 \r\niniconfig 1.1.1 \r\nlxml 4.8.0 \r\nmccabe 0.6.1 \r\nmypy 0.970+dev.568b98a6f08205cd364a2511f8c8873f67e8b879 /home/edreamleo/mypy\r\nmypy-extensions 0.4.3 \r\npackaging 21.3 \r\npip 20.0.2 \r\npkg-resources 0.0.0 \r\nplatformdirs 2.5.2 \r\npluggy 1.0.0 \r\npsutil 5.9.1 \r\npy 1.11.0 \r\npycodestyle 2.7.0 \r\npyflakes 2.3.1 \r\npyparsing 3.0.9 \r\npytest 7.1.2 \r\npytest-cov 2.12.1 \r\npytest-forked 1.4.0 \r\npytest-xdist 2.5.0 \r\nsetuptools 44.0.0 \r\nsix 1.16.0 \r\ntoml 0.10.2 \r\ntomli 2.0.1 \r\ntyped-ast 1.5.4 \r\ntypes-typed-ast 1.5.6 \r\ntyping-extensions 4.2.0 \r\nvirtualenv 20.14.1 \r\nzipp 3.8.0 \r\n(venv) edreamleo@edreamleo-MS-7D09:~/mypy$ \r\n```\r\n\r\n\u003c/details>\r\n\r\nI have spent several hours trying various permutations. This report is far from the last word. To repeat, I'll be happy to run any tests that you might want.\r\n","author":{"url":"https://github.com/edreamleo","@type":"Person","name":"edreamleo"},"datePublished":"2022-05-29T13:48:27Z","url":"https://github.com/python/mypy/issues/12903"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:df367fb7-c719-c9fe-a31a-abd33734a155 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1DA:194E10:28BDB7A:379870B:6B0048B0 |
| html-safe-nonce | d781201d0184dcfd647f67c0035cbb40d8739a16d0371d8c9c358bf2f21c6b48 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMURBOjE5NEUxMDoyOEJEQjdBOjM3OTg3MEI6NkIwMDQ4QjAiLCJ2aXNpdG9yX2lkIjoiMzcxNjczMzUwMTM4NzU4OTgwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ddda7ca377d12558729a4ef213c469b6238a74c4885df2bae1555723afbd092d |
| hovercard-subject-tag | issue:1251894608 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/12903/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ebcc8cae6e3411ac41b1e59c3ea8d0efd24296dcf7f0b52b45f9d243b38f07da/python/mypy/issues/12903 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ebcc8cae6e3411ac41b1e59c3ea8d0efd24296dcf7f0b52b45f9d243b38f07da/python/mypy/issues/12903 |
| og:image:alt | Bug Report It appears that there are several missing dependencies in test-requirements.txt, including: gcc and make. Some other dependency, whose symptom is that #include |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | edreamleo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width