You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/07/21 15:59:35 UTC

[airflow] 01/02: Fix asset compilation via setup.py (#25201)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit d8ed1975f2f5c7265a8fbaa3c0802f84f04dd61a
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Wed Jul 20 23:06:16 2022 +0200

    Fix asset compilation via setup.py (#25201)
    
    Asset compilation via setup.py has been broken in #25169.
    
    This PR fixes it.
    
    (cherry picked from commit c3763f3be5245af8f2c13d89db648e67bad8c680)
---
 setup.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 6447281e5d..3eb2673042 100644
--- a/setup.py
+++ b/setup.py
@@ -109,7 +109,9 @@ class CompileAssets(Command):
 
     def run(self) -> None:
         """Run a command to compile and build assets."""
-        subprocess.check_call('./airflow/www/compile_assets.sh')
+        www_dir = AIRFLOW_SOURCES_ROOT / "airflow" / "www"
+        subprocess.check_call(['yarn', 'install', '--frozen-lockfile'], cwd=str(www_dir))
+        subprocess.check_call(['yarn', 'run', 'build'], cwd=str(www_dir))
 
 
 class ListExtras(Command):