Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to python-buster for manylinux wheel (mypy -> typed_ast) support? #8

Closed
jbooth-mastery opened this issue Nov 6, 2019 · 2 comments · Fixed by #11
Closed

Switch to python-buster for manylinux wheel (mypy -> typed_ast) support? #8

jbooth-mastery opened this issue Nov 6, 2019 · 2 comments · Fixed by #11
Labels

Comments

@jbooth-mastery
Copy link

The choice to use alpine in the build image makes using mypy somewhere between difficult to impossible.

$ docker run --rm -it python:3.8.0-alpine3.10 pip install mypy
Collecting mypy
  Downloading https://files.pythonhosted.org/packages/f8/11/9b81379e84b066ee6f1b906b00a35220f15e0fcd87307c50768382d9e831/mypy-0.740-py3-none-any.whl (1.7MB)
     |████████████████████████████████| 1.7MB 919kB/s 
Collecting typing-extensions>=3.7.4
  Downloading https://files.pythonhosted.org/packages/03/92/705fe8aca27678e01bbdd7738173b8e7df0088a2202c80352f664630d638/typing_extensions-3.7.4.1-py3-none-any.whl
Collecting mypy-extensions<0.5.0,>=0.4.0
  Downloading https://files.pythonhosted.org/packages/5c/eb/975c7c080f3223a5cdaff09612f3a5221e4ba534f7039db34c35d95fa6a5/mypy_extensions-0.4.3-py2.py3-none-any.whl
Collecting typed-ast<1.5.0,>=1.4.0
  Downloading https://files.pythonhosted.org/packages/34/de/d0cfe2ea7ddfd8b2b8374ed2e04eeb08b6ee6e1e84081d151341bba596e5/typed_ast-1.4.0.tar.gz (206kB)
     |████████████████████████████████| 215kB 1.9MB/s 
Building wheels for collected packages: typed-ast
  Building wheel for typed-ast (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-no1222u2/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-no1222u2/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_59ecc5c --python-tag cp38
       cwd: /tmp/pip-install-no1222u2/typed-ast/
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/typed_ast
  copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.8/typed_ast
  copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.8/typed_ast
  copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.8/typed_ast
  copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.8/typed_ast
  package init file 'ast3/tests/__init__.py' not found (or not a regular file)
  creating build/lib.linux-x86_64-3.8/typed_ast/tests
  copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-3.8/typed_ast/tests
  running build_ext
  building '_ast27' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/ast27
  creating build/temp.linux-x86_64-3.8/ast27/Parser
  creating build/temp.linux-x86_64-3.8/ast27/Python
  creating build/temp.linux-x86_64-3.8/ast27/Custom
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -Iast27/Include -I/usr/local/include/python3.8 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for typed-ast

vs a simple python(-buster) where the wheels work:

$ docker run --rm -it python pip install mypy
Collecting mypy
  Downloading https://files.pythonhosted.org/packages/77/96/6de3a8bb7441550361fedf9b43c45557e10246cff23ca3fac65e4acf20c1/mypy-0.740-cp38-cp38-manylinux1_x86_64.whl (23.9MB)
     |████████████████████████████████| 23.9MB 1.1MB/s 
Collecting typed-ast<1.5.0,>=1.4.0
  Downloading https://files.pythonhosted.org/packages/f2/4f/2f98f0c6929a725ba22c750838a4424be5053d8fc76f0f018424ebecc62e/typed_ast-1.4.0-cp38-cp38-manylinux1_x86_64.whl (768kB)
     |████████████████████████████████| 778kB 1.5MB/s 
Collecting mypy-extensions<0.5.0,>=0.4.0
  Downloading https://files.pythonhosted.org/packages/5c/eb/975c7c080f3223a5cdaff09612f3a5221e4ba534f7039db34c35d95fa6a5/mypy_extensions-0.4.3-py2.py3-none-any.whl
Collecting typing-extensions>=3.7.4
  Downloading https://files.pythonhosted.org/packages/03/92/705fe8aca27678e01bbdd7738173b8e7df0088a2202c80352f664630d638/typing_extensions-3.7.4.1-py3-none-any.whl
Installing collected packages: typed-ast, mypy-extensions, typing-extensions, mypy
Successfully installed mypy-0.740 mypy-extensions-0.4.3 typed-ast-1.4.0 typing-extensions-3.7.4.1

Would you consider a switch to the standard python image?

abatilo added a commit that referenced this issue Nov 19, 2019
This change introduces variables for allowing you to set whatever
versions of Python and poetry you'd like to install. You set these using
the GitHub Actions `with` block, where you can set `python_version` and
`poetry_version`. There are defaults listed in the action.yml. We are
considering letting those defaults automatically go lookup the latest
versions of python and/or poetry. This is as opposed to the previous
behavior which would only run the latest version of Python, and the
latest version of poetry.

At the same time, we've switched off using Alpine as this has been a
popular request.

Fixes #8
Fixes #9
Fixes #10
abatilo added a commit that referenced this issue Nov 19, 2019
This change introduces variables for allowing you to set whatever
versions of Python and poetry you'd like to install. You set these using
the GitHub Actions `with` block, where you can set `python_version` and
`poetry_version`. There are defaults listed in the action.yml. We are
considering letting those defaults automatically go lookup the latest
versions of python and/or poetry. This is as opposed to the previous
behavior which would only run the latest version of Python, and the
latest version of poetry.

At the same time, we've switched off using Alpine as this has been a
popular request.

Fixes #8
Fixes #9
Fixes #10
abatilo added a commit that referenced this issue Nov 19, 2019
* feat: support setting of python and poetry versions

This change introduces variables for allowing you to set whatever
versions of Python and poetry you'd like to install. You set these using
the GitHub Actions `with` block, where you can set `python_version` and
`poetry_version`. There are defaults listed in the action.yml. We are
considering letting those defaults automatically go lookup the latest
versions of python and/or poetry. This is as opposed to the previous
behavior which would only run the latest version of Python, and the
latest version of poetry.

At the same time, we've switched off using Alpine as this has been a
popular request.

Fixes #8
Fixes #9
Fixes #10

* update ci to pass in versions

* run matrix for testing multiple versions
@github-actions
Copy link

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@jbooth-mastery
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant