From 6f70196a6c1e1c3123079dcf8d74b099558a38e2 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 26 Jul 2024 20:01:58 +1000 Subject: [PATCH] Make IfcConvert downloads also come consistently from github releases --- src/blenderbim/Makefile | 1 - src/ifcopenshell-python/docs/conf.py | 11 +++++++++-- .../docs/ifcconvert/installation.rst | 16 +++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index f1e4f1a01f..2d280088f4 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -96,7 +96,6 @@ OLD:=c18e4ea bump: cd . && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile cd ../ifcopenshell-python/ && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile - cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) -b "s/$(OLD)/$(NEW)/" installation.rst .PHONY: dist dist: diff --git a/src/ifcopenshell-python/docs/conf.py b/src/ifcopenshell-python/docs/conf.py index bfdb4219cc..6dbb9d6b07 100644 --- a/src/ifcopenshell-python/docs/conf.py +++ b/src/ifcopenshell-python/docs/conf.py @@ -48,14 +48,21 @@ with open(os.path.join(cwd, "..", "..", "..", "VERSION"), "r") as f: from docutils import nodes -def versioned_link_role(name, rawtext, text, lineno, inliner, options={}, content=[]): +def ios_python_url(name, rawtext, text, lineno, inliner, options={}, content=[]): url = f"https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcopenshell-python-{release}/ifcopenshell-python-{release}-{text}.zip" node = nodes.reference(rawtext, text, refuri=url, **options) return [node], [] +def ifcconvert_url(name, rawtext, text, lineno, inliner, options={}, content=[]): + url = f"https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcconvert-{release}/ifcconvert-{release}-{text}.zip" + node = nodes.reference(rawtext, text, refuri=url, **options) + return [node], [] + + def setup(app): - app.add_role("ios_python_url", versioned_link_role) + app.add_role("ios_python_url", ios_python_url) + app.add_role("ifcconvert_url", ifcconvert_url) # -- General configuration --------------------------------------------------- diff --git a/src/ifcopenshell-python/docs/ifcconvert/installation.rst b/src/ifcopenshell-python/docs/ifcconvert/installation.rst index 963722856d..cd38d14231 100644 --- a/src/ifcopenshell-python/docs/ifcconvert/installation.rst +++ b/src/ifcopenshell-python/docs/ifcconvert/installation.rst @@ -14,17 +14,11 @@ Pre-built packages 1. Download the appropriate version for your operating system. - +----------------+----------------+----------------+----------------+------------------+ - | Linux 64bit | Windows 32bit | Windows 64bit | MacOS 64bit | MacOS M1 64bit | - +================+================+================+================+==================+ - | build-linux64_ | build-win32_ | build-win64_ | build-macos64_ | build-macosm164_ | - +----------------+----------------+----------------+----------------+------------------+ - -.. _build-linux64: https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.8.0-c18e4ea-linux64.zip -.. _build-win32: https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.8.0-c18e4ea-win32.zip -.. _build-win64: https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.8.0-c18e4ea-win64.zip -.. _build-macos64: https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.8.0-c18e4ea-macos64.zip -.. _build-macosm164: https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.8.0-c18e4ea-macosm164.zip + +---------------------------+-------------------------+-------------------------+---------------------------+-----------------------------+ + | Linux 64bit | Windows 32bit | Windows 64bit | MacOS 64bit | MacOS M1 64bit | + +===========================+=========================+=========================+===========================+=============================+ + | :ifcconvert_url:`linux64` | :ifcconvert_url:`win32` | :ifcconvert_url:`win64` | :ifcconvert_url:`macos64` | :ifcconvert_url:`macosm164` | + +---------------------------+-------------------------+-------------------------+---------------------------+-----------------------------+ 2. Unzip the downloaded file and run IfcConvert using the command line.