cadquery-ocp-proxy 7.9.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: cadquery-ocp-proxy
|
|
3
|
+
Version: 7.9.3.0
|
|
4
|
+
Summary: Proxy package to track cadquery_ocp / cadquery_ocp_novtk version
|
|
5
|
+
Author: Bernhard
|
|
6
|
+
Author-email: Bernhard <b_walter@arcor.de>
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# TEST SETUP
|
|
11
|
+
|
|
12
|
+
There is a proxy package `cadquery_ocp_proxy` with version `7.9.3.0` that does nothing, but have optional dependencies:
|
|
13
|
+
|
|
14
|
+
```toml
|
|
15
|
+
[project.optional-dependencies]
|
|
16
|
+
vtk = ["cadquery_ocp>=7.9,< 8.0"]
|
|
17
|
+
novtk = ["cadquery_ocp_novtk>=7.9,< 8.0"]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
I built the following packages using the proxy package for testing on my local pypi server.
|
|
21
|
+
|
|
22
|
+
**NOTE: These are artificial new versions to force pip and uv to load them from my pypi server, so don't get confused about the version numbers. They don't exist on pypi.org**
|
|
23
|
+
|
|
24
|
+
- build123d-0.11.0-py3-none-any.whl
|
|
25
|
+
- cadquery-2.7-py3-none-any.whl
|
|
26
|
+
- ocp_gordon-0.19.0-py3-none-any.whl
|
|
27
|
+
- ocpsvg-0.6.0-py3-none-any.whl
|
|
28
|
+
- cadquery_ocp_proxy-7.8.1-py3-none-any.whl
|
|
29
|
+
|
|
30
|
+
Setup for packages in the **build123d**, **CadQuery**, or **OCP** ecosystem:
|
|
31
|
+
|
|
32
|
+
1. Packages with `cadquery_ocp` dependencies the can (like `ocpsvg` `ocp_gordon`, and `build123d`) would need to use extra dependencies
|
|
33
|
+
|
|
34
|
+
```toml
|
|
35
|
+
dependencies = ["svgelements >= 1.9.1, <2"]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = ["pytest"]
|
|
39
|
+
vtk = ["cadquery-ocp-proxy[vtk] >=7.9, < 8.0"]
|
|
40
|
+
novtk = ["cadquery-ocp-proxy[novtk] >=7.9, < 8.0"]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
2. Packages that need VTK like `cadquery` would only depend on `cadquery-ocp-proxy[vtk]` as default dependency
|
|
44
|
+
|
|
45
|
+
# WORKFLOWS
|
|
46
|
+
|
|
47
|
+
## Install **build123d** without VTK:
|
|
48
|
+
|
|
49
|
+
When we `pip install build123d[novtk]==0.11.0`, we get (pip list):
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
build123d 0.11.0
|
|
53
|
+
cadquery-ocp-novtk 7.9.3.0
|
|
54
|
+
cadquery-ocp-proxy 7.9.3.0
|
|
55
|
+
...
|
|
56
|
+
ocp-gordon 0.19.0
|
|
57
|
+
ocpsvg 0.6.0
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Tests:**
|
|
61
|
+
|
|
62
|
+
- build123d: `pytest --ignore=tests/test_direct_api/test_vtk_poly_data.py --ignore tests/test_direct_api/test_jupyter.py tests` passes all test.
|
|
63
|
+
- ocpsvg: `pytest tests` passes all tests
|
|
64
|
+
- ocp_gordon: `pytest tests` passes all tests
|
|
65
|
+
|
|
66
|
+
## Install **build123d** with VTK:
|
|
67
|
+
|
|
68
|
+
When we `pip install build123d[vtk]==0.11.0`, we get (pip list):
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
build123d 0.11.0
|
|
72
|
+
cadquery-ocp 7.9.3.0
|
|
73
|
+
cadquery-ocp-proxy 7.9.3.0
|
|
74
|
+
...
|
|
75
|
+
ocp-gordon 0.19.0
|
|
76
|
+
ocpsvg 0.6.0
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Tests:**
|
|
80
|
+
|
|
81
|
+
- build123d: `pytest tests` passes all test.
|
|
82
|
+
- ocpsvg: `pytest tests` passes all tests
|
|
83
|
+
- ocp_gordon: `pytest tests` passes all tests
|
|
84
|
+
|
|
85
|
+
## Install **cadquery**:
|
|
86
|
+
|
|
87
|
+
When we `pip install cadquery==2.7`, we get (pip list):
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
cadquery 2.7
|
|
91
|
+
cadquery-ocp 7.9.3.0
|
|
92
|
+
cadquery-ocp-proxy 7.9.3.0
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Tests:**
|
|
96
|
+
|
|
97
|
+
- cadquery: `pytest tests` passes all test.
|
|
98
|
+
|
|
99
|
+
Since the dependency of `ocpsvg` is `cadquery-ocp-proxy `, we can `pip install ocpsvg==0.6.0`
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
cadquery 2.7
|
|
103
|
+
cadquery-ocp 7.9.3.0
|
|
104
|
+
cadquery-ocp-proxy 7.9.3.0
|
|
105
|
+
...
|
|
106
|
+
ocpsvg 0.6.0
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
All good, because `cadquery-ocp` was already there from the `cadquery` installation
|
|
110
|
+
|
|
111
|
+
**Tests:**
|
|
112
|
+
|
|
113
|
+
- ocpsvg: `pytest tests` passes all test.
|
|
114
|
+
|
|
115
|
+
## Install **CadQuery** and **build123d** at the same time
|
|
116
|
+
|
|
117
|
+
When we
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
pip install build123d[vtk]==0.11.0
|
|
121
|
+
pip install cadquery==2.7
|
|
122
|
+
|
|
123
|
+
# or
|
|
124
|
+
|
|
125
|
+
pip install cadquery==2.7
|
|
126
|
+
pip install build123d[vtk]==0.11.0
|
|
127
|
+
|
|
128
|
+
# or
|
|
129
|
+
|
|
130
|
+
pip install cadquery==2.7 build123d==0.11.0
|
|
131
|
+
|
|
132
|
+
# or
|
|
133
|
+
|
|
134
|
+
pip install build123d==0.11.0 cadquery==2.7
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
we get (pip list)
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
build123d 0.11.0
|
|
141
|
+
cadquery 2.7
|
|
142
|
+
cadquery-ocp 7.9.3.0
|
|
143
|
+
cadquery-ocp-proxy 7.9.3.0
|
|
144
|
+
...
|
|
145
|
+
ocp-gordon 0.19.0
|
|
146
|
+
ocpsvg 0.6.0
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Tests:**
|
|
150
|
+
|
|
151
|
+
- cadquery: `pytest tests` passes all test.
|
|
152
|
+
- build123d: `pytest tests` passes all test.
|
|
153
|
+
- ocpsvg: `pytest tests` passes all tests
|
|
154
|
+
- ocp_gordon: `pytest tests` passes all tests
|
|
155
|
+
|
|
156
|
+
# Caveats
|
|
157
|
+
|
|
158
|
+
## Forgetting `[vtk]` or `novtk`
|
|
159
|
+
|
|
160
|
+
What happens when we only install `pip install build123d==0.11.0`?
|
|
161
|
+
|
|
162
|
+
We get (pip list):
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
build123d 0.11.0
|
|
166
|
+
...
|
|
167
|
+
ocp-gordon 0.19.0
|
|
168
|
+
ocpsvg 0.6.0
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
No `cadquery_ocp` is installed, because it is an optional dependency . This is, unfortunately, a case where the pypi ecosystem at install time can't help any more.
|
|
172
|
+
This needs to be covered at runtime, e.g. in `__init__.py`
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
try:
|
|
176
|
+
import OCP
|
|
177
|
+
except ImportError:
|
|
178
|
+
print("If you only want to use build123d, install 'build123d[novtk]'")
|
|
179
|
+
print("When cadquery should also be installed, install 'build123d[vtk]'")
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Notes:**
|
|
183
|
+
|
|
184
|
+
- The same would hold for\*\* `ocpsvg`.
|
|
185
|
+
- `ocp_svg would not suffer from it, since it has `build123d` as a dependency
|
|
186
|
+
|
|
187
|
+
# Summary
|
|
188
|
+
|
|
189
|
+
The proxy package solves two major issue:
|
|
190
|
+
|
|
191
|
+
1. Install **build123d** and **CadQuery** in the same environment
|
|
192
|
+
2. Have a clear guidance on packages that should run with either `cadquery_ocp` and `cadquery_ocp_novtk` (optional dependencies)
|
|
193
|
+
|
|
194
|
+
The downside is that users need to specifiy `[vtk]` or `[novtk]` during install. This can be clearly mentioned in the Readme, but also caught at runtime to pürovide guidance for the user.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
cadquery_ocp_proxy/__init__.py,sha256=3BcBBr32Vnwe01XFVsI2JwceiDdNGDVu30zKWTNco_E,179
|
|
2
|
+
cadquery_ocp_proxy/_version.py,sha256=crOl9YJBROwWMoyFabyJ0eCsIvPMjdMehYODYUQsqvk,71
|
|
3
|
+
cadquery_ocp_proxy-7.9.3.0.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
|
|
4
|
+
cadquery_ocp_proxy-7.9.3.0.dist-info/METADATA,sha256=JqSlGkuMEuzcxtpuKKi0lW-yj7occ458oR0pBRVg5AI,5075
|
|
5
|
+
cadquery_ocp_proxy-7.9.3.0.dist-info/RECORD,,
|