febolt 0.1.9__tar.gz

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,401 @@
1
+
2
+ name: Python
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ tags:
9
+ - '*'
10
+ pull_request:
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ linux:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
23
+ target: ["x86_64"]
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Cache Rust
28
+ uses: actions/cache@v4
29
+ with:
30
+ path: |
31
+ ~/.cargo/registry
32
+ ~/.cargo/git
33
+ target
34
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
35
+
36
+ - name: Cache Python
37
+ uses: actions/cache@v4
38
+ with:
39
+ path: |
40
+ ~/.cache/pip
41
+ ~/.local/lib/python${{ matrix.python-version }}/site-packages
42
+ key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/Cargo.toml') }}
43
+
44
+ - name: Install system dependencies
45
+ run: |
46
+ sudo apt-get update -q
47
+ # No need to install libopenblas-dev since we'll build it from source.
48
+ sudo apt-get install -y --no-install-recommends \
49
+ libssl-dev openssl pkg-config build-essential
50
+
51
+ - uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ matrix.python-version }}
54
+
55
+ - name: Install Python dependencies
56
+ run: |
57
+ python -m pip install --upgrade pip setuptools wheel
58
+ if [[ "${{ matrix.python-version }}" == "3.12" ]]; then
59
+ pip install numpy==1.26.4
60
+ else
61
+ pip install numpy==1.24.0
62
+ fi
63
+
64
+ - name: Build wheels
65
+ uses: PyO3/maturin-action@v1
66
+ # No need to set OPENBLAS_DIR since openblas-src will build OpenBLAS
67
+ with:
68
+ target: ${{ matrix.target }}
69
+ args: --release --out dist --features openblas # This now uses openblas-static from Cargo.toml
70
+ sccache: 'true'
71
+ manylinux: auto
72
+ docker-options: -e OPENSSL_NO_VENDOR=1
73
+ before-script-linux: |
74
+ yum install -y epel-release
75
+ yum install -y openssl-devel perl-IPC-Cmd perl-Test-Simple perl-App-cpanminus
76
+ # Do not install openblas-devel because we want openblas-src to build OpenBLAS
77
+ cpanm --notest Term::Table
78
+ export OPENBLAS_NO_AVX2=1
79
+
80
+ - name: Upload wheels
81
+ uses: actions/upload-artifact@v4
82
+ with:
83
+ name: wheels-linux-${{ matrix.python-version }}
84
+ path: dist
85
+
86
+ windows:
87
+ runs-on: windows-latest
88
+ strategy:
89
+ fail-fast: false
90
+ matrix:
91
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
92
+ env:
93
+ MKL_VERSION: "2025.0.1.47"
94
+ steps:
95
+ - uses: actions/checkout@v4
96
+
97
+ - name: Cache Rust
98
+ uses: actions/cache@v4
99
+ with:
100
+ path: |
101
+ ~\.cargo\registry
102
+ ~\.cargo\git
103
+ target
104
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
105
+
106
+ - name: Cache Python
107
+ uses: actions/cache@v4
108
+ with:
109
+ path: |
110
+ ~\AppData\Local\pip\Cache
111
+ ${{ env.pythonLocation }}\Lib\site-packages
112
+ key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/Cargo.toml') }}
113
+
114
+
115
+ - name: Install Intel oneAPI Math Kernel Library (oneMKL)
116
+ shell: pwsh
117
+ run: |
118
+ Write-Output "Starting Intel oneAPI BaseKit installation..."
119
+
120
+ # Construct the installer URL using MKL_VERSION
121
+ $MKL_VERSION = "${{ env.MKL_VERSION }}"
122
+ $URL = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ae29263e-38b9-4d43-86c3-376d6e0668e7/intel-oneapi-base-toolkit-${MKL_VERSION}_offline.exe"
123
+ $COMPONENTS = "intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel:intel.oneapi.win.dpl"
124
+ $INSTALLER_PATH = "$env:TEMP\webimage.exe"
125
+ $EXTRACTED_PATH = "$env:TEMP\webimage_extracted"
126
+ $EXTRACT_LOG = "$env:TEMP\extract.log"
127
+ $INSTALL_LOG_DIR = "$env:TEMP\mkl_install_logs"
128
+
129
+ Write-Output "Downloading Intel oneAPI BaseKit installer from $URL..."
130
+ try {
131
+ Invoke-WebRequest -Uri $URL -OutFile $INSTALLER_PATH -UseBasicParsing -ErrorAction Stop
132
+ Write-Output "Download completed successfully."
133
+ } catch {
134
+ Write-Error "Failed to download the MKL installer: $_"
135
+ exit 1
136
+ }
137
+
138
+ Write-Output "Extracting the installer..."
139
+ try {
140
+ Start-Process -FilePath $INSTALLER_PATH -ArgumentList "-s", "-x", "-f", $EXTRACTED_PATH, "--log", $EXTRACT_LOG -Wait -NoNewWindow
141
+ Write-Output "Extraction completed successfully."
142
+ } catch {
143
+ Write-Error "Extraction failed: $_"
144
+ if (Test-Path $EXTRACT_LOG) {
145
+ Write-Output "---- Extract Log Start ----"
146
+ Get-Content $EXTRACT_LOG | Write-Output
147
+ Write-Output "---- Extract Log End ----"
148
+ }
149
+ exit 1
150
+ }
151
+
152
+ Remove-Item $INSTALLER_PATH -Force
153
+
154
+ Write-Output "Running the MKL bootstrapper..."
155
+ try {
156
+ Start-Process -FilePath "$EXTRACTED_PATH\bootstrapper.exe" -ArgumentList "-s", "--action", "install", "--components=$COMPONENTS", "--eula=accept", "-p=NEED_VS2017_INTEGRATION=0", "-p=NEED_VS2019_INTEGRATION=0", "-p=NEED_VS2022_INTEGRATION=0", "--log-dir=$INSTALL_LOG_DIR" -Wait -NoNewWindow
157
+ Write-Output "MKL bootstrapper completed successfully."
158
+ } catch {
159
+ Write-Error "MKL bootstrapper failed: $_"
160
+ if (Test-Path "$INSTALL_LOG_DIR\*.log") {
161
+ Write-Output "---- MKL Installation Logs Start ----"
162
+ Get-ChildItem "$INSTALL_LOG_DIR\*.log" | ForEach-Object {
163
+ Write-Output "--- Log File: $_ ---"
164
+ Get-Content $_ | Write-Output
165
+ Write-Output "--- End of $_ ---"
166
+ }
167
+ Write-Output "---- MKL Installation Logs End ----"
168
+ }
169
+ exit 1
170
+ }
171
+
172
+ Remove-Item -Recurse -Force $EXTRACTED_PATH
173
+
174
+ Write-Output "MKL installed successfully."
175
+
176
+ - name: List oneAPI Installation Directory
177
+ shell: pwsh
178
+ run: |
179
+ $oneapi_path = "C:\Program Files (x86)\Intel\oneAPI\mkl\2025.0"
180
+ Write-Output "Listing contents of ${oneapi_path}:"
181
+ if (Test-Path $oneapi_path) {
182
+ Get-ChildItem -Path $oneapi_path -Directory | Select-Object Name, FullName
183
+ } else {
184
+ Write-Error "oneAPI installation path does not exist: $oneapi_path"
185
+ }
186
+
187
+ - name: Find MKL lib path
188
+ shell: pwsh
189
+ id: find_mkl_lib
190
+ run: |
191
+ $mkl_base_path = "C:\Program Files (x86)\Intel\oneAPI\mkl"
192
+ if (Test-Path $mkl_base_path) {
193
+ # Get the latest MKL version directory
194
+ $latest_mkl = Get-ChildItem -Path $mkl_base_path -Directory | Sort-Object Name -Descending | Select-Object -First 1
195
+ if ($latest_mkl) {
196
+ $mkl_lib_path = "$($latest_mkl.FullName)\lib"
197
+ Write-Output "MKL lib path found: $mkl_lib_path"
198
+ # Set the output using environment file
199
+ echo "mkl_lib_path=$mkl_lib_path" >> $env:GITHUB_OUTPUT
200
+ } else {
201
+ Write-Error "No MKL versions found in $mkl_base_path"
202
+ }
203
+ } else {
204
+ Write-Error "MKL installation base path does not exist: $mkl_base_path"
205
+ }
206
+
207
+ - name: Setup MKL environment variables
208
+ shell: pwsh
209
+ run: |
210
+ $mkl_lib_path = "${{ steps.find_mkl_lib.outputs.mkl_lib_path }}"
211
+ Write-Output "Setting MKL_LIB_PATH to $mkl_lib_path"
212
+ echo "MKL_LIB_PATH=$mkl_lib_path" >> $env:GITHUB_ENV
213
+
214
+ - name: List MKL lib directory
215
+ shell: pwsh
216
+ run: |
217
+ $mkl_lib_path = "${{ env.MKL_LIB_PATH }}"
218
+ Write-Output "Listing contents of ${mkl_lib_path}:"
219
+ if (Test-Path $mkl_lib_path) {
220
+ Get-ChildItem -Path $mkl_lib_path -Recurse -Filter "*.lib" | Select-Object FullName, Name
221
+ } else {
222
+ Write-Error "MKL lib path does not exist: $mkl_lib_path"
223
+ }
224
+
225
+ - name: Verify MKL Installation
226
+ shell: pwsh
227
+ run: |
228
+ $mkl_lib_path = "${{ env.MKL_LIB_PATH }}"
229
+ Write-Output "Checking MKL libraries in: ${mkl_lib_path}"
230
+ if (Test-Path $mkl_lib_path) {
231
+ Write-Output "MKL lib directory exists. Listing .lib files:"
232
+ Get-ChildItem -Path $mkl_lib_path -Recurse -Filter "*.lib" | Select-Object FullName, Name
233
+ } else {
234
+ Write-Error "MKL library path does not exist: $mkl_lib_path"
235
+ }
236
+
237
+ - name: Upload Extraction Log
238
+ uses: actions/upload-artifact@v4
239
+ with:
240
+ name: extract-log
241
+ path: "$env:TEMP\extract.log"
242
+
243
+ - name: Upload MKL Installation Logs
244
+ uses: actions/upload-artifact@v4
245
+ with:
246
+ name: mkl-install-logs
247
+ path: "${{ runner.temp }}/mkl_install_logs/*"
248
+
249
+ - name: Setup MKL environment variables for Build
250
+ shell: pwsh
251
+ run: |
252
+ $mkl_lib_path = "${{ env.MKL_LIB_PATH }}"
253
+ $mkl_bin_path = $mkl_lib_path.Replace('\lib', '\bin\intel64')
254
+
255
+ $env:MKL_INTERFACE_LAYER = "LP64"
256
+ $env:MKL_THREADING_LAYER = "SEQ"
257
+ $env:PATH += ";$mkl_bin_path"
258
+
259
+ Write-Output "MKL_INTERFACE_LAYER set to LP64"
260
+ Write-Output "MKL_THREADING_LAYER set to SEQ"
261
+ Write-Output "Updated PATH to include: $mkl_bin_path"
262
+
263
+ # Export variables for subsequent steps
264
+ echo "MKL_INTERFACE_LAYER=$env:MKL_INTERFACE_LAYER" >> $env:GITHUB_ENV
265
+ echo "MKL_THREADING_LAYER=$env:MKL_THREADING_LAYER" >> $env:GITHUB_ENV
266
+ echo "PATH=$env:PATH" >> $env:GITHUB_ENV
267
+
268
+ - uses: actions/setup-python@v5
269
+ with:
270
+ python-version: ${{ matrix.python-version }}
271
+
272
+ - name: Install Python dependencies
273
+ shell: pwsh
274
+ run: |
275
+ python -m pip install --upgrade pip setuptools wheel
276
+ if ("${{ matrix.python-version }}" -eq "3.12") {
277
+ pip install numpy==1.26.4
278
+ } else {
279
+ pip install numpy==1.24.0
280
+ }
281
+
282
+ - name: Build wheels
283
+ uses: PyO3/maturin-action@v1
284
+ with:
285
+ target: x86_64
286
+ args: --release --out dist --features intel-mkl-static
287
+ env:
288
+ CARGO_FEATURE_INTEL_MKL_STATIC: "1"
289
+ MKL_INTERFACE_LAYER: "LP64"
290
+ MKL_THREADING_LAYER: "SEQ"
291
+ RUST_LOG: "intel_mkl_src=debug"
292
+ sccache: 'true'
293
+
294
+ - name: Upload wheels
295
+ uses: actions/upload-artifact@v4
296
+ with:
297
+ name: wheels-windows-${{ matrix.python-version }}
298
+ path: dist
299
+ macos:
300
+ runs-on: ${{ matrix.platform.runner }}
301
+ strategy:
302
+ fail-fast: false
303
+ matrix:
304
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
305
+ platform:
306
+ - runner: macos-13
307
+ target: x86_64
308
+ - runner: macos-14
309
+ target: aarch64
310
+ steps:
311
+ - uses: actions/checkout@v4
312
+
313
+ - name: Cache Homebrew
314
+ uses: actions/cache@v4
315
+ with:
316
+ path: |
317
+ ~/Library/Caches/Homebrew
318
+ /usr/local/Homebrew
319
+ key: ${{ runner.os }}-brew-${{ hashFiles('**/Cargo.toml') }}
320
+
321
+ - name: Cache Rust
322
+ uses: actions/cache@v4
323
+ with:
324
+ path: |
325
+ ~/.cargo/registry
326
+ ~/.cargo/git
327
+ target
328
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
329
+
330
+ - name: Cache Python
331
+ uses: actions/cache@v4
332
+ with:
333
+ path: |
334
+ ~/Library/Caches/pip
335
+ ~/.local/lib/python${{ matrix.python-version }}/site-packages
336
+ key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/Cargo.toml') }}
337
+
338
+ - uses: actions/setup-python@v5
339
+ with:
340
+ python-version: ${{ matrix.python-version }}
341
+
342
+ - name: Install dependencies
343
+ run: |
344
+ # Disable Homebrew auto-update
345
+ export HOMEBREW_NO_AUTO_UPDATE=1
346
+ brew install openssl openblas
347
+ echo "OPENSSL_DIR=$(brew --prefix openssl)" >> $GITHUB_ENV
348
+ echo "OPENSSL_LIB_DIR=$(brew --prefix openssl)/lib" >> $GITHUB_ENV
349
+ echo "OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)/include" >> $GITHUB_ENV
350
+
351
+ python -m pip install --upgrade pip setuptools wheel
352
+ if [[ "${{ matrix.python-version }}" == "3.12" ]]; then
353
+ pip install numpy==1.26.4
354
+ else
355
+ pip install numpy==1.24.0
356
+ fi
357
+
358
+ - name: Build wheels
359
+ uses: PyO3/maturin-action@v1
360
+ with:
361
+ target: ${{ matrix.platform.target }}
362
+ args: --release --out dist --features openblas # Explicitly enable openblas
363
+ sccache: 'true'
364
+
365
+ - name: Upload wheels
366
+ uses: actions/upload-artifact@v4
367
+ with:
368
+ name: wheels-macos-${{ matrix.python-version }}-${{ matrix.platform.target }}
369
+ path: dist
370
+
371
+ sdist:
372
+ runs-on: ubuntu-latest
373
+ steps:
374
+ - uses: actions/checkout@v4
375
+ - name: Build sdist
376
+ uses: PyO3/maturin-action@v1
377
+ with:
378
+ command: sdist
379
+ args: --out dist
380
+
381
+ - name: Upload sdist
382
+ uses: actions/upload-artifact@v4
383
+ with:
384
+ name: wheels-sdist
385
+ path: dist
386
+
387
+ release:
388
+ name: Release
389
+ runs-on: ubuntu-latest
390
+ if: "startsWith(github.ref, 'refs/tags/')"
391
+ needs: [linux, windows, macos, sdist]
392
+ steps:
393
+ - uses: actions/download-artifact@v4
394
+
395
+ - name: Publish to PyPI
396
+ uses: PyO3/maturin-action@v1
397
+ env:
398
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
399
+ with:
400
+ command: upload
401
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,76 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
73
+
74
+ ## Python ###
75
+ # Virtual environments
76
+ vcpkg/