Files
speckle-qgis-v3/plugin_utils/patch_requirements.py
T
Jedd Morgan aa66061925 Add CI workflow (#30)
* Create release.yml

* return patch requirements

* First pass implementing QGIS github actions

* Poetry export plugin

* Added poetry install

* rename repo

* Pinned CI python version to 3.11

* Added comment

* Added gitversion

* Add bash script

* Add bash script as executable

* change action to run sh

* build was gitignored

* Added dotnet tool manifest

* continue on error false

* dummy tag

* Revert "dummy tag"

This reverts commit b10fdf3035.

* fix version and workflow name (#25)

* Revert "dummy tag"

This reverts commit b10fdf3035.

* remove env

* trigger wrong workflow(just to check version)

* Revert "trigger wrong workflow(just to check version)"

This reverts commit 21958d40c7.

* updates

* Changed zip name to match slug

* don't need to setup .net on a machine that already has it

* rename zip instead

* restructed zip

* remove extra input

* add outputs

* rename outputs

---------

Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
Co-authored-by: KatKatKateryna <kateryna@speckle.systems>
2025-02-26 14:54:33 +00:00

25 lines
741 B
Python

def main():
"""Removes Python version and OS from Requirements.txt"""
req_file = "plugin_utils/requirements.txt"
with open(req_file, "r") as file:
lines = file.readlines()
new_lines = []
for i, line in enumerate(lines):
new_line = line.split(";")[0].replace(" ", "")
if "[" in new_line and "]" in new_line:
new_line = new_line.split("[")[0] + new_line.split("]")[1]
if i < len(lines) - 1:
new_line += "\n"
new_lines.append(new_line)
with open(req_file, "w") as file:
file.writelines(new_lines)
print("Requirements file overwritten")
file.close()
if __name__ == "__main__":
main()