Skip to content

Commit

Permalink
fixed name in pypi, add badge (#15)
Browse files Browse the repository at this point in the history
* fixed name in pypi, add badge

* fixed name in install.md

* update install.md
  • Loading branch information
xvjiarui committed Jul 14, 2020
1 parent 5d2140f commit 0de0387
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
</div>
<br />

[![PyPI](https://img.shields.io/pypi/v/mmsegmentation)](https://pypi.org/project/mmsegmentation)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/en/latest/)
[![badge](https://github.com/open-mmlab/mmsegmentation/workflows/build/badge.svg)](https://github.com/open-mmlab/mmsegmentation/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmsegmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmsegmentation)
Expand Down
19 changes: 14 additions & 5 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelera
d. Install MMSegmentation.

```shell
pip install mmseg # install the latest release
pip install mmsegmentation # install the latest release
```

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

Instead, if you would like to install MMSegmentation in `dev` mode, run following
```shell
git clone https://github.com/open-mmlab/mmsegmentation
cd mmsegmentation
pip install -e . # or "python setup.py develop"
```

Note:

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.
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.
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.
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.

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).
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).

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

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

mkdir data
ln -s $DATA_ROOT data
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ def write_version_py():
def get_version():
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']
import sys
# return short version for sdist
if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
return locals()['short_version']
else:
return locals()['__version__']


def parse_requirements(fname='requirements.txt', with_version=True):
Expand Down Expand Up @@ -159,7 +164,7 @@ def gen_packages_items():
if __name__ == '__main__':
write_version_py()
setup(
name='mmseg',
name='mmsegmentation',
version=get_version(),
description='Open MMLab Semantic Segmentation Toolbox and Benchmark',
long_description=readme(),
Expand Down

0 comments on commit 0de0387

Please sign in to comment.