mirror of
https://github.com/Magnus167/msyrs.git
synced 2025-08-20 07:20:01 +00:00
adding scripts
This commit is contained in:
parent
89f20299b5
commit
cc08a3da59
23
scripts/win/build.ps1
Normal file
23
scripts/win/build.ps1
Normal file
@ -0,0 +1,23 @@
|
||||
# run command: maturin --help. if it fails, print the error message and exit
|
||||
try {
|
||||
maturin --help > $null
|
||||
} catch {
|
||||
Write-Error "Failed to run maturin --help: $_"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# delete any existing build directory
|
||||
Remove-Item -Path ./build -Recurse -Force -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Path ./build > $null
|
||||
|
||||
# copy ./src/msyrs.pyi to ./msyrs.pyi
|
||||
Copy-Item -Path ./src/msyrs.pyi -Destination ./msyrs.pyi
|
||||
|
||||
maturin build --release --sdist --out ./build/
|
||||
$whl = Get-ChildItem -Path ./build/*.whl
|
||||
# rename the wheel wheel.whl to wheel.zip
|
||||
Rename-Item -Path $whl -NewName ($whl.BaseName + ".zip")
|
||||
|
||||
# delete the pyi file
|
||||
Remove-Item -Path ./msyrs.pyi
|
16
scripts/win/install.ps1
Normal file
16
scripts/win/install.ps1
Normal file
@ -0,0 +1,16 @@
|
||||
# uv pip install maturin
|
||||
|
||||
try {
|
||||
maturin --help > $null
|
||||
} catch {
|
||||
Write-Error "Failed to run maturin --help: $_"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# copy ./src/msyrs.pyi to ./msyrs.pyi
|
||||
Copy-Item -Path ./src/msyrs.pyi -Destination ./msyrs.pyi
|
||||
|
||||
maturin develop --release
|
||||
|
||||
# delete the pyi file
|
||||
Remove-Item -Path ./msyrs.pyi
|
Loading…
x
Reference in New Issue
Block a user