question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failure with bdist_wheel and namespace packages

See original GitHub issue

I’m relatively inexperienced with setuptools, but I’m attempting to create a module that makes use of new-style native namespace packages. Most things work fine, including sdist - but bdist_nuitka fails with the following :

(venv) [gdude@ns348665 Sidecar]$ python setup.py bdist_nuitka
running bdist_nuitka
running build
running build_py
creating build
creating build/lib
creating build/lib/comect
creating build/lib/comect/sidecar
copying src/comect/sidecar/__init__.py -> build/lib/comect/sidecar
Traceback (most recent call last):
  File "setup.py", line 44, in <module>
    install_requires=["pygtail==0.11.0 "],
  File "/home/gdude/Comect/Sidecar/venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/setuptools/__init__.py", line 145, in setup
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/gdude/Comect/Sidecar/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 192, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/gdude/Comect/Sidecar/venv/lib/python3.7/site-packages/nuitka/distutils/bdist_nuitka.py", line 60, in run
    self._buildPackage(os.path.abspath(self.build_lib))
  File "/home/gdude/Comect/Sidecar/venv/lib/python3.7/site-packages/nuitka/distutils/bdist_nuitka.py", line 85, in _buildPackage
    assert package is None, package
AssertionError: comect

Running with -O will skip asserts, so for the hell of it I gave that a try too.

(venv) [gdude@ns348665 Sidecar]$ python -O setup.py bdist_nuitka
running bdist_nuitka
running build
running build_py
Nuitka:INFO:Recurse to import 'comect.sidecar' from 'comect/sidecar'. (Module is exact match of 'comect.sidecar' instructed by user to recurse to.)
Nuitka:INFO:Recurse to import 'comect' from 'comect'. (Containing package of recursed module 'comect.sidecar'.)
Nuitka:INFO:Included compiled module 'comect'.
Nuitka:INFO:Included compiled module 'comect.sidecar'.
Nuitka:INFO:Included compiled module 'sidecar'.
error: [Errno 2] No such file or directory: '/home/gdude/Comect/Sidecar/build/lib/comect.sidecar'

This results in the following file structure:

Screenshot of build/ directory

It looks to me like a simple enough issue, but I’m not 100% sure whether I’m doing something wrong. Any ideas?


Environment details

Python: 3.7.3 Nuitka: 0.6.4 (Installed with pip into a virtualenv) Platform: Arch Linux, x86_64


Example code can be found at this commit - this is the actual project I’m working with.

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Dec 27, 2019

Released as part of 0.6.6

1reaction
kayhayencommented, Dec 27, 2019

We close issues when it’s in a stable release, this is “Done” in planning though, this way people with the same issue, can tell that it’s not in there yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyPI packaging, namespace packages and subpackaging ...
My problem: Whenever I use python setup.py sdist bdist_wheel , it generates the full ofunctions package and a package for each subpackage, but:....
Read more >
Failure with bdist_wheel and namespace packages
I'm relatively inexperienced with setuptools, but I'm attempting to create a module that makes use of new-style native namespace packages.
Read more >
Packaging namespace packages
If any distribution does not, it will cause the namespace logic to fail and the other sub-packages will not be importable.
Read more >
Features — PyScaffold 3.0.3 documentation
Optionally, namespace packages can be used, if you are planning to distribute a larger package as a collection of smaller ones. For example,...
Read more >
Python Setup Tools - sdist bdist and wheel and push toPyPI
Build Python sdist, bdist and wheel distribution packages using ... the package - the outcome is a "dotted" namespace with the package name ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found