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.

With declarative config, error "Distribution contains no modules or packages for namespace package"

See original GitHub issue

Attempting to use declarative config for jaraco.itertools, I ran the tests here, and everything looks good except if you inspect the environment, a crucial file is missing, the site-packages/jaraco.itertools-nspkg.pth file.

I tried restoring the namespace package functionality in jaraco/jaraco.itertools@c436dff, but that resulted in this error during the build:

cmdargs: ['/Users/jaraco/code/main/jaraco.itertools/.tox/python/bin/python', '-m', 'pip', 'install', '-e', '/Users/jaraco/code/main/jaraco.itertools[testing]']

Obtaining file:///Users/jaraco/code/main/jaraco.itertools
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
    Complete output from command python setup.py egg_info:
    error in setup command: Distribution contains no modules or packages for namespace package 'jaraco'

I suspect a race condition where the packages discovered by packages= find: aren’t found until after namespace_packages is processed. I suspect the solution is to add support for namespace_packages in declarative config.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pgansslecommented, Oct 25, 2018

A race condition? Are we doing this stuff in parallel, or do you just mean that the order is not fixed and sometimes they happen in the wrong order?

0reactions
jaracocommented, Jan 23, 2021

I’ve moved the commits from aforementioned repo to this repo here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dockerfile build image error: Distribution contains no modules ...
It's a namespace package. I'm having this error when building docker image of this python project. I can pretty much install everything with...
Read more >
Packaging namespace packages
Namespace packages allow you to split the sub-packages and modules within a single package across multiple, separate distribution packages (referred to as ...
Read more >
Configuring setuptools using setup.cfg files
Setuptools allows using configuration files (usually setup.cfg ) to define a package's metadata and other options that are normally supplied to the setup() ......
Read more >
How to Publish an Open-Source Python Package to PyPI
The Python Packaging Index (PyPI) came online in 2003, ... If you want to run a built-in module without -m , then you'll...
Read more >
I don't need `__init__.py`? PEP 420 and namespace ...
today I talk about namespace packages, what PEP 420 is, and why I don't use namespace packagesplaylist: ...
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