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

remove tests from pypi build #2094

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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