Skip to content

Commit 54c4456

Browse files
committed
Version 1.2.1: fix some bug in check_meta.sh, rectify keyring in README.md
1 parent 47ee64a commit 54c4456

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# v1.2.1
2+
3+
![](https://img.shields.io/badge/Version-v1.2.1-green)
4+
5+
## 🔄 Change
6+
7+
- `check_meta.sh`: rectify logit of getting `Metadata-Version`
8+
- `README.md`: rectify usage of `keyring`.
9+
10+
---
11+
112
# v1.2.0
213

314
![](https://img.shields.io/badge/Version-v1.2.0-green)

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 📦 A Project Template for Self-developed Python Package
22

3-
![Package Version](https://img.shields.io/badge/Version-v1.2.0-green)
3+
![Package Version](https://img.shields.io/badge/Version-v1.2.1-green)
44
[![License](https://img.shields.io/badge/License-MIT-khaki)](https://opensource.org/license/MIT)
55
![Pypi Template](https://img.shields.io/badge/PyPI-Package_pattern-yellow?logo=pypi&labelColor=%23FAFAFA)
66

@@ -85,7 +85,7 @@ This repo provides an 𝐨𝐮𝐭-𝐨𝐟-𝐭𝐡𝐞-𝐛𝐨𝐱 𝐩𝐫
8585
cd MYPROJECT
8686
8787
# replace 'my-project' with your project name
88-
mv package-name my-project
88+
git mv package-name my-project
8989
```
9090
<details>
9191
<summary>𝘯𝘰𝘸 𝘺𝘰𝘶𝘳 𝘱𝘳𝘰𝘫𝘦𝘤𝘵 𝘴𝘵𝘳𝘶𝘤𝘵𝘶𝘳𝘦 𝘴𝘩𝘰𝘶𝘭𝘥 𝘣𝘦 𝘭𝘪𝘬𝘦 𝘵𝘩𝘪𝘴</summary>
@@ -330,13 +330,21 @@ This repo provides an 𝐨𝐮𝐭-𝐨𝐟-𝐭𝐡𝐞-𝐛𝐨𝐱 𝐩𝐫
330330
EOF
331331
332332
# encrypt your pypi token
333-
# same process for testpypi, just replace `pypi` with `testpypi`
334-
keyring set pypi <username>
333+
## pypi
334+
keyring set https://upload.pypi.org/legacy/ __token__
335335
336336
## enter your pypi token when prompted
337337
338338
# verify that the encrypted token has been stored
339-
keyring get pypi <username>
339+
keyring get https://upload.pypi.org/legacy/ __token__
340+
341+
## testpypi
342+
keyring set https://test.pypi.org/legacy/ __token__
343+
344+
## enter your pypi token when prompted
345+
346+
# verify that the encrypted token has been stored
347+
keyring get https://test.pypi.org/legacy/ __token__
340348
341349
# ---------------------- configure .pypirc ----------------------
342350
# refer to https://packaging.python.org/en/latest/specifications/pypirc/
@@ -379,9 +387,6 @@ This repo provides an 𝐨𝐮𝐭-𝐨𝐟-𝐭𝐡𝐞-𝐛𝐨𝐱 𝐩𝐫
379387
- [Official Python Packaging User Guide](https://packaging.python.org)
380388
- [Ruff document](https://docs.astral.sh/ruff/)
381389
- [Isort document](https://pycqa.github.io/isort/index.html)
382-
- [navdeep-/setup.py](https://jgithub.xyz/navdeep-G/setup.py)
383-
- [pypa/sampleproject](https://jgithub.xyz/pypa/sampleproject/)
384-
- [audreyfeldroy/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)
385390
386391
# 🧾 License
387392

check_meta.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ requires_python=$(grep 'python_requires' setup.cfg | rev | cut -d'=' -f1 | rev)
1111

1212
tar_output=$(tar xfO dist/*.tar.gz)
1313

14-
metadata_version=$(echo "$tar_output" | grep 'Metadata-Version:' | head -n 1 | cut -d' ' -f3)
14+
metadata_version=$(echo "$tar_output" | grep 'Metadata-Version:' | head -n 1 | rev | cut -d' ' -f1 | rev)
1515
tar_requires_python=$(echo "$tar_output" | grep 'Requires-Python:' | head -n 1 |cut -d'=' -f2)
1616

1717
echo -e "Metadata_version: $metadata_version \033[31m(need >=1.2)\033[0m"

0 commit comments

Comments
 (0)