Skip to content

Commit

Permalink
Replace flit-scm with flit-ext
Browse files Browse the repository at this point in the history
Add custom backend with fork of flit-scm to have additional
entry-points (force-local-version) to support inhouse requirements.
  • Loading branch information
ileixe committed Nov 4, 2022
1 parent b23f730 commit 8058532
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 27 deletions.
8 changes: 5 additions & 3 deletions python/furiosa-cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-cli"
Expand Down Expand Up @@ -65,6 +65,8 @@ root = "../.."
write_to = "python/furiosa-cli/furiosa/cli/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/cli/git_version.txt"]
8 changes: 5 additions & 3 deletions python/furiosa-common/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-common"
Expand Down Expand Up @@ -62,6 +62,8 @@ root = "../.."
write_to = "python/furiosa-common/furiosa/common/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/common/git_version.txt", "furiosa/common/py.typed"]
8 changes: 5 additions & 3 deletions python/furiosa-litmus/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-litmus"
Expand Down Expand Up @@ -65,6 +65,8 @@ root = "../.."
write_to = "python/furiosa-litmus/furiosa/litmus/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/litmus/git_version.txt"]
8 changes: 5 additions & 3 deletions python/furiosa-quantizer/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-quantizer"
Expand Down Expand Up @@ -71,6 +71,8 @@ root = "../.."
write_to = "python/furiosa-quantizer/furiosa/quantizer/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/quantizer/git_version.txt"]
8 changes: 5 additions & 3 deletions python/furiosa-registry/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-registry"
Expand Down Expand Up @@ -78,6 +78,8 @@ root = "../.."
write_to = "python/furiosa-registry/furiosa/registry/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/registry/git_version.txt"]
8 changes: 5 additions & 3 deletions python/furiosa-runtime/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-runtime"
Expand Down Expand Up @@ -69,6 +69,8 @@ root = "../.."
write_to = "python/furiosa-runtime/furiosa/runtime/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/runtime/git_version.txt"]
8 changes: 5 additions & 3 deletions python/furiosa-server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-server"
Expand Down Expand Up @@ -94,6 +94,8 @@ root = "../.."
write_to = "python/furiosa-server/furiosa/server/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/server/git_version.txt", "furiosa/server/py.typed"]
Expand Down
8 changes: 5 additions & 3 deletions python/furiosa-serving/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-serving"
Expand Down Expand Up @@ -83,6 +83,8 @@ root = "../.."
write_to = "python/furiosa-serving/furiosa/serving/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/serving/git_version.txt"]
Expand Down
8 changes: 5 additions & 3 deletions python/furiosa-tools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# Custom backend from https://gitlab.com/WillDaSilva/flit_scm to use setuptools-scm
# Custom backend from https://gitlab.com/ileixe/flit_ext to use setuptools-scm
# Upstream flit does not support it. See https://github.com/pypa/flit/issues/257
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"
requires = ["flit_ext"]
build-backend = "flit_ext:buildapi"

[project]
name = "furiosa-tools"
Expand Down Expand Up @@ -65,6 +65,8 @@ root = "../.."
write_to = "python/furiosa-tools/furiosa/tools/git_version.txt"
# SemVer with release branch: https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "release-branch-semver"
# Custom local scheme to emit commit hash: https://github.com/ileixe/flit_ext/blob/main/pyproject.toml#L22
local_scheme = "force-local-version"

[tool.flit.sdist]
include = ["furiosa/tools/git_version.txt"]

0 comments on commit 8058532

Please sign in to comment.