cad-ccx 2.23.0__py3-none-win_amd64.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.
- cad_ccx/__init__.py +120 -0
- cad_ccx/__main__.py +25 -0
- cad_ccx/_bin/bin/VCRUNTIME140.dll +0 -0
- cad_ccx/_bin/bin/ccx.exe +0 -0
- cad_ccx/_bin/bin/libarpack.dll +0 -0
- cad_ccx/_bin/bin/libblas.dll +0 -0
- cad_ccx/_bin/bin/libgcc_s_seh-1.dll +0 -0
- cad_ccx/_bin/bin/libgfortran-5.dll +0 -0
- cad_ccx/_bin/bin/libgomp-1.dll +0 -0
- cad_ccx/_bin/bin/liblapack.dll +0 -0
- cad_ccx/_bin/bin/libquadmath-0.dll +0 -0
- cad_ccx/_bin/bin/libwinpthread-1.dll +0 -0
- cad_ccx/_bin/manifest.json +94 -0
- cad_ccx/py.typed +0 -0
- cad_ccx-2.23.0.dist-info/METADATA +119 -0
- cad_ccx-2.23.0.dist-info/RECORD +26 -0
- cad_ccx-2.23.0.dist-info/WHEEL +4 -0
- cad_ccx-2.23.0.dist-info/entry_points.txt +2 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSE +25 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/ARPACK-NG.txt +33 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/CalculiX.txt +339 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/GCC-runtime.txt +752 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/LAPACK.txt +48 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/LLVM.txt +361 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/Microsoft-Visual-C-Runtime.txt +152 -0
- cad_ccx-2.23.0.dist-info/licenses/LICENSES/mingw-w64-winpthreads.txt +57 -0
cad_ccx/__init__.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""CalculiX's solver, ``ccx``, packaged as a wheel, with a small launcher: ``cad-ccx``, what text-to-cad's
|
|
2
|
+
``cad[calculix]`` installs.
|
|
3
|
+
|
|
4
|
+
This package ships the ``ccx`` program, CalculiX's finite-element solver, built by conda-forge and unmodified,
|
|
5
|
+
with the libraries it loads, for one platform per wheel. It is unofficial: not affiliated with the CalculiX project
|
|
6
|
+
(https://www.calculix.de). What it adds is a way to find and run that program from Python::
|
|
7
|
+
|
|
8
|
+
import cad_ccx
|
|
9
|
+
|
|
10
|
+
cad_ccx.executable() # Path to the bundled ccx program
|
|
11
|
+
cad_ccx.version() # "2.23", the CalculiX release bundled
|
|
12
|
+
done = cad_ccx.run("beam.inp") # runs ccx on beam.inp in its own folder, on one thread
|
|
13
|
+
done.dat.read_text() # what it printed to beam.dat
|
|
14
|
+
|
|
15
|
+
``run`` sets every thread count CalculiX reads to ``threads`` (default 1, so a solve prints the same numbers every
|
|
16
|
+
run), captures what ``ccx`` says, collects its ``*ERROR`` lines, and raises :class:`CcxError` when it fails
|
|
17
|
+
(``check=False`` returns the result instead). The ``ccx`` command this package installs runs the bundled program
|
|
18
|
+
with its arguments as given. Nothing here reads or writes CalculiX's file formats: that is the caller's.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import os
|
|
24
|
+
import subprocess
|
|
25
|
+
import sys
|
|
26
|
+
from dataclasses import dataclass
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
from typing import Mapping, Optional, Tuple, Union
|
|
29
|
+
|
|
30
|
+
__version__ = "2.23.0"
|
|
31
|
+
#: The CalculiX release this package bundles.
|
|
32
|
+
CALCULIX_VERSION = "2.23"
|
|
33
|
+
#: Every environment variable CalculiX takes a thread count from.
|
|
34
|
+
THREAD_VARIABLES = ("OMP_NUM_THREADS", "CCX_NPROC_EQUATION_SOLVER", "CCX_NPROC_STIFFNESS", "CCX_NPROC_RESULTS")
|
|
35
|
+
|
|
36
|
+
__all__ = ["CALCULIX_VERSION", "THREAD_VARIABLES", "CcxError", "Run", "executable", "run", "version"]
|
|
37
|
+
|
|
38
|
+
_BIN = Path(__file__).resolve().parent / "_bin"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def executable() -> Path:
|
|
42
|
+
"""The bundled ``ccx`` program. ``FileNotFoundError`` for an install that has none (a source checkout, or a
|
|
43
|
+
wheel for another platform)."""
|
|
44
|
+
path = _BIN / "bin" / ("ccx.exe" if sys.platform == "win32" else "ccx")
|
|
45
|
+
if not path.is_file():
|
|
46
|
+
raise FileNotFoundError(f"this install of the cad-ccx package has no ccx program at {path}: install a wheel built "
|
|
47
|
+
"for this platform")
|
|
48
|
+
return path
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def version() -> str:
|
|
52
|
+
"""The CalculiX release bundled ("2.23"), without running anything."""
|
|
53
|
+
return CALCULIX_VERSION
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@dataclass(frozen=True)
|
|
57
|
+
class Run:
|
|
58
|
+
"""One run of ``ccx``: the job (its ``.inp`` without the suffix), its exit code, what it printed, and the
|
|
59
|
+
``*ERROR`` lines among that."""
|
|
60
|
+
|
|
61
|
+
job: Path
|
|
62
|
+
returncode: int
|
|
63
|
+
stdout: str
|
|
64
|
+
stderr: str
|
|
65
|
+
errors: Tuple[str, ...]
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def ok(self) -> bool:
|
|
69
|
+
"""Whether it finished cleanly: exit code 0 and no ``*ERROR`` line."""
|
|
70
|
+
return self.returncode == 0 and not self.errors
|
|
71
|
+
|
|
72
|
+
def output(self, suffix: str) -> Optional[Path]:
|
|
73
|
+
"""The file it wrote with ``suffix`` (``".dat"``, ``".frd"``, ``".sta"``, ``".cvg"``), or None."""
|
|
74
|
+
path = self.job.with_name(self.job.name + suffix)
|
|
75
|
+
return path if path.is_file() else None
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def dat(self) -> Optional[Path]:
|
|
79
|
+
return self.output(".dat")
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def frd(self) -> Optional[Path]:
|
|
83
|
+
return self.output(".frd")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class CcxError(RuntimeError):
|
|
87
|
+
"""``ccx`` failed: it exited non-zero or printed an ``*ERROR`` line. ``run`` is the result."""
|
|
88
|
+
|
|
89
|
+
def __init__(self, run: Run):
|
|
90
|
+
said = "; ".join(run.errors[:3]) or "\n ".join((run.stdout + run.stderr).strip().splitlines()[-8:])
|
|
91
|
+
super().__init__(f"ccx failed on {run.job.name}.inp (exit {run.returncode}): {said}")
|
|
92
|
+
self.run = run
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def run(inp: Union[str, "os.PathLike[str]"], *, threads: int = 1, timeout: Optional[float] = None,
|
|
96
|
+
env: Optional[Mapping[str, str]] = None, check: bool = True) -> Run:
|
|
97
|
+
"""Run the bundled ``ccx`` on ``inp`` (a ``.inp`` file, with or without its suffix), in the file's own folder,
|
|
98
|
+
where ``ccx`` writes its output files beside it.
|
|
99
|
+
|
|
100
|
+
threads: the thread count every CalculiX variable is set to (``THREAD_VARIABLES``); 1 gives the same numbers
|
|
101
|
+
every run.
|
|
102
|
+
timeout: seconds before the run is stopped (``subprocess.TimeoutExpired``); None waits.
|
|
103
|
+
env: the environment it runs in, before the thread counts are set; None: this process's.
|
|
104
|
+
check: raise :class:`CcxError` when it fails; False returns the failed :class:`Run`.
|
|
105
|
+
"""
|
|
106
|
+
path = Path(inp).resolve()
|
|
107
|
+
job = path.with_suffix("") if path.suffix.lower() == ".inp" else path
|
|
108
|
+
if not job.with_name(job.name + ".inp").is_file():
|
|
109
|
+
raise FileNotFoundError(f"no input file {job.with_name(job.name + '.inp')}")
|
|
110
|
+
if threads < 1:
|
|
111
|
+
raise ValueError(f"threads is at least 1, not {threads}")
|
|
112
|
+
environment = dict(os.environ if env is None else env)
|
|
113
|
+
environment.update(dict.fromkeys(THREAD_VARIABLES, str(threads)))
|
|
114
|
+
done = subprocess.run([str(executable()), "-i", job.name], cwd=job.parent, env=environment, capture_output=True,
|
|
115
|
+
text=True, errors="replace", stdin=subprocess.DEVNULL, timeout=timeout)
|
|
116
|
+
errors = tuple(line.strip() for line in (done.stdout + done.stderr).splitlines() if "*ERROR" in line)
|
|
117
|
+
result = Run(job=job, returncode=done.returncode, stdout=done.stdout, stderr=done.stderr, errors=errors)
|
|
118
|
+
if check and not result.ok:
|
|
119
|
+
raise CcxError(result)
|
|
120
|
+
return result
|
cad_ccx/__main__.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""``ccx`` (and ``python -m cad_ccx``): the bundled ``ccx`` program, run with these arguments, its exit code ours."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main() -> int:
|
|
11
|
+
from cad_ccx import executable
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
program = str(executable())
|
|
15
|
+
except FileNotFoundError as error:
|
|
16
|
+
print(f"ccx: {error}", file=sys.stderr)
|
|
17
|
+
return 127
|
|
18
|
+
arguments = [program, *sys.argv[1:]]
|
|
19
|
+
if sys.platform != "win32":
|
|
20
|
+
os.execv(program, arguments) # the process becomes ccx: its signals, stdio and exit code
|
|
21
|
+
return subprocess.call(arguments)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
if __name__ == "__main__":
|
|
25
|
+
raise SystemExit(main())
|
|
Binary file
|
cad_ccx/_bin/bin/ccx.exe
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"calculix": "2.23",
|
|
3
|
+
"platform": "win-64",
|
|
4
|
+
"tag": "win_amd64",
|
|
5
|
+
"packages": [
|
|
6
|
+
{
|
|
7
|
+
"file": "_openmp_mutex-4.5-20_gnu.conda",
|
|
8
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/_openmp_mutex-4.5-20_gnu.conda",
|
|
9
|
+
"sha256": "8a1cee28bd0ee7451ada1cd50b64720e57e17ff994fc62dd8329bef570d382e4"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"file": "arpack-3.9.1-nompi_h1f7371d_102.conda",
|
|
13
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/arpack-3.9.1-nompi_h1f7371d_102.conda",
|
|
14
|
+
"sha256": "393a0f11fe53c9a4ce8e003f0f9816ce098179d4c06eacffd573afbb0f2e2f0c"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"file": "calculix-2.23-pl5321h7abefab_8.conda",
|
|
18
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/calculix-2.23-pl5321h7abefab_8.conda",
|
|
19
|
+
"sha256": "a6c1e75c092893d73d0bb3902cba9db7e14ba3fe4d2f8cd74cdfbc1bc041d1d1"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"file": "libblas-3.11.0-10_h6c93730_netlib.conda",
|
|
23
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libblas-3.11.0-10_h6c93730_netlib.conda",
|
|
24
|
+
"sha256": "baef29691e333f0a68d6031d8728a30219ad76b7c61e4c3a06b69c810633c3d0"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"file": "libgcc-16.2.0-h110b43a_7.conda",
|
|
28
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libgcc-16.2.0-h110b43a_7.conda",
|
|
29
|
+
"sha256": "59feb6d16cba13a70f22dae70a44670eb2cc45e652e9a34a014814c2ca871132"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"file": "libgfortran-16.2.0-h719f0c7_7.conda",
|
|
33
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libgfortran-16.2.0-h719f0c7_7.conda",
|
|
34
|
+
"sha256": "8e0d3445b5bdde22b6dfc2a7766b9336e448b240ff2015cd2cc73ca85f9b2130"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"file": "libgfortran5-16.2.0-h7c9de5e_7.conda",
|
|
38
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libgfortran5-16.2.0-h7c9de5e_7.conda",
|
|
39
|
+
"sha256": "e9b86fe14cb9938abd08f0b1685b04457339f71d9f00783fe9258a1eb0229963"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"file": "libgomp-16.2.0-h8ee18e1_7.conda",
|
|
43
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libgomp-16.2.0-h8ee18e1_7.conda",
|
|
44
|
+
"sha256": "4b8a747f047d069ccd2a6cf2f4fdbc6b0c0e4dcd840998d1fe607b8c234e707b"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"file": "liblapack-3.11.0-10_h018ca30_netlib.conda",
|
|
48
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/liblapack-3.11.0-10_h018ca30_netlib.conda",
|
|
49
|
+
"sha256": "759cc832354efdd05611ac3ca2603f5b5b569c8ec3e6b599680adcf667fcb45c"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"file": "libstdcxx-16.2.0-hae5796f_7.conda",
|
|
53
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libstdcxx-16.2.0-hae5796f_7.conda",
|
|
54
|
+
"sha256": "5984f81dcb289446fb3cdb0117c0680bded57eaa98da193f705400ec94fc71ae"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"file": "libwinpthread-12.0.0.r688.g6b2176247.1-h57928b3_0.conda",
|
|
58
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/libwinpthread-12.0.0.r688.g6b2176247.1-h57928b3_0.conda",
|
|
59
|
+
"sha256": "bab5558663cb0e964988b859abd69d0f2380b6ea9f140495ab543e51af13635d"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"file": "ucrt-10.0.26100.0-h57928b3_0.conda",
|
|
63
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.26100.0-h57928b3_0.conda",
|
|
64
|
+
"sha256": "3005729dce6f3d3f5ec91dfc49fc75a0095f9cd23bab49efb899657297ac91a5"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"file": "vc-14.5-ha367084_42.conda",
|
|
68
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/vc-14.5-ha367084_42.conda",
|
|
69
|
+
"sha256": "0598ca1ce913618cff9bd90391bcf75cd9edb22057c85dd6784dd762b7a888e2"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"file": "vc14_runtime-14.51.36247-habf1de7_42.conda",
|
|
73
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.51.36247-habf1de7_42.conda",
|
|
74
|
+
"sha256": "8dfbfd68ebf53249d11e528cbb80ad5a2460b0c5b4636eed82ee0d3950827a3d"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"file": "vcomp14-14.51.36247-habf1de7_42.conda",
|
|
78
|
+
"url": "https://conda.anaconda.org/conda-forge/win-64/vcomp14-14.51.36247-habf1de7_42.conda",
|
|
79
|
+
"sha256": "b3558ed059d6272ef919ea959311af73c35b5fe43c789cd43f71b398671fec49"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"files": {
|
|
83
|
+
"bin/VCRUNTIME140.dll": "Library/bin/vcruntime140.dll",
|
|
84
|
+
"bin/ccx.exe": "Library/bin/ccx.exe",
|
|
85
|
+
"bin/libarpack.dll": "Library/mingw-w64/bin/libarpack.dll",
|
|
86
|
+
"bin/libblas.dll": "Library/bin/libblas.dll",
|
|
87
|
+
"bin/libgcc_s_seh-1.dll": "Library/bin/libgcc_s_seh-1.dll",
|
|
88
|
+
"bin/libgfortran-5.dll": "Library/bin/libgfortran-5.dll",
|
|
89
|
+
"bin/libgomp-1.dll": "Library/bin/libgomp-1.dll",
|
|
90
|
+
"bin/liblapack.dll": "Library/bin/liblapack.dll",
|
|
91
|
+
"bin/libquadmath-0.dll": "Library/bin/libquadmath-0.dll",
|
|
92
|
+
"bin/libwinpthread-1.dll": "Library/bin/libwinpthread-1.dll"
|
|
93
|
+
}
|
|
94
|
+
}
|
cad_ccx/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cad-ccx
|
|
3
|
+
Version: 2.23.0
|
|
4
|
+
Summary: CalculiX's ccx solver, packaged as a wheel for text-to-cad's cad[calculix], with a small launcher. Unofficial.
|
|
5
|
+
Project-URL: Source, https://github.com/earthtojake/ccx
|
|
6
|
+
Project-URL: Issues, https://github.com/earthtojake/ccx/issues
|
|
7
|
+
Project-URL: CalculiX, https://www.calculix.de
|
|
8
|
+
License-Expression: MIT AND GPL-2.0-only AND BSD-3-Clause AND GPL-3.0-only WITH GCC-exception-3.1 AND Apache-2.0 WITH LLVM-exception AND LicenseRef-MicrosoftVisualCpp2015-2022Runtime
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: LICENSES/ARPACK-NG.txt
|
|
11
|
+
License-File: LICENSES/CalculiX.txt
|
|
12
|
+
License-File: LICENSES/GCC-runtime.txt
|
|
13
|
+
License-File: LICENSES/LAPACK.txt
|
|
14
|
+
License-File: LICENSES/LLVM.txt
|
|
15
|
+
License-File: LICENSES/Microsoft-Visual-C-Runtime.txt
|
|
16
|
+
License-File: LICENSES/mingw-w64-winpthreads.txt
|
|
17
|
+
Keywords: abaqus,calculix,ccx,fea,finite element,solver
|
|
18
|
+
Classifier: Development Status :: 4 - Beta
|
|
19
|
+
Classifier: Intended Audience :: Science/Research
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
+
Classifier: Programming Language :: Python :: 3
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# cad-ccx
|
|
29
|
+
|
|
30
|
+
CalculiX's finite-element solver, `ccx`, packaged as a Python wheel, with a small launcher. It is what
|
|
31
|
+
[text-to-cad](https://github.com/earthtojake/text-to-cad)'s `cad[calculix]` installs, and works on its own too.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install cad-ccx
|
|
35
|
+
ccx -v # This is Version 2.23
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import cad_ccx
|
|
40
|
+
|
|
41
|
+
cad_ccx.executable() # the bundled ccx program
|
|
42
|
+
done = cad_ccx.run("beam.inp") # runs it in beam.inp's folder, on one thread; raises cad_ccx.CcxError on failure
|
|
43
|
+
print(done.dat.read_text()) # what it printed to beam.dat
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Unofficial.** This is not the CalculiX project and is not affiliated with it. CalculiX is by Guido Dhondt and
|
|
47
|
+
Klaus Wittig: <https://www.calculix.de>. The `ccx` program here is conda-forge's build of the CalculiX source,
|
|
48
|
+
unmodified.
|
|
49
|
+
|
|
50
|
+
## What a wheel holds
|
|
51
|
+
|
|
52
|
+
One platform's `ccx` and the libraries it loads, read from the binary's own headers and nothing more:
|
|
53
|
+
|
|
54
|
+
| Platform | Wheel tag | Files |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| Linux x86_64 | `manylinux_2_17_x86_64` | `ccx`, reference BLAS and LAPACK, ARPACK, GCC's Fortran, OpenMP and support runtimes |
|
|
57
|
+
| Linux aarch64 | `manylinux_2_17_aarch64` | the same |
|
|
58
|
+
| macOS Intel | `macosx_11_0_x86_64` | the same, with LLVM's OpenMP |
|
|
59
|
+
| macOS Apple silicon | `macosx_11_0_arm64` | the same, with LLVM's OpenMP |
|
|
60
|
+
| Windows x64 | `win_amd64` | the same as DLLs beside `ccx.exe`, with winpthreads and Microsoft's C runtime |
|
|
61
|
+
|
|
62
|
+
BLAS and LAPACK are the reference (netlib) builds rather than OpenBLAS: CalculiX's sparse solver, SPOOLES, carries
|
|
63
|
+
its own kernels, so a static solve barely uses BLAS, and the reference builds add no threads of their own.
|
|
64
|
+
Each wheel's `cad_ccx/_bin/manifest.json` names every conda package it came from, with its URL and sha256.
|
|
65
|
+
|
|
66
|
+
## The launcher
|
|
67
|
+
|
|
68
|
+
| | |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `cad_ccx.executable()` | The bundled program's path; `FileNotFoundError` in an install without one |
|
|
71
|
+
| `cad_ccx.version()` | The CalculiX release bundled, `"2.23"` |
|
|
72
|
+
| `cad_ccx.run(inp, *, threads=1, timeout=None, env=None, check=True)` | Runs `ccx -i <job>` in the input's folder with every CalculiX thread variable set to `threads`; returns a `cad_ccx.Run` (`returncode`, `stdout`, `stderr`, `errors`: the `*ERROR` lines, `ok`, `dat`, `frd`, `output(suffix)`); raises `cad_ccx.CcxError` when it fails, unless `check=False` |
|
|
73
|
+
| `ccx` (the command), `python -m cad_ccx` | The bundled program with your arguments |
|
|
74
|
+
|
|
75
|
+
The launcher reads and writes no CalculiX file: building a deck and reading its results are the caller's.
|
|
76
|
+
|
|
77
|
+
## Building
|
|
78
|
+
|
|
79
|
+
A wheel is a repackaging, not a compile. `hatch_build.py` downloads the platform's pinned conda-forge packages
|
|
80
|
+
(`pins.json`: URL and sha256 of each, checked), unpacks the files `pins.json` lists for it, and tags the wheel.
|
|
81
|
+
Any machine builds any platform's wheel:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
CCX_PLATFORM=win-64 python -m build --wheel # linux-64, linux-aarch64, osx-64, osx-arm64, win-64
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Building from the sdist does the same, so it needs network access to conda-forge. Downloads are cached in
|
|
88
|
+
`CCX_CACHE` (default: the user's cache folder).
|
|
89
|
+
|
|
90
|
+
`scripts/pins.py` regenerates `pins.json`: it resolves CalculiX's dependencies against conda-forge's own index,
|
|
91
|
+
with the reference BLAS and LAPACK, and records each platform's files (`scripts/closure.py`) and wheel tag. Bump
|
|
92
|
+
`CALCULIX` there and `version` in `pyproject.toml` and `src/cad_ccx/__init__.py` together.
|
|
93
|
+
|
|
94
|
+
CI (`.github/workflows/wheels.yml`) builds every wheel and the sdist, tests each wheel on its own platform (the
|
|
95
|
+
launcher, and a cantilever solved against beam theory), and publishes to PyPI through trusted publishing whenever `main` carries a version not yet released: a
|
|
96
|
+
push that bumps the version releases it, and the workflow then tags the commit `v<version>`. A `v*` tag publishes
|
|
97
|
+
too.
|
|
98
|
+
|
|
99
|
+
## Versions
|
|
100
|
+
|
|
101
|
+
A release's version is the CalculiX release it carries (`2.23.0` carries CalculiX 2.23). A fix to the packaging
|
|
102
|
+
alone is a post-release (`2.23.0.post1`), the same CalculiX.
|
|
103
|
+
|
|
104
|
+
## Licences
|
|
105
|
+
|
|
106
|
+
The launcher and build scripts are MIT (`LICENSE`). A wheel also distributes:
|
|
107
|
+
|
|
108
|
+
| Component | Licence | Text |
|
|
109
|
+
| --- | --- | --- |
|
|
110
|
+
| CalculiX `ccx` | GPL-2.0 | `LICENSES/CalculiX.txt` |
|
|
111
|
+
| Reference BLAS and LAPACK | BSD-3-Clause | `LICENSES/LAPACK.txt` |
|
|
112
|
+
| ARPACK-NG | BSD-3-Clause | `LICENSES/ARPACK-NG.txt` |
|
|
113
|
+
| GCC's libgfortran, libquadmath, libgomp, libgcc_s | GPL-3.0 with the GCC Runtime Library Exception 3.1 | `LICENSES/GCC-runtime.txt` |
|
|
114
|
+
| LLVM's OpenMP (macOS) | Apache-2.0 with LLVM exception | `LICENSES/LLVM.txt` |
|
|
115
|
+
| mingw-w64 winpthreads (Windows) | MIT | `LICENSES/mingw-w64-winpthreads.txt` |
|
|
116
|
+
| Microsoft Visual C++ runtime (Windows) | Microsoft's redistribution terms | `LICENSES/Microsoft-Visual-C-Runtime.txt` |
|
|
117
|
+
|
|
118
|
+
Source for every binary: the CalculiX source at <https://www.calculix.de> and the conda-forge recipes and
|
|
119
|
+
packages each wheel's `manifest.json` names (<https://github.com/conda-forge>).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cad_ccx/__init__.py,sha256=49pRcYDD0jDKW-BidBuzD1aai0ir5_zZQYTfr6xr66U,5477
|
|
2
|
+
cad_ccx/__main__.py,sha256=Svqd8TchRfdbklH2mFQcXM8py9aHjNaIoOzjA3D9qtE,669
|
|
3
|
+
cad_ccx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
cad_ccx/_bin/manifest.json,sha256=R7kfB0kzOItwCWtvtXNkVY2yqbAiv0sifd6zjDPelwg,4423
|
|
5
|
+
cad_ccx/_bin/bin/VCRUNTIME140.dll,sha256=0fQiXfLNh32_Ew1WaKAh3OP5QRhFX_XslSBhwwr8nOc,178616
|
|
6
|
+
cad_ccx/_bin/bin/ccx.exe,sha256=Lpx1uxuX-PogLOjQCoP9h646byUPI0EqKD84clmLuO4,7649366
|
|
7
|
+
cad_ccx/_bin/bin/libarpack.dll,sha256=L2VtXbEHqojauqRgQt1mCN3bjAZRXkPJZOcP1gdd4iw,495870
|
|
8
|
+
cad_ccx/_bin/bin/libblas.dll,sha256=oY13e3eogZzeqtpmF3C8q00y4uTBXJ7xvlG7CUUmfoE,830976
|
|
9
|
+
cad_ccx/_bin/bin/libgcc_s_seh-1.dll,sha256=PEzInh3zrBO-OMaUfHtHs9Rv-pmY8VpX67No0kAkeW4,1023033
|
|
10
|
+
cad_ccx/_bin/bin/libgfortran-5.dll,sha256=yjYsNd7Z1OP2PYHvEKn_KvYs7gjor9UEm9uWEjmc0R4,14164166
|
|
11
|
+
cad_ccx/_bin/bin/libgomp-1.dll,sha256=uWfvcwa4xgF_qoYgOK24tl_UzkI-MeQA5XZ7B4fRvwc,1921803
|
|
12
|
+
cad_ccx/_bin/bin/liblapack.dll,sha256=CK1Ps0M4NGV49uYL5ZF6yMkhdSMBGTauVtSM21ZRNdE,12872704
|
|
13
|
+
cad_ccx/_bin/bin/libquadmath-0.dll,sha256=9x6PGtkUbnaYO2Mu9Vs4ynqPpCaRhV8rJVD1g5xstMM,1271016
|
|
14
|
+
cad_ccx/_bin/bin/libwinpthread-1.dll,sha256=rrhx_cus_mSGto-AwN-aXdLOm0YFZ5WnwJ1iAAB4urk,62100
|
|
15
|
+
cad_ccx-2.23.0.dist-info/METADATA,sha256=QocWPWLrAAGUuB0tF1TXQ5VozXgQlH8HTPVqhdKMceU,6160
|
|
16
|
+
cad_ccx-2.23.0.dist-info/WHEEL,sha256=lpoBGaIUIidvvdZ4qRAP61bBKYJdt4FI3WXFL50Gzyo,94
|
|
17
|
+
cad_ccx-2.23.0.dist-info/entry_points.txt,sha256=Fz-HsX6Ei6Oa2NtyvDqxxmEc4b6r7l1bNkrgQI7B7xU,46
|
|
18
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSE,sha256=OOxkK4J71j8Q4YV07DNbuuLMbTA4j57xx325N2UpFNk,1264
|
|
19
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/ARPACK-NG.txt,sha256=QCklj25ID8No6B8UCKBT0Ee9jjO2IQ4fSDyO7ThasGc,1686
|
|
20
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/CalculiX.txt,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
21
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/GCC-runtime.txt,sha256=zapwCvXA_mNVqRvw8RUmhTZWc7W8gxg73-t7FUcUlWY,38751
|
|
22
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/LAPACK.txt,sha256=RPfAirEeQLIdi_giBxKSm6jQIEZF0hdIaaz5FVYtCWk,2266
|
|
23
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/LLVM.txt,sha256=_a0XWKnh-dWoHhiHmzQGdyEV7cksJL-ja3DGVPMl6OQ,19741
|
|
24
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/Microsoft-Visual-C-Runtime.txt,sha256=z4mzcQfCLPjOIQQ9odoUMIe4bOf9RVb5HCW8QpUzgH4,7590
|
|
25
|
+
cad_ccx-2.23.0.dist-info/licenses/LICENSES/mingw-w64-winpthreads.txt,sha256=YyY2FM3Sny-Ty6hemS8EGzH5_HtAM2kvMSaUiaihsXc,2883
|
|
26
|
+
cad_ccx-2.23.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 the ccx contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
This licence covers the Python code and build scripts in this repository. The
|
|
24
|
+
wheels built from it bundle CalculiX and the libraries it loads, each under its
|
|
25
|
+
own licence: see LICENSES/.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
ARPACK-NG (https://github.com/opencollab/arpack-ng)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 1996-2008 Rice University.
|
|
4
|
+
Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff, and the arpack-ng contributors.
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
|
8
|
+
modification, are permitted provided that the following conditions are
|
|
9
|
+
met:
|
|
10
|
+
|
|
11
|
+
- Redistributions of source code must retain the above copyright
|
|
12
|
+
notice, this list of conditions and the following disclaimer.
|
|
13
|
+
|
|
14
|
+
- Redistributions in binary form must reproduce the above copyright
|
|
15
|
+
notice, this list of conditions and the following disclaimer listed
|
|
16
|
+
in this license in the documentation and/or other materials
|
|
17
|
+
provided with the distribution.
|
|
18
|
+
|
|
19
|
+
- Neither the name of the copyright holders nor the names of its
|
|
20
|
+
contributors may be used to endorse or promote products derived from
|
|
21
|
+
this software without specific prior written permission.
|
|
22
|
+
|
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|