Skip to content

Commit

Permalink
Update the package name to ai-edge-model-explorer-adapter
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 632046099
  • Loading branch information
yijie-yang authored and copybara-github committed May 9, 2024
1 parent 7e64ce1 commit 756a6dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 130 deletions.
121 changes: 0 additions & 121 deletions src/builtin-adapter/python/pip_package/build_cp39_package.sh

This file was deleted.

10 changes: 5 additions & 5 deletions src/builtin-adapter/python/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ PYTHON_VERSION="$(${PYTHON} --version | cut -d " " -f 2)"
IFS='.' read -ra VERSION_PARTS <<< "${PYTHON_VERSION}"
# TF only supports python version ["3.9", "3.10", "3.11", "3.12"].
export TF_PYTHON_VERSION="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"
export PROJECT_NAME=${WHEEL_PROJECT_NAME:-model_explorer_adapter}
export PROJECT_NAME=${WHEEL_PROJECT_NAME:-ai_edge_model_explorer_adapter}
BUILD_DIR="gen/adapter_pip"
BAZEL_FLAGS="--copt=-O3"
ARCH="$(uname -m)"

# Build source tree.
rm -rf "${BUILD_DIR}" && mkdir -p "${BUILD_DIR}/model_explorer_adapter"
rm -rf "${BUILD_DIR}" && mkdir -p "${BUILD_DIR}/ai_edge_model_explorer_adapter"
cp -r "${SCRIPT_DIR}/MANIFEST.in" \
"${BUILD_DIR}"
cp "${SCRIPT_DIR}/setup_with_binary.py" "${BUILD_DIR}/setup.py"
echo "__version__ = '${PACKAGE_VERSION}'" >> "${BUILD_DIR}/model_explorer_adapter/__init__.py"
echo "__version__ = '${PACKAGE_VERSION}'" >> "${BUILD_DIR}/ai_edge_model_explorer_adapter/__init__.py"

# Build python _pywrap_convert_wrapper.

Expand Down Expand Up @@ -88,12 +88,12 @@ esac
bazel build -c opt -s --config=monolithic --config=noaws --config=nogcp --config=nohdfs --config=nonccl \
${BAZEL_FLAGS} python/convert_wrapper:_pywrap_convert_wrapper
cp "bazel-bin/python/convert_wrapper/_pywrap_convert_wrapper${LIBRARY_EXTENSION}" \
"${BUILD_DIR}/model_explorer_adapter"
"${BUILD_DIR}/ai_edge_model_explorer_adapter"

# Bazel generates the wrapper library with r-x permissions for user.
# At least on Windows, we need write permissions to delete the file.
# Without this, setuptools fails to clean the build directory.
chmod u+w "${BUILD_DIR}/model_explorer_adapter/_pywrap_convert_wrapper${LIBRARY_EXTENSION}"
chmod u+w "${BUILD_DIR}/ai_edge_model_explorer_adapter/_pywrap_convert_wrapper${LIBRARY_EXTENSION}"

# Build python wheel.
cd "${BUILD_DIR}"
Expand Down
8 changes: 4 additions & 4 deletions src/builtin-adapter/python/pip_package/setup_with_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
version=PACKAGE_VERSION,
description=DOCLINES[0],
long_description='\n'.join(DOCLINES[2:]),
url='https://www.tensorflow.org/lite/',
author='Google, LLC',
author_email='[email protected]',
url='https://github.com/google-ai-edge/model-explorer',
author='Google AI Edge',
author_email='[email protected]',
license='Apache 2.0',
include_package_data=True,
has_ext_modules=lambda: True,
keywords='tflite tensorflow tensor machine learning model explorer adapter',
keywords='google ai edge machine learning model explorer adapter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand Down

0 comments on commit 756a6dc

Please sign in to comment.