-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28556 from pavelzw/py-crude-resource-monitor
- Loading branch information
Showing
4 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/build.rs b/build.rs | ||
index ef934f7..2b8bb5b 100644 | ||
--- a/build.rs | ||
+++ b/build.rs | ||
@@ -1,7 +1,7 @@ | ||
use std::process::Command; | ||
|
||
fn main() { | ||
- let pnpm_executable = if cfg!(windows) { "pnpm.cmd" } else { "pnpm" }; | ||
+ let pnpm_executable = if cfg!(windows) { "pnpm.bat" } else { "pnpm" }; | ||
|
||
Command::new(pnpm_executable) | ||
.args(["install"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@echo on | ||
|
||
set CARGO_PROFILE_RELEASE_STRIP=symbols | ||
set CARGO_PROFILE_RELEASE_LTO=fat | ||
|
||
:: dump licenses | ||
cargo-bundle-licenses ^ | ||
--format yaml ^ | ||
--output "%SRC_DIR%\THIRDPARTY.yml" ^ | ||
|| exit 1 | ||
|
||
@REM https://github.com/prefix-dev/rattler-build/issues/1165 | ||
cd frontend && ^ | ||
pnpm install && ^ | ||
pnpm-licenses generate-disclaimer ^ | ||
--prod ^ | ||
--output-file=..\THIRDPARTY-frontend.yml ^ | ||
&& ^ | ||
cd .. && ^ | ||
cargo install --locked ^ | ||
--root "%PREFIX%" ^ | ||
--path . ^ | ||
--no-track ^ | ||
|| exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o xtrace -o nounset -o pipefail -o errexit | ||
|
||
export CARGO_PROFILE_RELEASE_STRIP=symbols | ||
export CARGO_PROFILE_RELEASE_LTO=fat | ||
|
||
cargo-bundle-licenses \ | ||
--format yaml \ | ||
--output THIRDPARTY.yml | ||
|
||
pushd frontend | ||
pnpm install | ||
pnpm-licenses generate-disclaimer --prod --output-file=../THIRDPARTY-frontend.yml | ||
popd | ||
|
||
if [[ "$target_platform" == linux* ]] | ||
then | ||
export RUSTFLAGS="-C link-arg=-Wl,-rpath-link,${PREFIX}/lib -L${PREFIX}/lib" | ||
cargo install --no-track --locked --features unwind --root "$PREFIX" --path . | ||
else | ||
cargo install --no-track --locked --root "$PREFIX" --path . | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
context: | ||
name: py-crude-resource-monitor | ||
version: 0.1.0 | ||
|
||
package: | ||
name: ${{ name|lower }} | ||
version: ${{ version }} | ||
|
||
source: | ||
# url: https://github.com/I-Al-Istannen/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz | ||
# sha256: 2e8a752fcb9342030794524a24a7425291d12a2d7fd8980740c6c95964fba126 | ||
url: https://github.com/I-Al-Istannen/py-crude-resource-monitor/archive/063377e8250061fe14a69b0da23ccdda7d9abeff.tar.gz | ||
sha256: 2d363ae1763a6e5d4ccbf8224cb64f446be5d3920240fbcbbff44182a3c16160 | ||
patches: | ||
- if: win | ||
then: 0001-pnpm-bat.patch | ||
|
||
build: | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- pnpm | ||
- pnpm-licenses | ||
- ${{ compiler('rust') }} | ||
- ${{ compiler('c') }} | ||
- ${{ stdlib('c') }} | ||
- cargo-bundle-licenses | ||
host: | ||
- if: linux | ||
then: | ||
- libunwind | ||
|
||
tests: | ||
- script: | ||
- py-crude-resource-monitor --help | ||
|
||
about: | ||
homepage: https://github.com/I-Al-Istannen/${{ name }} | ||
summary: A memory and cpu utilization monitor that correlates the data with Python stacktraces. Supports multiprocessing. | ||
license: MIT | ||
license_file: | ||
- LICENSE | ||
- THIRDPARTY.yml | ||
- THIRDPARTY-frontend.yml | ||
|
||
extra: | ||
recipe-maintainers: | ||
- pavelzw |