Skip to content

Commit

Permalink
[Enhancement] Support building mmengine-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
fanqiNO1 committed Nov 20, 2023
1 parent fd5d062 commit 754d2a8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,24 @@ jobs:
run: |
pip install twine
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}
build-n-publish-lite:
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install torch
run: pip install torch
- name: Install wheel
run: pip install wheel
- name: Build MMEngine-lite
run: sed -i "s/os.getenv('MMENGINE_LITE', '0')/os.getenv('MMENGINE_LITE', '1')/g" setup.py
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
run: |
pip install twine
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def gen_packages_items():
install_requires.append(choose_requirement(main, secondary))

setup(
name='mmengine',
name='mmengine' if os.getenv('MMENGINE_LITE', '0') == '0' else 'mmengine-lite',
version=get_version(),
description='Engine of OpenMMLab projects',
long_description=readme(),
Expand Down

0 comments on commit 754d2a8

Please sign in to comment.