-
Notifications
You must be signed in to change notification settings - Fork 30
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
apollo_fpga: get rid of poetry
and add prompt-toolkit
dependency
#36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me this throws errors trying to find the sub-modules:
$ apollo
Traceback (most recent call last):
File "/home/mike/.local/bin/apollo", line 5, in <module>
from apollo_fpga.commands.cli import main
File "/home/mike/.local/lib/python3.10/site-packages/apollo_fpga/__init__.py", line 9, in <module>
from .jtag import JTAGChain
File "/home/mike/.local/lib/python3.10/site-packages/apollo_fpga/jtag.py", line 13, in <module>
from .support.bits import bits
ModuleNotFoundError: No module named 'apollo_fpga.support'
and it turns out the issue is that they aren't installed because the setuptools include
key is too strict. It could be solved by setting it to apollo_fpga*
instead, but I think using the packages
key is a bit cleaner:
diff --git a/pyproject.toml b/pyproject.toml
index 05e5938..82f2223 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,9 +34,8 @@ dependencies = [
[project.urls]
repository = "https://github.com/greatscottgadgets/apollo"
-[tool.setuptools.packages.find]
-where = ["."]
-include = ["apollo_fpga"]
+[tool.setuptools]
+packages = ["apollo_fpga"]
[project.scripts]
apollo = "apollo_fpga.commands.cli:main"
Thank you for catching this! Previously I only tested installing this in editable mode and the bug did not appear. I am able to reproduce this now, Edit: forget about what I said, it works. Force-pushing now. |
I tried testing this with a user pip install, replacing a previous installation. The initial uninstall worked:
Then the install worked:
But a subsequent uninstall did not:
I got the same result using a hyphen instead of an underscore:
|
My uninstall failure only happens if my working directory is the top level of the repo. We're guessing that this has to do with the way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Fixes #35.