From b93e1e55705f1a1fd92879da9675bbe5bbbe308a Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 27 Jul 2022 12:44:18 +0200 Subject: [PATCH] chore: install local python deps in editable mode --- analyzer/Makefile | 4 +++- analyzer/setup.py | 1 - api-client/Makefile | 4 +++- api-client/setup.py | 1 - api/Makefile | 4 +++- api/setup.py | 1 - playout/Makefile | 5 ++++- playout/setup.py | 2 -- tools/python.mk | 1 - worker/Makefile | 4 +++- worker/setup.py | 4 +--- 11 files changed, 17 insertions(+), 14 deletions(-) diff --git a/analyzer/Makefile b/analyzer/Makefile index 9b5748b15..dac8bea12 100644 --- a/analyzer/Makefile +++ b/analyzer/Makefile @@ -2,7 +2,9 @@ all: lint test include ../tools/python.mk -PIP_INSTALL := --editable .[dev] +PIP_INSTALL := \ + --editable ../shared \ + --editable .[dev] PYLINT_ARG := libretime_analyzer tests || true MYPY_ARG := libretime_analyzer tests || true BANDIT_ARG := libretime_analyzer || true diff --git a/analyzer/setup.py b/analyzer/setup.py index 021d4aa80..c2deb4393 100644 --- a/analyzer/setup.py +++ b/analyzer/setup.py @@ -36,7 +36,6 @@ setup( "dev": [ "distro", "types-requests", - f"libretime-shared @ file://localhost{here.parent / 'shared'}", ], }, zip_safe=False, diff --git a/api-client/Makefile b/api-client/Makefile index 35f8155fb..ec82ad095 100644 --- a/api-client/Makefile +++ b/api-client/Makefile @@ -2,7 +2,9 @@ all: lint test include ../tools/python.mk -PIP_INSTALL := --editable .[dev] +PIP_INSTALL := \ + --editable ../shared \ + --editable .[dev] PYLINT_ARG := libretime_api_client tests || true MYPY_ARG := libretime_api_client tests || true BANDIT_ARG := libretime_api_client || true diff --git a/api-client/setup.py b/api-client/setup.py index 193c91b87..b94ddd0cf 100644 --- a/api-client/setup.py +++ b/api-client/setup.py @@ -29,7 +29,6 @@ setup( "dev": [ "requests-mock", "types-requests", - f"libretime-shared @ file://localhost{here.parent / 'shared'}", ], }, zip_safe=False, diff --git a/api/Makefile b/api/Makefile index 2d1b73c4b..9070f007f 100644 --- a/api/Makefile +++ b/api/Makefile @@ -2,7 +2,9 @@ all: lint include ../tools/python.mk -PIP_INSTALL := --editable .[dev] +PIP_INSTALL := \ + --editable ../shared \ + --editable .[dev] PYLINT_ARG := libretime_api MYPY_ARG := libretime_api BANDIT_ARG := --exclude '*/tests/*' libretime_api || true diff --git a/api/setup.py b/api/setup.py index 70f54b841..c40a3e752 100644 --- a/api/setup.py +++ b/api/setup.py @@ -50,7 +50,6 @@ setup( "pylint-django", "pytest-django", "requests-mock", - f"libretime-shared @ file://localhost/{here.parent / 'shared'}#egg=libretime_shared", ], }, ) diff --git a/playout/Makefile b/playout/Makefile index c5c530cd6..b68236111 100644 --- a/playout/Makefile +++ b/playout/Makefile @@ -2,7 +2,10 @@ all: lint include ../tools/python.mk -PIP_INSTALL := --editable .[dev] +PIP_INSTALL := \ + --editable ../api-client \ + --editable ../shared \ + --editable .[dev] PYLINT_ARG := libretime_playout tests || true MYPY_ARG := libretime_playout tests || true BANDIT_ARG := libretime_playout || true diff --git a/playout/setup.py b/playout/setup.py index 5cc6686b3..fbd89c092 100644 --- a/playout/setup.py +++ b/playout/setup.py @@ -41,8 +41,6 @@ setup( "dev": [ "distro", "requests-mock", - f"libretime-api-client @ file://localhost{here.parent / 'api-client'}", - f"libretime-shared @ file://localhost{here.parent / 'shared'}", ], }, zip_safe=False, diff --git a/tools/python.mk b/tools/python.mk index 77ceb0f03..343fa1df0 100644 --- a/tools/python.mk +++ b/tools/python.mk @@ -31,7 +31,6 @@ install: $(VENV) source $(VENV)/bin/activate pip install --upgrade pip setuptools wheel pip install $(SHARED_DEV_REQUIREMENTS) - pip cache remove 'libretime_*' [[ -z "$(PIP_INSTALL)" ]] || pip install $(PIP_INSTALL) .PHONY: .format diff --git a/worker/Makefile b/worker/Makefile index c33ce5f2b..88e3fafd7 100644 --- a/worker/Makefile +++ b/worker/Makefile @@ -2,7 +2,9 @@ all: lint include ../tools/python.mk -PIP_INSTALL := --editable .[dev] +PIP_INSTALL := \ + --editable ../shared \ + --editable .[dev] PYLINT_ARG := libretime_worker || true MYPY_ARG := libretime_worker || true BANDIT_ARG := libretime_worker || true diff --git a/worker/setup.py b/worker/setup.py index 0852b1be4..2472a788a 100644 --- a/worker/setup.py +++ b/worker/setup.py @@ -28,9 +28,7 @@ setup( "requests>=2.25.1,<2.29", ], extras_require={ - "dev": [ - f"libretime-shared @ file://localhost{here.parent / 'shared'}", - ], + "dev": [], }, zip_safe=False, )