Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Check and PyPi Upload

# Tagged builds publish this project under two names: "mavsdk-grpc" (the
# going-forward name) and "mavsdk" (the legacy name, one last time, carrying a
# rename warning). See setup.py for how the two builds differ.
# Tagged builds publish this project as "mavsdk-grpc".
#
# NOTE: the token in TWINE_PASSWORD must be account-scoped for the release that
# first creates "mavsdk-grpc" on PyPI -- a project-scoped token cannot create a
# new project. It can be swapped back to project-scoped tokens afterwards.
# The legacy "mavsdk" name must NOT be built or uploaded from here anymore: its
# last release from this repo was 3.17.4, and the name now belongs to the native
# binding. Uploading would add gRPC wheels to the native binding's releases.
# The token in TWINE_PASSWORD should therefore be scoped to "mavsdk-grpc" only.

on:
push:
Expand Down Expand Up @@ -43,13 +42,9 @@ jobs:
python3 -m pip install -r requirements.txt -r requirements-dev.txt -r requirements-docs.txt
python3 -m pip install "setuptools<77" auditwheel twine

# Built twice: once as "mavsdk-grpc" (the going-forward name) and once as
# "mavsdk" (the legacy name, carrying a rename warning). See setup.py.
- name: Create wheel
run: |
MAVSDK_DIST_NAME=mavsdk-grpc python3 setup.py bdist_wheel
rm -rf build mavsdk.egg-info
MAVSDK_DIST_NAME=mavsdk python3 setup.py bdist_wheel
mkdir wheelhouse
export PATH=$PATH:$HOME/.local/bin
auditwheel repair --plat manylinux2014_x86_64 dist/*.whl
Expand Down Expand Up @@ -121,8 +116,6 @@ jobs:
run: |
export MAVSDK_SERVER_ARCH=${{ matrix.arch }}
MAVSDK_DIST_NAME=mavsdk-grpc python3 setup.py bdist_wheel
rm -rf build mavsdk.egg-info
MAVSDK_DIST_NAME=mavsdk python3 setup.py bdist_wheel
ls dist/*any.whl | sed -e 'p;s/any/${{ matrix.pypi_arch }}/' | xargs -n2 mv

- name: Check the artifacts
Expand Down Expand Up @@ -176,8 +169,6 @@ jobs:
- name: Create wheel
run: |
MAVSDK_DIST_NAME=mavsdk-grpc python setup.py bdist_wheel
rm -rf build mavsdk.egg-info
MAVSDK_DIST_NAME=mavsdk python setup.py bdist_wheel
export PATH="$(python -m site --user-base)/bin:$PATH"
delocate-wheel -w wheelhouse -v dist/*.whl
ls wheelhouse/*any.whl | sed -e 'p;s/any/macosx_${{ matrix.wheel_arch }}/' | xargs -n2 mv
Expand Down Expand Up @@ -240,9 +231,6 @@ jobs:
$env:MAVSDK_SERVER_ARCH = "${{ matrix.arch }}"
$env:MAVSDK_DIST_NAME = "mavsdk-grpc"
python3 setup.py bdist_wheel
Remove-Item -Recurse -Force build, mavsdk.egg-info -ErrorAction SilentlyContinue
$env:MAVSDK_DIST_NAME = "mavsdk"
python3 setup.py bdist_wheel
Dir "dist/" | rename-item -NewName {$_.name -replace '-any.whl','-${{ matrix.wheel_arch }}.whl'}

- name: Check the artifacts
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def parse_long_description():
# This project is published under two names during the transition to MAVSDK v4:
#
# - "mavsdk-grpc" is the going-forward name of this gRPC-based wrapper.
# - "mavsdk" is the legacy name. It is being handed over to the new native
# binding that lives in the main MAVSDK repository, and is published from
# here one last time (carrying a warning) so that users get a heads-up
# before `pip install mavsdk` starts resolving to a different API.
# - "mavsdk" is the legacy name. It has been handed over to the new native
# binding that lives in the main MAVSDK repository. Its last release from
# here was 3.17.4 (carrying a warning). Do not publish it from here again:
# PyPI would add the wheels to the native binding's releases.
#
# The legacy name is the one that needs opting into, so that a plain build
# produces the going-forward package.
Expand Down
Loading