diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4aeb6fbc90..3affceb9d2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -27,7 +27,7 @@ We use the following tools for linting and formatting: - [yapf](https://github.com/google/yapf): formatter - [isort](https://github.com/timothycrosley/isort): sort imports -Style configurations of yapf and isort can be found in [.style.yapf](../.style.yapf) and [.isort.cfg](../.isort.cfg). +Style configurations of yapf and isort can be found in [setup.cfg](../setup.cfg). We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, fixes `end-of-files`, sorts `requirments.txt` automatically on every commit. diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/deploy.yml similarity index 84% rename from .github/workflows/publish-to-pypi.yml rename to .github/workflows/deploy.yml index 5404fff457..caf27de2e6 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,9 @@ jobs: with: python-version: 3.7 - name: Build MMDet3D - run: python setup.py sdist + run: | + pip install wheel + python setup.py sdist bdist_wheel - name: Publish distribution to PyPI run: | pip install twine diff --git a/docs/changelog.md b/docs/changelog.md index cc7877ebce..33f720129e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,4 +1,4 @@ ## Changelog -### v0.1.0 (9/7/2020) +### v0.5.0 (9/7/2020) MMDetection3D is released. diff --git a/setup.py b/setup.py index d2e9350e57..2d30b1a19c 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,13 @@ 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 make_cuda_ext(name,