mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
410 stars 76 forks source link

pypng is an unlisted dependency #65

Open rpdelaney opened 6 years ago

rpdelaney commented 6 years ago

Pretty much the subject.

I installed this with pip3 install --user pyqrcode but got hit with module not found on line 1266 of builder.py: import png. The comments to that file state that pypng is required, so I installed that the same way I installed pyqrcode and now it works.

agroszer commented 5 years ago

Is this intentional? Just add pypng to setup.py install_requires please

heuer commented 5 years ago

We discussed it in the past since I wanted pypng as requirement but Michael said PNG is just one serialization format and wanted to keep it as optional dependency because all other formats work without further dependencies.

It's listed in the setup an extra:

 extras_require = {
   'PNG':  ["pypng>=0.0.13"],

},

To cut a long story short: Yes, it is intentional. ;)

agroszer commented 5 years ago

ok, thx

rpdelaney commented 5 years ago

Optional is fine, but we should consider handling the ImportError, perhaps with a more user-friendly message.

heuer commented 5 years ago

I agree, anyway we cannot do anything about it; see https://github.com/mnooner256/pyqrcode/issues/52

And without solving https://github.com/pypa/warehouse/issues/4121 I am not in the mood to invest any more energy into this project.