This repository was archived by the owner on Apr 20, 2025. It is now read-only.
File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,28 @@ use this token when publishing instead of your username and password.
47
47
As username, use ` __token__ ` .
48
48
As password, use the token itself, including the ` pypi- ` prefix.
49
49
50
- See https://pypi.org/help/#apitoken for help using API tokens to publish.
50
+ See https://pypi.org/help/#apitoken for help using API tokens to publish. This is what I have in ` ~/.pypirc ` :
51
+
52
+ ```
53
+ [distutils]
54
+ index-servers =
55
+ rsa
56
+
57
+ # Use `twine upload -r rsa` to upload with this token.
58
+ [rsa]
59
+ username = __token__
60
+ password = pypi-token
61
+ ```
51
62
52
63
```
53
64
. ./.venv/bin/activate
54
- poetry publish --build
65
+ pip install twine
66
+
67
+ poetry build
68
+ twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
69
+ twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
55
70
```
71
+
72
+ The ` pip install twine ` is necessary as Python-RSA requires Python >= 3.6, and
73
+ Twine requires at least version 3.7. This means Poetry refuses to add it as
74
+ dependency.
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ DATE=$(date +'%Y-%m-%d')
9
9
10
10
sed " s/__date__\s=\s\" [^\" ]*\" /__date__ = \" $DATE \" /" -i rsa/__init__.py
11
11
sed " s/__version__\s=\s\" [^\" ]*\" /__version__ = \" $1 \" /" -i rsa/__init__.py
12
+ sed " s+dist/rsa-[\d.]+.tar.gz+__version__ = \" $1 \" /" -i README.md
12
13
poetry version " $1 "
13
14
14
15
git diff
You can’t perform that action at this time.
0 commit comments