Skip to content

Commit 2959e98

Browse files
committed
stdlib : Publish to pypi.
Signed-off-by: Jos Verlinde <[email protected]>
1 parent 94ffe7d commit 2959e98

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

publish/micropython-stdlib-stubs/publish.ipynb

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
},
2525
"outputs": [],
2626
"source": [
27-
"if False: \n",
28-
" testpypi_token = \"pypi-taken-to-store\n",
27+
"if True: \n",
28+
" testpypi_token = \"pypi-token-to-store\"\n",
29+
" pypi_token = \"pypi-token-to-store\"\n",
2930
"\n",
3031
" import keyring\n",
3132
"\n",
3233
" # Set the token in the keyring\n",
33-
" keyring.set_password('testpypi', 'uv_publish', testpypi_token)"
34+
" # keyring.set_password('testpypi', 'uv_publish', testpypi_token)\n",
35+
" keyring.set_password('pypi', 'uv_publish',pypi_token )"
3436
]
3537
},
3638
{
@@ -42,7 +44,7 @@
4244
"import keyring\n",
4345
"\n",
4446
"# Get the token from the keyring\n",
45-
"retrieved_token = keyring.get_password(\"testpypi\", \"uv_publish\")\n"
47+
"retrieved_token = keyring.get_password(\"testpypi\", \"uv_publish\")"
4648
]
4749
},
4850
{
@@ -94,25 +96,32 @@
9496
},
9597
{
9698
"cell_type": "code",
97-
"execution_count": 3,
99+
"execution_count": 6,
98100
"metadata": {},
99101
"outputs": [
100102
{
101-
"name": "stdout",
103+
"name": "stderr",
102104
"output_type": "stream",
103105
"text": [
104-
"No token found in keyring\n"
106+
"\u001b[1m\u001b[33mwarning\u001b[39m\u001b[0m\u001b[1m:\u001b[0m \u001b[1m`uv publish` is experimental and may change without warning\u001b[0m\n",
107+
"Publishing 2 files https://upload.pypi.org/legacy/\n",
108+
"\u001b[32m\u001b[1mUploading\u001b[0m\u001b[39m micropython_stdlib_stubs-1.24.1-py3-none-any.whl \u001b[2m(135.2KiB)\u001b[0m\n",
109+
"\u001b[32m\u001b[1mUploading\u001b[0m\u001b[39m micropython_stdlib_stubs-1.24.1.tar.gz \u001b[2m(117.6KiB)\u001b[0m\n"
105110
]
106111
}
107112
],
108113
"source": [
109114
"import keyring\n",
110115
"\n",
111116
"# Get the token from the keyring\n",
112-
"retrieved_token = keyring.get_password(\"pypi\", \"uv_publish\")\n",
113-
"if not retrieved_token:\n",
117+
"pypi_token = keyring.get_password(\"pypi\", \"uv_publish\")\n",
118+
"if not pypi_token:\n",
114119
" print(\"No token found in keyring\")\n",
115-
" exit(1)\n"
120+
" exit(1)\n",
121+
"\n",
122+
"!uv publish --token={pypi_token} \n",
123+
"pypi_token = None\n",
124+
"del pypi_token \n"
116125
]
117126
}
118127
],

0 commit comments

Comments
 (0)