Build Nuitka'd wheel file using poetry not working
See original GitHub issueNew feature introduced from issue #1285
Nuitka version - 0.6.18.1 Windows 10 Python 3.6.8 - installed using choco - choco install python3 --version 3.6.8 nuitka installed using pip poetry version 1.1.12 - installed using their install_poetry.py script. I also tried version 1.2.0a2 installed using their --preview option C:\python36\Scripts - added to windows PATH. I can call nuitka and poetry directly from cmd line
nuitka --version 0.6.18.1 Commercial: None Python: 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] Flavor: Unknown Executable: C:\Python36\python.exe OS: Windows Arch: x86_64
python -m pip freeze --all (only relevant packages copied here) Cython==0.29.25 Nuitka==0.6.18.1 wheel==0.37.0 setuptools==59.5.0
When running “poetry build -f wheel” it still builds open source wheel files.
poetry build -f wheel
Building hello-world-example (0.1.0)
- Building wheel
- Built hello_world_example-0.1.0-py3-none-any.whl
Using 7z to look inside the whl file shows the open source original py files
I tried having nuitka installed in my global site packages and in the poetry venv - poetry install. I even tried adding a print(“BLAH BLAH”) to the nuitka.distutils.Build file (both global and venv) and that doesn’t get printed.
Hello World example
src
hello_world.py - contains only print(‘Hello World’)
pyproject.toml
[tool.poetry]
version = "0.1.0"
name = "hello-world-example"
description = "Hello places and things"
packages = [
{include = "src" },
]
keywords = [
"Hello",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: Other/Proprietary License",
"Operating System :: OS Independent"
]
authors = ["Hello World <hello@world.com>"]
homepage = "https://www.helloworld.com"
[tool.poetry.dependencies]
python = "3.6.8"
[tool.poetry.dev-dependencies]
nuitka = "0.6.18.1"
[build-system]
requires = ["setuptools>=42", "wheel", "nuitka"]
build-backend = "nuitka.distutils.Build"
[virtualenvs]
create = true
in-project = true
nuitka --onefile src\hello_world.py Creates hello_world.exe which works as expected
Building a compiled whl using Nuitka would be fantastic and I appreciate you implementing this. Hopefully this is just a case of under-documentation and the fault is on my end but the Use Case 5 description seemed pretty straight forward.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Update on the poetry issue. It has been closed Quote
It looks like poetry only builds poetry wheel files - BUT - the pyproject.toml can be used by other tools to build a wheel file - e.g. https://github.com/pypa/build - which do honor the build-backend content
I also realized that non-existent requires as well as non-existent build-backend are not checked. I opened issue https://github.com/python-poetry/poetry/issues/4871 with them. I appreciate you looking at this so quickly. I think it must be on their end as well.