jupyter-server / enterprise_gateway

A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
https://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Other
617 stars 222 forks source link

Fix Makefile WHEEL_FILES list #1142

Closed kevin-bates closed 1 year ago

kevin-bates commented 1 year ago

During release build prep, I found an issue where a previous PR contained an inadvertent change to the WHEEL_FILES macro in the Makefile. This PR reverts that change and extends the macro to also ignore any directories named __pycache__.

Without this change, the following issue would occur:

make clean dist test
make clean dist
make: *** No rule to make target `enterprise_gateway/tests/__pycache__/__init__.cpython-39.pyc', needed by `dist/jupyter_enterprise_gateway-3.0.0.dev0-py3-none-any.whl'.  Stop.

That is, the second cycle of make clean dist after performing a test would pickup a .pvc file in the WHEEL_FILES macro, leading to the issue - despite the fact that the clean target explicitly removes __pycache__ directories. I suspect that the lint step of make dist is interfering somehow and creating these directories, particular since sometimes a conftest-related .pvc is displayed.