Skip to content

Commit

Permalink
hello world on real python
Browse files Browse the repository at this point in the history
  • Loading branch information
DenKoren committed Oct 22, 2024
1 parent 20ced70 commit 961d8a9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/node_modules/
/pkg-*.tgz
/tests
package.sw.json
7 changes: 7 additions & 0 deletions hello-world-py/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import sys

name = "world"
if len(sys.argv) > 1:
name = sys.argv[1]

print(f'Hello, {name}!')
Empty file added hello-world-py/requirements.txt
Empty file.
1 change: 0 additions & 1 deletion java-stub/package.sw.json

This file was deleted.

11 changes: 9 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 24 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@milaboratories/software-small-binaries",
"version": "1.12.0",
"version": "1.13.0",
"description": "Small cross-platform binaries, like 'sleep' or 'hello-world', suitable for test needs",
"scripts": {
"cleanup": "rm -rf ./pkg-*.tgz && rm -rf ./build/ && rm -rf ./dist/",
Expand Down Expand Up @@ -32,6 +32,19 @@
}
},

"hello-world-py": {
"registry": "platforma-open",
"version": "1.0.0",
"root": "./hello-world-py",

"type": "python",
"environment": "@platforma-open/milaboratories.runenv-python-3:3.12.6",
"dependencies": {
"toolset": "pip",
"requirements": "requirements.txt"
}
},

"sleep": {
"registry": "platforma-open",
"version": "1.0.0",
Expand Down Expand Up @@ -72,7 +85,7 @@
},

"table-converter": {
"registry": "platforma-open" ,
"registry": "platforma-open",
"version": "1.2.0",
"type": "binary",
"roots": {
Expand Down Expand Up @@ -100,7 +113,7 @@
},

"runenv-python-stub": {
"registry": "platforma-open" ,
"registry": "platforma-open",
"version": "1.0.2",
"type": "environment",
"runtime": "python",
Expand Down Expand Up @@ -131,6 +144,13 @@
"cmd": [ "{pkg}/hello-world" ]
}
},

"hello-world-py": {
"binary": {
"artifact": "hello-world-py",
"cmd": [ "{python}", "{pkg}/hello.py" ]
}
},
"sleep": {
"binary": {
"artifact": "sleep",
Expand Down Expand Up @@ -190,6 +210,7 @@
],
"license": "UNLICENSED",
"devDependencies": {
"@platforma-open/milaboratories.runenv-python-3": "^1.0.0",
"@platforma-sdk/package-builder": "^2.9.2"
}
}

0 comments on commit 961d8a9

Please sign in to comment.