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

HOTFIX: Explicitly list subpackages #530

Merged

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented Dec 10, 2019

In #528, we added subpackages. However, they can't always be imported. When the list of packages only included 'web_monitoring', you could import our new subpackages (e.g. web_monitoring.diff) from installations that were created via setup.py develop, but not setup.py install or when installed via pip. Not good!

This explicitly lists the new packages. An alternative would be to add __init__.py files to all of them and, in setup.py, use:

setup(name='web_monitoring',
      ...
      packages=setuptools.find_packages(include=['web_monitoring','web_monitoring.*'])
     )

I’m going ahead and merging as-is so other projects that depend on this are unblocked, but will change to the above alternative if we think that’s better in the long run, @danielballan.

@Mr0grog Mr0grog force-pushed the 528-subpackages-are-not-quite-exactly-externally-visible branch from e06c8b3 to 5a9e006 Compare December 10, 2019 21:21
When the list of packages only included 'web_monitoring', you could import our new subpackages (e.g. `web_monitoring.diff`) from installations that were created via `setup.py develop`, but not `setup.py install` or when installed via pip. Not good!
@Mr0grog Mr0grog changed the title Explicitly list subpackages HOTFIX: Explicitly list subpackages Dec 10, 2019
@Mr0grog Mr0grog merged commit 8ee25b6 into master Dec 10, 2019
@Mr0grog Mr0grog deleted the 528-subpackages-are-not-quite-exactly-externally-visible branch December 10, 2019 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant