Skip to content

Commit 8cff046

Browse files
committed
Doc download links now point to explicitly versioned releases, not bot builds
This ensures that IOS-Python always 1) has the appropriate version and 2) contains exactly the same content as PyPI (i.e. with the latest Python files that might be outdated from the bot builds)
1 parent ff4154c commit 8cff046

4 files changed

Lines changed: 43 additions & 65 deletions

File tree

.github/workflows/ci-ifcopenshell-docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
tags:
77
- v0.**
88

9-
109
jobs:
1110

1211
activate:

src/blenderbim/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ bump:
8787
cd . && $(SED) "s/$(OLD)/$(NEW)/" Makefile
8888
cd ../ifcopenshell-python/ && $(SED) "s/$(OLD)/$(NEW)/" Makefile
8989
cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) "s/$(OLD)/$(NEW)/" installation.rst
90-
cd ../ifcopenshell-python/docs/ifcopenshell-python/ && $(SED) "s/$(OLD)/$(NEW)/" installation.rst
9190

9291
.PHONY: dist
9392
dist:

src/ifcopenshell-python/docs/conf.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#
3131
import os
3232
import sys
33-
sys.path.insert(0, os.path.abspath('..'))
33+
34+
sys.path.insert(0, os.path.abspath(".."))
3435

3536

3637
# -- Project information -----------------------------------------------------
@@ -44,6 +45,18 @@
4445
with open(os.path.join(cwd, "..", "..", "..", "VERSION"), "r") as f:
4546
release = f.read().strip()
4647

48+
from docutils import nodes
49+
50+
51+
def versioned_link_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
52+
url = f"https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcopenshell-python-{release}/ifcopenshell-python-{release}-{text}.zip"
53+
node = nodes.reference(rawtext, text, refuri=url, **options)
54+
return [node], []
55+
56+
57+
def setup(app):
58+
app.add_role("ios_python_url", versioned_link_role)
59+
4760

4861
# -- General configuration ---------------------------------------------------
4962

@@ -65,7 +78,7 @@
6578
autoapi_add_toctree_entry = True
6679

6780
# We're only documenting Python here
68-
autoapi_type = 'python'
81+
autoapi_type = "python"
6982

7083
# autoapi works by reading source code instead of importing modules
7184
autoapi_dirs = ['../ifcopenshell', '../../bcf/src', '../../bsdd', '../../ifccsv', '../../ifcdiff', '../../ifcpatch/ifcpatch', '../../ifctester/ifctester']
@@ -86,10 +99,10 @@
8699
# ifcopenshell.file is imported from ifcopenshell.file.file, but it gets pretty
87100
# confusing to see the docs again in multiple places (seriously,
88101
# ifcopenshell.file.file is everywhere).
89-
autoapi_options = ['members', 'undoc-members', 'show-inheritance', 'imported-members']
102+
autoapi_options = ["members", "undoc-members", "show-inheritance", "imported-members"]
90103

91104
# This option is set to both to allow both class docstrings and __init__ docstrings.
92-
autoapi_python_class_content = 'both'
105+
autoapi_python_class_content = "both"
93106

94107
# Group by type (e.g. attribute, class, function, etc) then alphabetically.
95108
autoapi_member_order = "groupwise"
@@ -139,7 +152,7 @@
139152
"color-link--visited": "#39b54a",
140153
"color-link--hover": "#d98014",
141154
"color-link--visited--hover": "#d98014",
142-
"font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji"
155+
"font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
143156
},
144157
"dark_css_variables": {
145158
"color-brand-primary": "#39b54a",
@@ -153,9 +166,8 @@
153166
"color-link--visited": "#39b54a",
154167
"color-link--hover": "#d98014",
155168
"color-link--visited--hover": "#d98014",
156-
"font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji"
169+
"font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
157170
},
158-
159171
"footer_icons": [
160172
{
161173
"name": "IfcOpenShell",

src/ifcopenshell-python/docs/ifcopenshell-python/installation.rst

Lines changed: 24 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ Installation
22
============
33

44
There are different methods of installation, depending on your situation. If
5-
you aren't sure which to choose, if you're a programmer, go for the **Pre-built
6-
packages**. If you aren't a programmer, go for the **BlenderBIM Add-on**.
5+
you aren't sure which to choose, if you're a programmer, go for **PyPI** if you
6+
use Pip, otherwise go for the **ZIP packages**. If you aren't a programmer, go
7+
for the **BlenderBIM Add-on**.
78

8-
1. **Pre-built packages** is recommended for users wanting to use the latest IfcOpenShell builds.
9-
2. **PyPI** is recommended for developers using Pip.
9+
1. **PyPI** is recommended for developers using Pip.
10+
2. **ZIP packages** is recommended for users doing a manual installation.
1011
3. **Conda** is recommended for developers using Anaconda.
1112
4. **Docker** is recommended for developers using Docker.
1213
5. **AWS Lambda** is recommended for developers using AWS Lambda functions.
@@ -16,49 +17,30 @@ packages**. If you aren't a programmer, go for the **BlenderBIM Add-on**.
1617
9. **From source with precompiled binaries** is recommended for developers actively working with the Python code.
1718
10. **Compiling from source** is recommended for developers actively working with the C++ core.
1819

19-
Pre-built packages
20-
------------------
20+
PyPI
21+
----
22+
23+
.. code-block::
2124
22-
Pre-built packages are prepared sporadically depending on whether there are
23-
changes in the IfcOpenShell C++ core. This will give you the latest available
24-
C++ bindings, but may potentially contain outdated pure Python modules, such as
25-
the API.
25+
pip install ifcopenshell
26+
27+
ZIP packages
28+
------------
2629

2730
1. Choose which version to download based on your operating system, Python
2831
version, and computer architecture.
2932

30-
+-------------+----------------+----------------+----------------+-------------------+---------------------+
31-
| | Linux 64bit | Windows 32bit | Windows 64bit | MacOS Intel 64bit | MacOS Silicon 64bit |
32-
+=============+================+================+================+===================+=====================+
33-
| Python 3.9 | py39-linux64_ | py39-win32_ | py39-win64_ | py39-macos64_ | py39-macosm164_ |
34-
+-------------+----------------+----------------+----------------+-------------------+---------------------+
35-
| Python 3.10 | py310-linux64_ | py310-win32_ | py310-win64_ | py310-macos64_ | py310-macosm164_ |
36-
+-------------+----------------+----------------+----------------+-------------------+---------------------+
37-
| Python 3.11 | py311-linux64_ | py311-win32_ | py311-win64_ | py311-macos64_ | py311-macosm164_ |
38-
+-------------+----------------+----------------+----------------+-------------------+---------------------+
39-
| Python 3.12 | py312-linux64_ | py312-win32_ | py312-win64_ | py312-macos64_ | py312-macosm164_ |
40-
+-------------+----------------+----------------+----------------+-------------------+---------------------+
41-
42-
.. _py39-linux64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-39-v0.8.0-90ae709-linux64.zip
43-
.. _py310-linux64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-310-v0.8.0-90ae709-linux64.zip
44-
.. _py311-linux64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.0-90ae709-linux64.zip
45-
.. _py312-linux64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-312-v0.8.0-90ae709-linux64.zip
46-
.. _py39-win32: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-39-v0.8.0-90ae709-win32.zip
47-
.. _py310-win32: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-310-v0.8.0-90ae709-win32.zip
48-
.. _py311-win32: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.0-90ae709-win32.zip
49-
.. _py312-win32: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-312-v0.8.0-90ae709-win32.zip
50-
.. _py39-win64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-39-v0.8.0-90ae709-win64.zip
51-
.. _py310-win64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-310-v0.8.0-90ae709-win64.zip
52-
.. _py311-win64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.0-90ae709-win64.zip
53-
.. _py312-win64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-312-v0.8.0-90ae709-win64.zip
54-
.. _py39-macos64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-39-v0.8.0-90ae709-macos64.zip
55-
.. _py310-macos64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-310-v0.8.0-90ae709-macos64.zip
56-
.. _py311-macos64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.0-90ae709-macos64.zip
57-
.. _py312-macos64: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-312-v0.8.0-90ae709-macos64.zip
58-
.. _py39-macosm164: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-39-v0.8.0-90ae709-macosm164.zip
59-
.. _py310-macosm164: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-310-v0.8.0-90ae709-macosm164.zip
60-
.. _py311-macosm164: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.0-90ae709-macosm164.zip
61-
.. _py312-macosm164: https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-312-v0.8.0-90ae709-macosm164.zip
33+
+-------------+---------------------------------+-------------------------------+-------------------------------+---------------------------------+-----------------------------------+
34+
| | Linux 64bit | Windows 32bit | Windows 64bit | MacOS Intel 64bit | MacOS Silicon 64bit |
35+
+=============+=================================+===============================+===============================+=================================+===================================+
36+
| Python 3.9 | :ios_python_url:`py39-linux64` | :ios_python_url:`py39-win32` | :ios_python_url:`py39-win64` | :ios_python_url:`py39-macos64` | :ios_python_url:`py39-macosm164` |
37+
+-------------+---------------------------------+-------------------------------+-------------------------------+---------------------------------+-----------------------------------+
38+
| Python 3.10 | :ios_python_url:`py310-linux64` | :ios_python_url:`py310-win32` | :ios_python_url:`py310-win64` | :ios_python_url:`py310-macos64` | :ios_python_url:`py310-macosm164` |
39+
+-------------+---------------------------------+-------------------------------+-------------------------------+---------------------------------+-----------------------------------+
40+
| Python 3.11 | :ios_python_url:`py311-linux64` | :ios_python_url:`py311-win32` | :ios_python_url:`py311-win64` | :ios_python_url:`py311-macos64` | :ios_python_url:`py311-macosm164` |
41+
+-------------+---------------------------------+-------------------------------+-------------------------------+---------------------------------+-----------------------------------+
42+
| Python 3.12 | :ios_python_url:`py312-linux64` | :ios_python_url:`py312-win32` | :ios_python_url:`py312-win64` | :ios_python_url:`py312-macos64` | :ios_python_url:`py312-macosm164` |
43+
+-------------+---------------------------------+-------------------------------+-------------------------------+---------------------------------+-----------------------------------+
6244

6345
2. Unzip the downloaded file and copy the ``ifcopenshell`` directory into your
6446
Python path. If you're not sure where your Python path is, run the following
@@ -81,20 +63,6 @@ the API.
8163
print(ifcopenshell.version)
8264
model = ifcopenshell.file()
8365
84-
PyPI
85-
----
86-
87-
PyPI releases are automatically performed once a month and contain the latest
88-
Python code that point in time.
89-
90-
Releases on PyPI may potentially ship slightly outdated precompiled binaries of
91-
the C++ core. This is because the binaries typically go through a period of
92-
manual testing prior in case of high-risk changes.
93-
94-
.. code-block::
95-
96-
pip install ifcopenshell
97-
9866
Conda
9967
-----
10068

0 commit comments

Comments
 (0)