Skip to content

Commit

Permalink
Make wheel name depends on platform name (alibaba#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 authored Mar 23, 2023
1 parent 36c0725 commit 9a7bc09
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ all: learning client coordinator analytical interactive
graphscope: all

install: analytical-install interactive-install learning-install client coordinator
# client
pip3 install --user --editable $(CLIENT_DIR)
rm -rf $(CLIENT_DIR)/*.egg-info
# coordinator
pip3 install --user --editable $(COORDINATOR_DIR)
rm -rf $(COORDINATOR_DIR)/*.egg-info

echo "Run the following command to correctly set environment variable"
echo "export GRAPHSCOPE_HOME=$(INSTALL_PREFIX)"

Expand All @@ -61,6 +54,7 @@ clean:
rm -rf $(INTERACTIVE_DIR)/executor/ir/target

rm -rf $(LEARNING_BUILD_DIR) $(LEARNING_DIR)/proto/*.h $(LEARNING_DIR)/proto/*.cc
rm -rf $(LEARNING_DIR)/graphlearn/built

cd $(CLIENT_DIR) && python3 setup.py clean --all

Expand All @@ -74,11 +68,15 @@ client: learning
cd $(CLIENT_DIR) && \
pip3 install -r requirements.txt -r requirements-dev.txt --user && \
python3 setup.py build_ext --inplace --user
pip3 install --user --editable $(CLIENT_DIR)
rm -rf $(CLIENT_DIR)/*.egg-info

coordinator: client
cd $(COORDINATOR_DIR) && \
pip3 install -r requirements.txt -r requirements-dev.txt --user && \
python3 setup.py build_builtin
pip3 install --user --editable $(COORDINATOR_DIR)
rm -rf $(COORDINATOR_DIR)/*.egg-info

# We deliberately make $(ENGINE) depends on a file, and $(ENGINE)-install depends on $(ENGINE),
# so that when we execute `make $(ENGINE)-install` after `make $(ENGINE)`, it will not
Expand Down
2 changes: 2 additions & 0 deletions coordinator/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ def parse_version(root, **kwargs):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
keywords="GraphScope, Graph Computations",
use_scm_version={
Expand Down
17 changes: 10 additions & 7 deletions k8s/internal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ifeq ($(UNAME_S), Linux)
XARGS_EMPTY_FLAG := --no-run-if-empty
endif

# x86_64 or arm64
ARCH := $(shell uname -m)

BUILD_PROGRESS = auto

# Default null
Expand Down Expand Up @@ -84,15 +87,15 @@ graphscope-darwin-py3:
sudo strip ${INSTALL_PREFIX}/bin/gaia_executor && \
export DYLD_LIBRARY_PATH=/usr/local/lib:$$DYLD_LIBRARY_PATH && \
install_name_tool -add_rpath /usr/local/lib ${INSTALL_PREFIX}/bin/gaia_executor && \
package_name=gs-include python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
package_name=gs-include python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
rm -rf build && \
package_name=gs-apps python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
package_name=gs-apps python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
rm -rf build && \
package_name=gs-engine python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
package_name=gs-engine python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
rm -rf build && \
package_name=gs-coordinator python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
package_name=gs-coordinator python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
rm -rf build && \
package_name=graphscope python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
package_name=graphscope python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
pip3 install delocate && \
for wheel in `ls dist/*.whl`; do \
delocate-listdeps -a -d $$wheel; \
Expand Down Expand Up @@ -125,7 +128,7 @@ graphscope-manylinux2014-py3-nodocker:
package_name=graphscope python3 setup.py bdist_wheel && \
cd dist && \
for wheel in `ls ./*.whl`; do \
(auditwheel repair $$wheel --plat=manylinux2014_x86_64 && rm $$wheel) || true; \
(auditwheel repair $$wheel --plat=manylinux2014_${ARCH} && rm $$wheel) || true; \
done

graphscope-manylinux2014-py3:
Expand Down Expand Up @@ -191,7 +194,7 @@ graphscope-client-darwin-py3:
pip3 install "numpy==1.18.5" "pandas" "grpcio<=1.43.0,>=1.40.0" "grpcio-tools<=1.43.0,>=1.40.0" delocate wheel; \
fi; \
rm -rf build dist/*.whl || true && \
python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
python3 setup.py bdist_wheel --plat=macosx_10_9_${ARCH} && \
for wheel in `ls dist/*.whl`; do \
delocate-wheel -w dist/wheelhouse -v $$wheel && rm $$wheel; \
done
Expand Down
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,11 @@ def parse_version(root, **kwargs):
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
keywords="Graph, Large-Scale, Distributed Computing",
use_scm_version={
Expand Down

0 comments on commit 9a7bc09

Please sign in to comment.