Skip to content

Commit a4ba4e5

Browse files
authored
Version 2.1.1. Better README. (#2)
* Fix typo in README due to folder structure change. * Fix README url error when uploading to PyPI.
1 parent 77d14a1 commit a4ba4e5

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

README-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ WxPusher.query_user('<page>', '<page_size>', '<appToken>')
3333

3434
Configuration is necessary since the tests depend on VALID `appToken` and `uids`.
3535

36-
Frist, copy the configuration sample `config.sample.py` under `python/wxpusher/tests/` to `config.py`
36+
Frist, copy the configuration sample `config.sample.py` under `wxpusher/tests/` to `config.py`
3737

3838
```shell
39-
cd python/wxpusher/tests
39+
cd wxpusher/tests
4040
cp config.sample.py config.py
4141
```
4242

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ WxPusher.query_user('<page>', '<page_size>', '<appToken>')
3636
首先,将 `wxpusher/tests/` 文件夹下的配置样例 `config.sample.py` 复制并命名为 `config.py`
3737

3838
```shell
39-
cd python/wxpusher/tests
39+
cd wxpusher/tests
4040
cp config.sample.py config.py
4141
```
4242

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.1

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,21 @@
4141
'WxPusher Python SDK.'
4242
)
4343

44+
VERSION = open('VERSION').read().strip()
45+
PROJECT_URL = 'https://github.com/wxpusher/wxpusher-sdk-python'
46+
BASE_URL = f'{PROJECT_URL}/blob/v{VERSION}'
47+
4448

4549
def readme():
4650
"""Parse README for long_description."""
47-
with open('README.md') as fin:
48-
return fin.read()
51+
content = open('README.md').read()
52+
content = content.replace('README.md', f'{BASE_URL}/README.md', 1)
53+
content = content.replace('README-en.md', f'{BASE_URL}/README-en.md', 1)
54+
return content
4955

5056

5157
setup(name='wxpusher',
52-
version=open('VERSION').read().strip(),
58+
version=VERSION,
5359
description=DESCRIPTION,
5460
long_description=readme(),
5561
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)