victordomingos / optimize-images

A command-line interface (CLI) utility written in pure Python to help you reduce the file size of images.
https://no-title.victordomingos.com/projects/optimize-images
MIT License
269 stars 49 forks source link

Specify Pillow as requirement in setup.py? #2

Closed vascowhite closed 6 years ago

vascowhite commented 6 years ago

PIL hasn't been updated since 2009, whereas pillow is under active development.

I think it would be a good idea to change, especially as you are using Python >= 3.6. I can put in a pull request if you wish.

This is a nice little utility which has saved me writing my own :) Thanks.

vascowhite commented 6 years ago

I just realised that you intend Pillow to be used. I installed into a virtualenv using Pipenv and got an error that PIL wasn't installed, so I raised this issue. Do you think it would be better to put a requirement for pillow in setup.py? You already have piexif there, so I don't understand why Pillow isn't.

victordomingos commented 6 years ago

I guess the current setup.py may be improved. I have two separate requirements files, one for desktop and another for iOS/Pythonista. In Pythonista, you already have Pillow, and the bundled version cannot be upgraded, so it’s not included as a requirement for iOS.

I will see if I can improve setup.py to make it a bit more clear and implement a more straightforward installation process.

vascowhite commented 6 years ago

I guess I wasn't thinking of the iOS part, it makes sense why you've done it that way now. I think I was confused by the error message refering to PIL rather than Pillow. If I had installed globally rather than into a virtualenv I wouldn't have seen any error as I have Pillow installed.

victordomingos commented 6 years ago

I have just added some details to the setup.py file. If all works as it should, doing a pip install should select and install the correct Pillow version if it’s not running on iOS.