Skip to content

Exclude BUILD files from flit builds#1458

Merged
liangyaning33 merged 1 commit intogoogle:mainfrom
hartikainen:exclude-BUILD-files
Mar 5, 2025
Merged

Exclude BUILD files from flit builds#1458
liangyaning33 merged 1 commit intogoogle:mainfrom
hartikainen:exclude-BUILD-files

Conversation

@hartikainen
Copy link
Copy Markdown
Contributor

@hartikainen hartikainen commented Jan 2, 2025

This should fix #1429. Here's what I get from running flit build on main and the latest commit:

$ diff -ruN ./dist-main/orbax_checkpoint-0.11.0 ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0
diff --color -ruN ./dist-main/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/BUILD ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/BUILD
--- ./dist-main/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/BUILD        2024-12-25 21:28:52
+++ ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/BUILD       1970-01-01 02:00:00
@@ -1,15 +0,0 @@
-package(
-    default_applicable_licenses = ["//:package_license"],
-    default_visibility = ["//visibility:public"],
-)
-
-py_library(
-    name = "utils",
-    srcs = ["utils.py"],
-    srcs_version = "PY3",
-)
-
-py_library(
-    name = "path",
-    srcs = ["__init__.py"],
-)
diff --color -ruN ./dist-main/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/snapshot/BUILD ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/snapshot/BUILD
--- ./dist-main/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/snapshot/BUILD      2024-12-25 21:28:52
+++ ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/orbax/checkpoint/_src/path/snapshot/BUILD       1970-01-01 02:00:00
@@ -1,21 +0,0 @@
-package(
-    default_applicable_licenses = ["//:package_license"],
-    default_visibility = ["//visibility:public"],
-)
-
-py_library(
-    name = "snapshot",
-    srcs = ["snapshot.py"],
-    srcs_version = "PY3",
-    deps = ["//checkpoint/orbax/checkpoint/_src/path:utils"],
-)
-
-py_test(
-    name = "snapshot_test",
-    srcs = ["snapshot_test.py"],
-    srcs_version = "PY3",
-    deps = [
-        ":snapshot",
-        "//absl/testing:absltest",
-    ],
-)
diff --color -ruN ./dist-main/orbax_checkpoint-0.11.0/pyproject.toml ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/pyproject.toml
--- ./dist-main/orbax_checkpoint-0.11.0/pyproject.toml  2025-01-03 09:03:14
+++ ./dist-e6f8019a9f39/orbax_checkpoint-0.11.0/pyproject.toml  2025-01-03 09:04:18
@@ -41,6 +41,11 @@
 [tool.flit.module]
 name = "orbax.checkpoint"

+[tool.flit.sdist]
+exclude = [
+    '**/BUILD',
+]
+
 [project.urls]
 homepage = 'http://github.com/google/orbax'
 repository = 'http://github.com/google/orbax'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No module named 'orbax.checkpoint._src.path' when used as bazel pip dependency

2 participants