Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude BUILD files from flit builds #1458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hartikainen
Copy link

@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
1 participant