SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.39k stars 319 forks source link

python 3.7+ embed install error #520

Closed alexsilva closed 5 years ago

alexsilva commented 5 years ago

python-3.7.4-embed-win32 Os Windows

Try to install the package with the built-in version of python result in the following error.

$ python.exe -m pip install easy-thumbnails
Collecting easy-thumbnails
  Using cached https://files.pythonhosted.org/packages/ae/37/442523964379e1076a4e9c29a89861f44e8c237fa6857e71b113cb2cb5bd/easy-thumbnails-2.6.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'E:\WebDownload\python-3.7.4-embed-win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\genio\\AppData\\Local\\Temp\\pip-install-ksdq4j94\\easy-thumbnails\\setup.py'"'"'; __file__='"'"'C:\\Users\\genio\\AppData\\Local\\Temp\\pip-install-ksdq4j94\\easy-thumbnails\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\genio\AppData\Local\Temp\pip-install-ksdq4j94\easy-thumbnails\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\genio\AppData\Local\Temp\pip-install-ksdq4j94\easy-thumbnails\setup.py", line 8, in <module>
        import easy_thumbnails
    ModuleNotFoundError: No module named 'easy_thumbnails'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Ideally not import easy_thumbnails in setup.py

jrief commented 5 years ago

Ideally not import easy_thumbnails in setup.py

this is common practice in all kind of packages, otherwise the version number can not be determined.

alexsilva commented 5 years ago

@jrief You may be correct but easy-thumbnail does not install the embedded version of python!

However the Django package installs without problems.

It would be interesting to take a look at the code and see what could improve. https://github.com/django/django/blob/master/setup.py#L61