psycopg[binary,pool] breaks s390x deployments
Deployment Type
Self-hosted
NetBox Version
v3.7.2
Python Version
3.8
Steps to Reproduce
Hello, This change in the requirements to use the binary psycopg breaks my deployment on s390x.
https://github.com/netbox-community/netbox/blob/develop/requirements.txt#L28
I modified my installation to use just psycopg[pool]==3.1.18 and it is working okay.. Is there any way that you can detect the architecture and not use the binary if it's not available?
Thanks for the awesome product, I really love netbox!
Expected Behavior
Installation of netbox works on s390x without modification to requirements.txt.
Observed Behavior
psycopg binary is unavailable for s390x architecture.
This change in the requirements to use the binary psycopg breaks my deployment on s390x.
It would help to explain what s390x is. I had to Google it.
This one took some digging. We switched to the binary package of psycopg2 waaay back in NetBox v2.3. According to #1899, this was done because the wheel packages were being renamed.
From what I can glean from pip's documentation, we might be able to replace
psycopg[binary,pool]==3.1.18
with
psycopg[pool]==3.1.18 --prefer-binary=psycopg
to install the binary package where it's available and fall back to the pure Python build where it's not. However, now I'm wondering if we should be using the C package instead.
It would help to explain what s390x is. I had to Google it.
Sorry! I'm too close to the problem, I know :D
I also wonder if the [c] option would be better.. I think this is similar to to what we had before, where we were building the psycopg2 binary every time.
We've switched to the compiled (C) package beginning with NetBox v4.0.