Skip to content

Add empty init files to inner modules so setuptools recognises them#5

Merged
PerfectChaos merged 1 commit intoadd-aosm-extensionfrom
chaos/fixpackages
May 16, 2023
Merged

Add empty init files to inner modules so setuptools recognises them#5
PerfectChaos merged 1 commit intoadd-aosm-extensionfrom
chaos/fixpackages

Conversation

@PerfectChaos
Copy link
Copy Markdown
Collaborator

@PerfectChaos PerfectChaos commented May 16, 2023

After installing from the packaged wheel, any attempts to use commands beneath the top level "aosm" currently fail, because the submodules can't be found within the extension. This includes help commands:

developer@Ephemera:~$ az aosm definition --help
The command failed with an unexpected error. Here is the traceback:
No module named 'azext_aosm.generate_nfd'

A lengthy stack trace also follows, but the key thing here is that generate_nfd is not found within azext_aosm.

This is because when building the list of packages to include we use setuptools, specifically the find_packages() function, which doesn't recognise this as a valid submodule because it lacks an __init__.py. The same is true of other modules within the extension, this just happens to be the one we hit first.

@PerfectChaos PerfectChaos merged commit 0b1266f into add-aosm-extension May 16, 2023
@PerfectChaos PerfectChaos deleted the chaos/fixpackages branch May 16, 2023 14:17
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