|
@@ -9,7 +9,7 @@
|
|
|
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
# specific language governing permissions and limitations under the License.
|
|
|
|
|
|
-import subprocess
|
|
|
+import os
|
|
|
import sys
|
|
|
from pathlib import Path
|
|
|
|
|
@@ -20,11 +20,14 @@ def build_gui(root_path: Path):
|
|
|
if already_exists:
|
|
|
print(f'Found taipy-gui frontend bundle in {root_path / "taipy" / "gui" / "webapp"}.')
|
|
|
else:
|
|
|
- subprocess.run(["npm", "ci"], cwd=root_path / "frontend" / "taipy-gui" / "dom", check=True, shell=True)
|
|
|
- subprocess.run(
|
|
|
- ["npm", "ci", "--omit=optional"], cwd=root_path / "frontend" / "taipy-gui", check=True, shell=True
|
|
|
- )
|
|
|
- subprocess.run(["npm", "run", "build"], cwd=root_path / "frontend" / "taipy-gui", check=True, shell=True)
|
|
|
+ # does not work in GH Action :-(
|
|
|
+ # subprocess.run(["npm", "ci"], cwd=root_path / "frontend" / "taipy-gui" / "dom", check=True, shell=True)
|
|
|
+ os.system(f'cd {root_path / "frontend" / "taipy-gui" / "dom"}; npm ci')
|
|
|
+ # subprocess.run(
|
|
|
+ # ["npm", "ci", "--omit=optional"], cwd=root_path / "frontend" / "taipy-gui", check=True, shell=True
|
|
|
+ # )
|
|
|
+ # subprocess.run(["npm", "run", "build"], cwd=root_path / "frontend" / "taipy-gui", check=True, shell=True)
|
|
|
+ os.system(f'cd {root_path / "frontend" / "taipy-gui"}; npm ci --omit=optional && npm run build')
|
|
|
|
|
|
|
|
|
def build_taipy(root_path: Path):
|
|
@@ -38,8 +41,9 @@ def build_taipy(root_path: Path):
|
|
|
if not env_file_path.exists():
|
|
|
with open(env_file_path, "w") as env_file:
|
|
|
env_file.write(f"TAIPY_GUI_DIR={root_path}\n")
|
|
|
- subprocess.run(["npm", "ci"], cwd=root_path / "frontend" / "taipy", check=True, shell=True)
|
|
|
- subprocess.run(["npm", "run", "build"], cwd=root_path / "frontend" / "taipy", check=True, shell=True)
|
|
|
+ # subprocess.run(["npm", "ci"], cwd=root_path / "frontend" / "taipy", check=True, shell=True)
|
|
|
+ # subprocess.run(["npm", "run", "build"], cwd=root_path / "frontend" / "taipy", check=True, shell=True)
|
|
|
+ os.system(f'cd {root_path / "frontend" / "taipy"}; npm ci && npm run build')
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|