Skip to content

Commit

Permalink
remove tests from pypi build (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
haifeng-jin authored Oct 2, 2023
1 parent 35bf189 commit f2721af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion keras_cv/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from keras_cv.utils import test_utils
from keras_cv.utils.conditional_imports import assert_cv2_installed
from keras_cv.utils.conditional_imports import assert_matplotlib_installed
from keras_cv.utils.conditional_imports import (
Expand Down
8 changes: 7 additions & 1 deletion pip_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
]


def ignore_files(_, filenames):
return [f for f in filenames if "test" in f]


def build():
if os.path.exists(build_directory):
raise ValueError(f"Directory already exists: {build_directory}")
Expand All @@ -55,7 +59,9 @@ def build():
root_path = pathlib.Path(__file__).parent.resolve()
os.chdir(root_path)
os.mkdir(build_directory)
shutil.copytree(package, os.path.join(build_directory, package))
shutil.copytree(
package, os.path.join(build_directory, package), ignore=ignore_files
)
for fname in to_copy:
shutil.copy(fname, os.path.join(f"{build_directory}", fname))
os.chdir(build_directory)
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
license_file = LICENSE
description-file = README.md
license_files = LICENSE
description_file = README.md
version = attr: keras_cv.__version__

[tool:pytest]
Expand Down

0 comments on commit f2721af

Please sign in to comment.