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:26:36 UTC

[airflow] branch v2-3-test updated: 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


The following commit(s) were added to refs/heads/v2-3-test by this push:
     new daf7397c34 Fix asset compilation via setup.py (#25201)
daf7397c34 is described below

commit daf7397c342895b396be5f2c64e81cbdd7e87355
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):