|
@@ -1,3 +1,14 @@
|
|
|
+# Copyright 2021-2024 Avaiga Private Limited
|
|
|
+#
|
|
|
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
|
|
|
+# the License. You may obtain a copy of the License at
|
|
|
+#
|
|
|
+# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
+#
|
|
|
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
|
|
|
+# 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 os
|
|
|
import sys
|
|
|
from typing import Dict
|
|
@@ -8,7 +19,7 @@ BASE_PATH = "./tools/packages"
|
|
|
def __build_taipy_package_line(line: str, version: str, publish_on_py_pi: bool) -> str:
|
|
|
_line = line.strip()
|
|
|
if publish_on_py_pi:
|
|
|
- return f"{_line}=={version}"
|
|
|
+ return f"{_line}=={version}\n"
|
|
|
return f"{_line} @ https://github.com/Avaiga/taipy/releases/download/{version}/{version}.tar.gz\n"
|
|
|
|
|
|
|
|
@@ -21,7 +32,7 @@ def update_setup_requirements(package: str, versions: Dict, publish_on_py_pi: bo
|
|
|
line = __build_taipy_package_line(line, v, publish_on_py_pi)
|
|
|
lines.append(line)
|
|
|
|
|
|
- with open(_path, 'w') as file:
|
|
|
+ with open(_path, "w") as file:
|
|
|
file.writelines(lines)
|
|
|
|
|
|
|
|
@@ -34,6 +45,6 @@ if __name__ == "__main__":
|
|
|
"taipy-rest": sys.argv[5],
|
|
|
"taipy-templates": sys.argv[6],
|
|
|
}
|
|
|
- _publish_on_py_pi = bool(sys.argv[7])
|
|
|
+ _publish_on_py_pi = True if sys.argv[7] == "true" else False
|
|
|
|
|
|
update_setup_requirements(_package, _versions, _publish_on_py_pi)
|