You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #42 we no longer have a hard dependency on pyzbar. I asked the PyPA people how to handle that (possibly with extras) but it doesn't seem like require_extras supports negative requirements (which is what would be ideal here).
The other suggestion was to publish zbarcam as a mostly empty package, with a dependency on zbarcam-pyzbar, and have zbarcam-pyzbar and zbarcam-zbarlight be separate packages on PyPI. That way, if someone cares about the backend, they install the backend-specific package ; if not, they just install zbarcam as usual and get pyzbar as usual.
I'm not sure what you guys feel like would be more correct (and least problematic for existing users), so that's why I opened this issue. Let's discuss :-)
The text was updated successfully, but these errors were encountered:
I think leveraging extras_require is fine. We could make two installations possible:
pip install zbarcam[pyzbar]
pip install zbarcam[zbarlight]
Having one default backend would indeed be ideal, meaning removing the default if the other is explicitly asked. But I don't think this is currently supported indeed.
So by default we could simply have no backend selected, that's probably fine as long as it's clearly documented in the install process
Yeah, I re-thought about it - think SQLAlchemy for instance: it doesn't make any assumption about the kind of DB you're going to be connecting to. If you need to connect to pgsql, you're on your own to install psycopg2 for example. So I feel like the extras option is fine, assuming we fix the Android recipe to depend on pyzbar and the iOS one to depend on zbarlight, or something along those lines? Or maybe we could directly use the extras inside the recipes but I'm not so sure about this?
Yeah I think recipes should indeed be adapted later on, but it's a bit independent.
Feel free to make a PR with the extra and we can make a PyPI release after the merge.
Thanks for raising the discussion
Since #42 we no longer have a hard dependency on pyzbar. I asked the PyPA people how to handle that (possibly with extras) but it doesn't seem like require_extras supports negative requirements (which is what would be ideal here).
The other suggestion was to publish zbarcam as a mostly empty package, with a dependency on zbarcam-pyzbar, and have zbarcam-pyzbar and zbarcam-zbarlight be separate packages on PyPI. That way, if someone cares about the backend, they install the backend-specific package ; if not, they just install zbarcam as usual and get pyzbar as usual.
I'm not sure what you guys feel like would be more correct (and least problematic for existing users), so that's why I opened this issue. Let's discuss :-)
The text was updated successfully, but these errors were encountered: