enthought / edge-examples

Example applications and related documentation for Edge
1 stars 0 forks source link

Add setuptools dependency to Minimal example #76

Closed carlosdtrejo closed 8 months ago

carlosdtrejo commented 8 months ago

Minimal Example Preflight Test Error:

Starting app
Traceback (most recent call last):
  File "/home/app/.edm/envs/edm/bin/gunicorn", line 8, in <module>
    from gunicorn.app.wsgiapp import run
  File "/home/app/.edm/envs/edm/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 9, in <module>
    from gunicorn.app.base import Application
  File "/home/app/.edm/envs/edm/lib/python3.8/site-packages/gunicorn/app/base.py", line 11, in <module>
    from gunicorn import util
  File "/home/app/.edm/envs/edm/lib/python3.8/site-packages/gunicorn/util.py", line 26, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

The pkg_resource in setuptools is marked as deprecated now (see setuptools).

gunicorn introduced a fix for this in version "21.0.0" (see https://github.com/benoitc/gunicorn/pull/2963). However, the latest version currently provided by EDM is "20.0.4-2".

It's also worth noting that both React and Plotly Dash Examples add setuptools as a dependency when building the Docker image, compared to the Minimal Example which just adds "flask", "gunicorn" and "enthought_edge" as dependencies. By adding setuptools to the Minimal app dependencies the gunicorn package is able to utilize a working version of setuptools addressing the failing test.