Skip to content

Commit

Permalink
Merge pull request #88 from codefuse-ai/fix-bazel
Browse files Browse the repository at this point in the history
bazel build zip success.
  • Loading branch information
zhouang777 authored Jan 7, 2025
2 parents c277beb + 1287c9d commit 57392bf
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ bazel-bin
bazel-CodeFuse-Query
bazel-out
bazel-testlogs

__pycache__/
*.pyc
*.pyo
*.pyd
7 changes: 2 additions & 5 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ pkg_files(
pkg_files(
name = "coref-python-src-extractor-pkg",
srcs = [
"//language/python/extractor:test1",
"//language/python/extractor:coref-python-extractor-bin",
],
attributes = pkg_attributes(
mode = "0755",
Expand Down Expand Up @@ -507,10 +507,7 @@ coref_lib_script_pkgs = [
":coref-properties-lib-script-pkg",
":coref-sql-lib-script-pkg",
# ":coref-arkts-lib-script-pkg",
] + select({
":custom_build": [],
"//conditions:default": [":coref-swift-lib-script-pkg"],
})
]

coref_libscript_languages = [
"java",
Expand Down
20 changes: 16 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -230,28 +230,40 @@ http_archive(
name = "osx_godel_0.3",
build_file = "godel.BUILD",
sha256 = "1e7e0151f1acd1656f4079b7b16dfa4e5da607a1239149a88e9df3b543b23c30",
urls = ["https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/osx-godel/godel-multipleinput-20221115.tar.gz"],
urls = [
"https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/osx-godel/godel-multipleinput-20221115.tar.gz",
"https://github.com/codefuse-ai/CodeFuse-Query/releases/download/godel_0.3_artifacts/godel-0.3.osx.multipleinput-20221115.tar.gz",
],
)

http_archive(
name = "linux_godel_0.3",
build_file = "godel.BUILD",
sha256 = "4dbc04677b9c785a00c127228368919ba6cee2a1f160e83e497d44fb4820dcd3",
urls = ["https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/linux-godel/godel-multipleinput-20221115.tar.gz"],
urls = [
"https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/linux-godel/godel-multipleinput-20221115.tar.gz",
"https://github.com/codefuse-ai/CodeFuse-Query/releases/download/godel_0.3_artifacts/godel-0.3.linux.multipleinput-20221115.tar.gz",
],
)

http_archive(
name = "osx_godel_script",
build_file = "godel.BUILD",
sha256 = "4c4189320523ca63d9fb50e37aa0bcbd452109011a8d669d878b91492168e4e0",
urls = ["https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/godel-script/osx/godel-script-osx-2ac5184520240812.tar.gz"],
urls = [
"https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/godel-script/osx/godel-script-osx-2ac5184520240812.tar.gz",
"https://github.com/codefuse-ai/CodeFuse-Query/releases/download/godel_0.3_artifacts/godel-script-osx-2ac5184520240812.tar.gz",
],
)

http_archive(
name = "linux_godel_script",
build_file = "godel.BUILD",
sha256 = "ac7c0d62b02cb3d7c673dac0c69079e347f727232a56053402ebbab655fd5649",
urls = ["https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/godel-script/linux/godel-script-linux-2ac5184520240812.tar.gz"],
urls = [
"https://antsys-sparrow-data.cn-shanghai-alipay-office.oss-alipay.aliyuncs.com/sparrow/public/godel-script/linux/godel-script-linux-2ac5184520240812.tar.gz",
"https://github.com/codefuse-ai/CodeFuse-Query/releases/download/godel_0.3_artifacts/godel-script-linux-2ac5184520240812.tar.gz",
],
)

# Setting up for bazel go dependency
Expand Down
2 changes: 1 addition & 1 deletion cli/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
psutil==5.9.6
pyinstaller==6.3.0
pyinstaller==6.11.1
chardet==5.2.0
9 changes: 4 additions & 5 deletions language/python/extractor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ load("@rules_python//python:defs.bzl", "py_library")
#)

py_library(
name = "test",
name = "coref-python-extractor-src",
srcs = glob(
["src/**/*.py"],
exclude = ["**/tests/**"],
Expand All @@ -61,16 +61,15 @@ filegroup(
)

genrule(
name = "test1",
name = "coref-python-extractor-bin",
srcs = [
"//language/python/extractor:install_source",
":test",
":coref-python-extractor-src",
],
outs = ["coref-python-src-extractor"],
cmd = """
chmod -R 755 $$(dirname $(PYTHON3))/../lib/python3.10/site-packages
$(PYTHON3) -m pip install pyinstaller
$(PYTHON3) -m pip install sqlalchemy
$(PYTHON3) -m pip install -r language/python/extractor/requirements.txt
cp language/python/extractor/src/resources/hook-_tkinter.py $$(dirname $(PYTHON3))/../lib/python3.10/site-packages/PyInstaller/hooks/hook-_tkinter.py
$(PYTHON3) $(locations //language/python/extractor:install_source)
cp language/python/extractor/src/dist/coref-python-src-extractor $(RULEDIR)
Expand Down
2 changes: 1 addition & 1 deletion language/python/extractor/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ SQLAlchemy~=1.4.32

tqdm~=4.64.0
astor~=0.8.1
pyinstaller~=5.3
pyinstaller==6.11.1

0 comments on commit 57392bf

Please sign in to comment.