-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of checking in the version. This means we can tag a new release without needing to make a commit, just create a git tag. And then the stuff in the next commit will auto publish when that happens also. Topic: sf-auto-version
- Loading branch information
1 parent
079830a
commit 838199e
Showing
12 changed files
with
94 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Should include history since the last tag for setuptools_scm to work | ||
fetch-depth: 200 | ||
fetch-tags: true | ||
|
||
- name: Build Wheels | ||
run: | | ||
|
@@ -42,6 +46,13 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Should include history since the last tag for setuptools_scm to work | ||
fetch-depth: 200 | ||
fetch-tags: true | ||
|
||
- run: python3 -m pip install setuptools_scm | ||
- run: echo "SYMFORCE_VERSION=$(python3 -m setuptools_scm)" >> $GITHUB_ENV | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
@@ -52,7 +63,7 @@ jobs: | |
# For arm64; for x86, it's at /usr/local but cmake finds that ok already | ||
GMP_ROOT: /opt/homebrew | ||
CIBW_BEFORE_BUILD: brew install gmp | ||
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=True MACOSX_DEPLOYMENT_TARGET=13.0 | ||
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=$SYMFORCE_VERSION MACOSX_DEPLOYMENT_TARGET=13.0 | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -71,14 +82,21 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Should include history since the last tag for setuptools_scm to work | ||
fetch-depth: 200 | ||
fetch-tags: true | ||
|
||
- run: python3 -m pip install setuptools_scm | ||
- run: echo "SYMFORCE_VERSION=$(python3 -m setuptools_scm)" >> $GITHUB_ENV | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python-version }}-manylinux_x86_64 | ||
CIBW_BUILD_FRONTEND: build | ||
CIBW_BEFORE_BUILD: yum install -y gmp-devel git | ||
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=True | ||
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=$SYMFORCE_VERSION | ||
|
||
- name: Upload Wheels | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,35 +237,23 @@ else() | |
|
||
add_custom_target(symforce_eigen_lcm_py ALL DEPENDS eigen_lcm_py) | ||
|
||
# Get SymForce version | ||
execute_process( | ||
COMMAND ${SYMFORCE_PYTHON} -c "from _version import version; print(version, end='')" | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/symforce | ||
RESULT_VARIABLE STATUS | ||
OUTPUT_VARIABLE SYMFORCE_VERSION | ||
ERROR_VARIABLE SYMFORCE_VERSION_STDERR | ||
) | ||
if(STATUS AND NOT STATUS EQUAL 0) | ||
message(FATAL_ERROR | ||
"Failed getting symforce version with exit code ${STATUS} and output ${SYMFORCE_VERSION}, stderr ${SYMFORCE_VERSION_STDERR}" | ||
) | ||
endif() | ||
|
||
file(WRITE | ||
${CMAKE_CURRENT_BINARY_DIR}/lcmtypes/python2.7/setup.py | ||
${CMAKE_CURRENT_BINARY_DIR}/lcmtypes/python2.7/pyproject.toml | ||
" | ||
from setuptools import setup, find_packages | ||
setup( | ||
name='lcmtypes', | ||
version='${SYMFORCE_VERSION}', | ||
description='lcmtype python bindings (installed by SymForce)', | ||
long_description='lcmtype python bindings (installed by SymForce)', | ||
author='Skydio, Inc', | ||
author_email='[email protected]', | ||
license='Apache 2.0', | ||
packages=find_packages(), | ||
zip_safe=False, | ||
) | ||
[build-system] | ||
requires = ['setuptools', 'setuptools-scm>=8'] | ||
build-backend = 'setuptools.build_meta' | ||
[project] | ||
name = 'lcmtypes' | ||
description='lcmtype python bindings (installed by SymForce)' | ||
authors = [{ name = 'Skydio, Inc.', email = '[email protected]' }] | ||
license = { text = 'Apache 2.0' } | ||
requires-python = '>=3.5' | ||
dynamic = ['version'] | ||
[tool.setuptools_scm] | ||
root = '../../..' | ||
" | ||
) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,22 @@ | |
# ---------------------------------------------------------------------------- #} | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
requires = ["setuptools", "setuptools-scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "{{ package_name }}" | ||
description = "{{ description }} (installed by SymForce)" | ||
authors = [{ name = "Skydio, Inc.", email = "[email protected]" }] | ||
license = { text = "Apache 2.0" } | ||
version = "{{ version }}" | ||
dependencies = ["numpy"] | ||
requires-python = ">=3.5" | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
SymForce = "https://symforce.org" | ||
"Bug Tracker" = "https://github.com/symforce-org/symforce/issues" | ||
Source = "https://github.com/symforce-org/symforce/tree/main/gen/python" | ||
|
||
[tool.setuptools_scm] | ||
root = "../.." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters