openseespyandroid 3.7.1.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,69 @@
1
+ """openseespyandroid - OpenSeesPy for Android arm64 (Pydroid 3 / Termux).
2
+
3
+ Usage:
4
+ import openseespyandroid.opensees as ops
5
+ # or
6
+ from openseespyandroid import opensees as ops
7
+ """
8
+ import ctypes
9
+ import importlib.util
10
+ import os
11
+ import platform
12
+ import sys
13
+
14
+ __all__ = ["opensees"]
15
+
16
+ _HERE = os.path.dirname(os.path.abspath(__file__))
17
+ _LIBS = os.path.join(_HERE, "libs")
18
+ _BIN = os.path.join(_HERE, "bin")
19
+
20
+
21
+ def _is_android():
22
+ return (hasattr(sys, "getandroidapilevel")
23
+ or "ANDROID_ROOT" in os.environ
24
+ or os.path.exists("/system/build.prop"))
25
+
26
+
27
+ def _check_platform():
28
+ if not _is_android():
29
+ raise ImportError("openseespyandroid only runs on Android. "
30
+ "On desktop use: pip install openseespy")
31
+ mach = platform.machine().lower()
32
+ if mach not in ("aarch64", "arm64"):
33
+ raise ImportError("openseespyandroid needs an arm64 (aarch64) device, "
34
+ "this one is %r" % mach)
35
+
36
+
37
+ def _preload_deps():
38
+ # Load bundled shared libraries with RTLD_GLOBAL in dependency order so the
39
+ # extension module finds them even where $ORIGIN RUNPATH is not honoured.
40
+ order_file = os.path.join(_LIBS, "load_order.txt")
41
+ if not os.path.exists(order_file):
42
+ return
43
+ with open(order_file) as f:
44
+ names = [l.strip() for l in f if l.strip()]
45
+ for name in names:
46
+ path = os.path.join(_LIBS, name)
47
+ if os.path.exists(path):
48
+ ctypes.CDLL(path, mode=ctypes.RTLD_GLOBAL)
49
+
50
+
51
+ def _load():
52
+ _check_platform()
53
+ tag = "cp%d%d" % sys.version_info[:2]
54
+ so = os.path.join(_BIN, "opensees_%s.so" % tag)
55
+ if not os.path.exists(so):
56
+ have = sorted(f[9:-3] for f in os.listdir(_BIN) if f.startswith("opensees_"))
57
+ raise ImportError("No OpenSees build for Python %d.%d. Available: %s"
58
+ % (sys.version_info[0], sys.version_info[1], ", ".join(have)))
59
+ _preload_deps()
60
+ # The C module's init function is PyInit_opensees, so load it as "opensees".
61
+ spec = importlib.util.spec_from_file_location("opensees", so)
62
+ mod = importlib.util.module_from_spec(spec)
63
+ spec.loader.exec_module(mod)
64
+ sys.modules["opensees"] = mod
65
+ sys.modules[__name__ + ".opensees"] = mod
66
+ return mod
67
+
68
+
69
+ opensees = _load()
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: openseespyandroid/bin/opensees_cp311.so
3
+ size: 34867792 bytes
4
+ sha256: 0d4eb7d1c625bd17cf315d756de7fe42be1b1479111897d4b2f3541b19a712b6
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: openseespyandroid/bin/opensees_cp312.so
3
+ size: 34869376 bytes
4
+ sha256: d26b85277bdb1de571aa0eb0e0d7d9ef0e916615cfb4a3c2e501c397309bc4e4
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: openseespyandroid/bin/opensees_cp313.so
3
+ size: 34869376 bytes
4
+ sha256: ba0696409ffbc8f669c8e07798bd8aca054f9aa88205d263c91b47f991668c3f
Binary file
Binary file
Binary file
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: openseespyandroid
3
+ Version: 3.7.1.0
4
+ Summary: OpenSeesPy prebuilt for Android arm64 (Pydroid 3, Termux)
5
+ License: OpenSees license (UC Berkeley), see LICENSE
6
+ Project-URL: Upstream, https://github.com/OpenSees/OpenSees
7
+ Project-URL: OpenSeesPy, https://github.com/zhuminjie/OpenSeesPy
8
+ Classifier: Operating System :: Android
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Scientific/Engineering
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Dynamic: license-file
15
+
16
+ # openseespyandroid
17
+
18
+ OpenSeesPy (OpenSees for Python) compiled for **Android arm64 (aarch64)**, for use in **Pydroid 3** and **Termux**.
19
+
20
+ ## Install
21
+
22
+ ```
23
+ pip install openseespyandroid
24
+ ```
25
+
26
+ ## Use
27
+
28
+ ```python
29
+ import openseespyandroid.opensees as ops
30
+
31
+ ops.wipe()
32
+ ops.model('basic', '-ndm', 2, '-ndf', 3)
33
+ # ... same API as openseespy.opensees
34
+ ```
35
+
36
+ Existing OpenSeesPy scripts: replace `import openseespy.opensees as ops` with
37
+ `import openseespyandroid.opensees as ops`.
38
+
39
+ ## Supported
40
+
41
+ - Android 7.0+ (API 24), arm64-v8a devices
42
+ - Python 3.11, 3.12, 3.13 (the loader picks the matching build)
43
+ - Pydroid 3, Termux
44
+
45
+ ## How it is built
46
+
47
+ `.github/workflows/build-release.yml` runs on a native GitHub arm64 runner inside
48
+ the official Termux Docker image (real Android bionic userland), compiles
49
+ OpenSees (C/C++ with clang, Fortran with LLVM flang), bundles the needed shared
50
+ libraries with `$ORIGIN` RUNPATH, and ships them in a `py3-none-any` wheel
51
+ (PyPI does not accept `linux_aarch64` wheels).
52
+
53
+ Pushing a tag `v*` builds, creates a GitHub Release and publishes to PyPI.
54
+
55
+ ## License
56
+
57
+ OpenSees is (c) The Regents of the University of California. See `LICENSE`.
58
+ This package only redistributes compiled binaries of the upstream source.
@@ -0,0 +1,12 @@
1
+ openseespyandroid/__init__.py,sha256=6f28Vr3lkNiLiz-ZbZZSdGPUTF_2UkXOKd--SHzuAwY,2277
2
+ openseespyandroid/bin/opensees_cp311.so,sha256=DU630cYlvRfPMV11bef-Qr4bFHkRGJfUsvNUGxmnErY,34867792
3
+ openseespyandroid/bin/opensees_cp312.so,sha256=0muFJ3vbHeVxqg6w4NfZ7w6RZhXPtKPC5QHDlzCbxOQ,34869376
4
+ openseespyandroid/bin/opensees_cp313.so,sha256=ugaWQJ_7yPZpyOB3mL2KygVPmqiCBdJjyRtH-ZFmjD8,34869376
5
+ openseespyandroid/libs/libc++_shared.so,sha256=P6l1w4judAf3WlYvihV_OzKcy-pW00URowvs-hndZlo,1563297
6
+ openseespyandroid/libs/libhdf5.so,sha256=YNplvPiK-uAuKp9NFUxgEAuQCHtNMxiiAS0qMr4wnao,4915056
7
+ openseespyandroid/libs/libz.so.1,sha256=H-3IifvEWkaF3t7Z3N8X-DTYRWFjucTu52SAsLe_Qbo,74056
8
+ openseespyandroid-3.7.1.0.dist-info/licenses/LICENSE,sha256=VO0v6X28MMa4x34JTnHyDCVcUqZCzmbSeajxtqNnYDY,2108
9
+ openseespyandroid-3.7.1.0.dist-info/METADATA,sha256=dFDMUZIrQKrbiZBPLytByHzCU-DlCDhBpYaaXN-yrHw,1775
10
+ openseespyandroid-3.7.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
11
+ openseespyandroid-3.7.1.0.dist-info/top_level.txt,sha256=JLTg5yXvjjXh3fofHlw16xcdq7V6aeQDcjdvxjsbvsw,18
12
+ openseespyandroid-3.7.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,32 @@
1
+ Copyright @ 1999-2020 The Regents of the University of California (The Regents). All Rights Reserved.
2
+
3
+ The Regents grants permission, without fee and without a written license agreement, for (a) use,
4
+ reproduction, modification, and distribution of this software and its documentation by educational,
5
+ research, and non-profit entities for noncommercial purposes only; and (b) use, reproduction and
6
+ modification of this software by other entities for internal purposes only. The above copyright
7
+ notice, this paragraph and the following three paragraphs must appear in all copies and modifications
8
+ of the software and/or documentation.
9
+
10
+
11
+ Permission to incorporate this software into products for commercial distribution may be obtained
12
+ by contacting the University of California
13
+ Office of Technology Licensing
14
+ 2150 Shattuck Avenue #510,
15
+ Berkeley, CA 94720-1620,
16
+ (510) 643-7201.
17
+
18
+ This software program and documentation are copyrighted by The Regents of the University of California.
19
+ The Regents does not warrant that the operation of the program will be uninterrupted or error-free. The
20
+ end-user understands that the program was developed for research purposes and is advised not to rely
21
+ exclusively on the program for any reason.
22
+
23
+ IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
24
+ DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS
25
+ HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. REGENTS GRANTS NO EXPRESS OR IMPLIED LICENSE IN ANY PATENT
26
+ RIGHTS OF REGENTS BUT HAS IMPLEMENTED AN INDIVIDUAL CONTRIBUTOR LICENSE AGREEMENT FOR THE OPENSEES PROJECT AT
27
+ THE UNIVERISTY OF CALIFORNIA, BERKELEY TO BENEFIT THE END USER.
28
+
29
+ REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
30
+ AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED
31
+ "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
32
+
@@ -0,0 +1 @@
1
+ openseespyandroid