From 66ccce131a48870519ce21cdf0e30ddf9abddb6e Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Mon, 13 May 2024 12:41:48 +0200 Subject: [PATCH 1/4] tiktoken --- recipes/recipes_emscripten/tiktoken/build.sh | 6 ++++ .../recipes_emscripten/tiktoken/recipe.yaml | 36 +++++++++++++++++++ .../tiktoken/test_tiktoken.py | 4 +++ 3 files changed, 46 insertions(+) create mode 100644 recipes/recipes_emscripten/tiktoken/build.sh create mode 100644 recipes/recipes_emscripten/tiktoken/recipe.yaml create mode 100644 recipes/recipes_emscripten/tiktoken/test_tiktoken.py diff --git a/recipes/recipes_emscripten/tiktoken/build.sh b/recipes/recipes_emscripten/tiktoken/build.sh new file mode 100644 index 000000000..47c63b944 --- /dev/null +++ b/recipes/recipes_emscripten/tiktoken/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + + +export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py +${PYTHON} -m pip install . -vvv + diff --git a/recipes/recipes_emscripten/tiktoken/recipe.yaml b/recipes/recipes_emscripten/tiktoken/recipe.yaml new file mode 100644 index 000000000..1716ff2d8 --- /dev/null +++ b/recipes/recipes_emscripten/tiktoken/recipe.yaml @@ -0,0 +1,36 @@ +context: + name: tiktoken + version: 0.6.0 + +package: + name: ${{name}} + version: ${{ version }} + +source: +- url: https://pypi.io/packages/source/t/${{ name }}/tiktoken-${{ version }}.tar.gz + sha256: ace62a4ede83c75b0374a2ddfa4b76903cf483e9cb06247f566be3bf14e6beed + +build: + number: 0 + +requirements: + build: + - cross-python_${{target_platform}} + - setuptools-rust + - rust + - cargo-bundle-licenses + host: + - python + - openssl + + +tests: +- script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_tiktoken.py diff --git a/recipes/recipes_emscripten/tiktoken/test_tiktoken.py b/recipes/recipes_emscripten/tiktoken/test_tiktoken.py new file mode 100644 index 000000000..7a55423d8 --- /dev/null +++ b/recipes/recipes_emscripten/tiktoken/test_tiktoken.py @@ -0,0 +1,4 @@ + +def test_import(): + import tiktoken + \ No newline at end of file From 32e89f0b5abda38f6c4909f0ea145f715f655da0 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 14 May 2024 11:50:34 +0200 Subject: [PATCH 2/4] Update recipe.yaml --- recipes/recipes_emscripten/tiktoken/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/tiktoken/recipe.yaml b/recipes/recipes_emscripten/tiktoken/recipe.yaml index 1716ff2d8..0519f2378 100644 --- a/recipes/recipes_emscripten/tiktoken/recipe.yaml +++ b/recipes/recipes_emscripten/tiktoken/recipe.yaml @@ -21,7 +21,7 @@ requirements: - cargo-bundle-licenses host: - python - - openssl + - regex tests: From fd80bfdc2d74876b16e472d33cad22c115caea9b Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 14 May 2024 11:57:36 +0200 Subject: [PATCH 3/4] Update recipe.yaml --- recipes/recipes_emscripten/tiktoken/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/recipes_emscripten/tiktoken/recipe.yaml b/recipes/recipes_emscripten/tiktoken/recipe.yaml index 0519f2378..5c1beb831 100644 --- a/recipes/recipes_emscripten/tiktoken/recipe.yaml +++ b/recipes/recipes_emscripten/tiktoken/recipe.yaml @@ -21,6 +21,7 @@ requirements: - cargo-bundle-licenses host: - python + run: - regex From 06561736efc1684eafed22773c76805b83e58608 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Tue, 14 May 2024 12:08:17 +0200 Subject: [PATCH 4/4] lic --- recipes/recipes_emscripten/tiktoken/build.sh | 2 +- recipes/recipes_emscripten/tiktoken/recipe.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/tiktoken/build.sh b/recipes/recipes_emscripten/tiktoken/build.sh index 47c63b944..8677adb18 100644 --- a/recipes/recipes_emscripten/tiktoken/build.sh +++ b/recipes/recipes_emscripten/tiktoken/build.sh @@ -1,5 +1,5 @@ #!/bin/bash - +cargo-bundle-licenses --format yaml --output THIRDPARTY.yml export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py ${PYTHON} -m pip install . -vvv diff --git a/recipes/recipes_emscripten/tiktoken/recipe.yaml b/recipes/recipes_emscripten/tiktoken/recipe.yaml index 1716ff2d8..dc27fd1ba 100644 --- a/recipes/recipes_emscripten/tiktoken/recipe.yaml +++ b/recipes/recipes_emscripten/tiktoken/recipe.yaml @@ -34,3 +34,10 @@ tests: files: recipe: - test_tiktoken.py + + +about: + license_family: MIT + license_file: + - LICENSE + - THIRDPARTY.yml \ No newline at end of file