Skip to content

Commit 7719847

Browse files
committed
fix CI for PyPI upload
1 parent 197a6ed commit 7719847

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pip_build.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
]
1616

1717

18+
def ignore_files(_, filenames):
19+
return [f for f in filenames if f.endswith("_test.py")]
20+
21+
1822
def build():
1923
if os.path.exists(build_directory):
2024
raise ValueError(f"Directory already exists: {build_directory}")
@@ -24,7 +28,9 @@ def build():
2428
# Copy sources (`keras_tuner/` directory and setup files) to build
2529
# directory
2630
os.mkdir(build_directory)
27-
shutil.copytree(package, os.path.join(build_directory, package))
31+
shutil.copytree(
32+
package, os.path.join(build_directory, package), ignore=ignore_files
33+
)
2834
for fname in to_copy:
2935
shutil.copy(fname, os.path.join(f"{build_directory}", fname))
3036
os.chdir(build_directory)

0 commit comments

Comments
 (0)