-
Notifications
You must be signed in to change notification settings - Fork 2
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
Failed installation: setup.py import assumes deps already installed #37
Comments
Thanks for creating this issue. Could you please share the version of Python and the command used to install |
Hi there. We tried both with latest Python 3.8 and latest 3.9 and the exact command was |
Thanks for the information. We've released a new version (3.2.0) following your suggestions. Could you please give it a try and let me know if it works as you expect? |
Thank you for such an amazingly quick response. We've queued the upgrade but upon local testing it looks good to me. I'll hopefully report back tomorrow with good news! |
@dfernandez-at-wiris Just a quick message to check if everything is OK on your side. |
Hi @lpellegr. Apologies for the delay, we have been making absolutely sure everything is okay on our end across a couple of projects. I can confirm now that the issue seems to be completely gone, both locally and in our CI servers. Thanks again for the quick response time and following up on us, we really appreciate it :) |
Great. Thanks for the update. |
When installing ipregistry 2.0.0 in our CI server we get the following errors:
The reason seems to be that setup.py imports from the module (
from ipregistry import __version__
). This import in turn causes__init__.py
to run several other imports, basically trying to import all of its dependencies, like thatimport abc, six
you see above. Because the deps are not yet installed, the whole process fails. This all happens before the installation begins.In our case, this was solved by manually installing ALL dependencies in our CI server before beginning the build process (and in our local dev environment for development). This is not only quite inconvenient, but could cause dependency problems in monorepo-style projects.
A suggestion for a simple and quick fix would be to store the
__version__
variable in a separate version.py. This way__init__.py
would import from it and setup.py would not require importing all dependencies of the (yet to install) package.Additionally, the reason we are using version ipregistry 2.0.0 is that requirements are very strict (all are
==
), which means that our dependency management tool (poetry) won't be able to find a compatible combination of dependency versions with the other packages we're using. Seeing as this package is seldomly updated and its dependencies are a few, fairly stable packages like requests, I'd suggest relaxing those requirements to allow for patches or even minor version upgrades (e.g.requests>=2.22.0,<3
).The text was updated successfully, but these errors were encountered: