From 99ce59adf7a7752cac9bd725ba72ec8849f0a7f4 Mon Sep 17 00:00:00 2001 From: Serkan Hosca Date: Mon, 14 Dec 2020 10:27:57 -0500 Subject: [PATCH] Also check for dist-packages for first party apps (#21) Co-authored-by: Adam Johnson --- HISTORY.rst | 2 ++ src/django_linear_migrations/apps.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 91ca8f0..f1d8de8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,8 @@ History ======= +* Also assume modules in ``dist-packages`` are third-party apps. + 1.1.0 (2020-12-13) ------------------ diff --git a/src/django_linear_migrations/apps.py b/src/django_linear_migrations/apps.py index fa3cbc4..0aac51e 100644 --- a/src/django_linear_migrations/apps.py +++ b/src/django_linear_migrations/apps.py @@ -21,7 +21,7 @@ def ready(self): def is_first_party_app_config(app_config): # Check if it seems to be installed in a virtualenv path = Path(app_config.path) - return "site-packages" not in path.parts + return "site-packages" not in path.parts and "dist-packages" not in path.parts def first_party_app_configs():