Skip to content

Commit 389e2f9

Browse files
committed
Use twine to publish the package
1 parent 541f931 commit 389e2f9

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.devcontainer/.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PYPI_TOKEN=your_pypi_token

.devcontainer/devcontainer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{
44
"name": "Python 3",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
// "remoteEnv": {
7-
// "PYPI_TOKEN": "${env:PYPI_TOKEN}"
6+
// "build": {
7+
// "dockerfile": "Dockerfile"
88
// },
99
"runArgs": [
1010
"--env-file",
@@ -19,10 +19,10 @@
1919
// Features to add to the dev container. More info: https://containers.dev/features.
2020
// "features": {},
2121
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22-
// "forwardPorts": [],
22+
// "forwardPorts": [],:
2323
// Use 'postCreateCommand' to run commands after the container is created.
24-
// "postCreateCommand": "pip3 install --user -r requirements.txt",
25-
"postCreateCommand": "echo '[pypi]\nusername = __token__\npassword = '\"$PYPI_TOKEN\"'' > ~/.pypirc && chmod 600 ~/.pypirc"
24+
// "postCreateCommand": "pip install --no-cache-dir twine && echo '[pypi]\nusername = __token__\npassword = '\"$PYPI_TOKEN\"'' > ~/.pypirc && chmod 600 ~/.pypirc",
25+
"postCreateCommand": "pip install --no-cache-dir twine && printf '[pypi]\\n username = __token__\\n password = %s\\n' \"$PYPI_TOKEN\" > ~/.pypirc && chmod 600 ~/.pypirc",
2626
// Configure tool-specific properties.
2727
// "customizations": {},
2828
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.

0 commit comments

Comments
 (0)