Skip to content

Commit 4d832e5

Browse files
authored
fixed name in pypi, add badge (open-mmlab#15)
* fixed name in pypi, add badge * fixed name in install.md * update install.md
1 parent 1528793 commit 4d832e5

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</div>
44
<br />
55

6+
[![PyPI](https://img.shields.io/pypi/v/mmsegmentation)](https://pypi.org/project/mmsegmentation)
67
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/en/latest/)
78
[![badge](https://github.com/open-mmlab/mmsegmentation/workflows/build/badge.svg)](https://github.com/open-mmlab/mmsegmentation/actions)
89
[![codecov](https://codecov.io/gh/open-mmlab/mmsegmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmsegmentation)

docs/install.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelera
3636
d. Install MMSegmentation.
3737

3838
```shell
39-
pip install mmseg # install the latest release
39+
pip install mmsegmentation # install the latest release
4040
```
4141

4242
or
@@ -45,12 +45,19 @@ or
4545
pip install git+https://github.com/open-mmlab/mmsegmentation.git # install the master branch
4646
```
4747

48+
Instead, if you would like to install MMSegmentation in `dev` mode, run following
49+
```shell
50+
git clone https://github.com/open-mmlab/mmsegmentation
51+
cd mmsegmentation
52+
pip install -e . # or "python setup.py develop"
53+
```
54+
4855
Note:
4956

50-
1. The git commit id will be written to the version number with step *e*, e.g. 0.5.0+c415a2e. The version will also be saved in trained models.
51-
It is recommended that you run step *e* each time you pull some updates from github. If C++/CUDA codes are modified, then this step is compulsory.
57+
1. In `dev` mode, the git commit id will be written to the version number with step *d*, e.g. 0.5.0+c415a2e. The version will also be saved in trained models.
58+
It is recommended that you run step *d* each time you pull some updates from github. If C++/CUDA codes are modified, then this step is compulsory.
5259

53-
2. Following the above instructions, mmsegmentation is installed on `dev` mode, any local modifications made to the code will take effect without the need to reinstall it (unless you submit some commits and want to update the version number).
60+
2. When MMsegmentation is installed on `dev` mode, any local modifications made to the code will take effect without the need to reinstall it (unless you submit some commits and want to update the version number).
5461

5562
3. If you would like to use `opencv-python-headless` instead of `opencv-python`,
5663
you can install it before installing MMCV.
@@ -68,7 +75,9 @@ conda activate open-mmlab
6875

6976
conda install pytorch=1.5.0 torchvision cudatoolkit=10.1 -c pytorch
7077
pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
71-
pip install git+https://github.com/open-mmlab/mmsegmentation.git
78+
git clone https://github.com/open-mmlab/mmsegmentation
79+
cd mmsegmentation
80+
pip install -e . # or "python setup.py develop"
7281

7382
mkdir data
7483
ln -s $DATA_ROOT data

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ def write_version_py():
7777
def get_version():
7878
with open(version_file, 'r') as f:
7979
exec(compile(f.read(), version_file, 'exec'))
80-
return locals()['__version__']
80+
import sys
81+
# return short version for sdist
82+
if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
83+
return locals()['short_version']
84+
else:
85+
return locals()['__version__']
8186

8287

8388
def parse_requirements(fname='requirements.txt', with_version=True):
@@ -159,7 +164,7 @@ def gen_packages_items():
159164
if __name__ == '__main__':
160165
write_version_py()
161166
setup(
162-
name='mmseg',
167+
name='mmsegmentation',
163168
version=get_version(),
164169
description='Open MMLab Semantic Segmentation Toolbox and Benchmark',
165170
long_description=readme(),

0 commit comments

Comments
 (0)