Skip to content

changes for package instead of module #57

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

Merged
merged 2 commits into from
May 30, 2023

Conversation

FoamyGuy
Copy link
Contributor

I think this should resolve: #56

I found these places to change by looking at the TODOs in a fresh cookie cutter library.

The release_gh.yml one I am less sure about. There was a TODO for it in the new template, but the released mpy files in this repo seem to have been generated correctly even without this change so I'm not sure whether it's actually needed here or not.

@FoamyGuy
Copy link
Contributor Author

I did confirm with python -m pip install . inside the repo at this branch I am now able to successfully import the module after installing it that way, and continue on with the build process of the other library that requires this one.

@@ -17,3 +17,4 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
upload-url: ${{ github.event.release.upload_url }}
package-prefix: adafruit_httpserver
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really only used for unconventionally named libraries like asyncio which use import names that don't begin with adafruit_. Forcing it like this achieves the same thing down the line as leaving it out, hence how the mpy files are still gathered correctly as you mentioned - so there's no need for it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this one with the latest commit.

@tekktrik
Copy link
Member

I do intend to add a check to the build CI that checks whether a library should be a module or package and sees whether it is correctly labelled as such: adafruit/workflows-circuitpython-libs#22

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Good catch, and thanks for the fix!

@tekktrik tekktrik merged commit 8165933 into adafruit:main May 30, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 30, 2023
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.

PyPi Release not importable
2 participants