Skip to content

Commit

Permalink
Version 2.1.1. Better README. (#2)
Browse files Browse the repository at this point in the history
* Fix typo in README due to folder structure change.
* Fix README url error when uploading to PyPI.
  • Loading branch information
huxuan authored Jan 18, 2020
1 parent 77d14a1 commit a4ba4e5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ WxPusher.query_user('<page>', '<page_size>', '<appToken>')

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

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

```shell
cd python/wxpusher/tests
cd wxpusher/tests
cp config.sample.py config.py
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ WxPusher.query_user('<page>', '<page_size>', '<appToken>')
首先,将 `wxpusher/tests/` 文件夹下的配置样例 `config.sample.py` 复制并命名为 `config.py`

```shell
cd python/wxpusher/tests
cd wxpusher/tests
cp config.sample.py config.py
```

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.1.1
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,21 @@
'WxPusher Python SDK.'
)

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


def readme():
"""Parse README for long_description."""
with open('README.md') as fin:
return fin.read()
content = open('README.md').read()
content = content.replace('README.md', f'{BASE_URL}/README.md', 1)
content = content.replace('README-en.md', f'{BASE_URL}/README-en.md', 1)
return content


setup(name='wxpusher',
version=open('VERSION').read().strip(),
version=VERSION,
description=DESCRIPTION,
long_description=readme(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit a4ba4e5

Please sign in to comment.