diff --git a/.gitignore b/.gitignore index 81174ae..2c39363 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,8 @@ bazel-bin bazel-CodeFuse-Query bazel-out bazel-testlogs + +__pycache__/ +*.pyc +*.pyo +*.pyd diff --git a/BUILD b/BUILD index 9200300..6adf23f 100644 --- a/BUILD +++ b/BUILD @@ -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", @@ -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", diff --git a/WORKSPACE b/WORKSPACE index 2eed237..f2acc2b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 diff --git a/cli/requirements.txt b/cli/requirements.txt index 47bde34..5815679 100644 --- a/cli/requirements.txt +++ b/cli/requirements.txt @@ -1,3 +1,3 @@ psutil==5.9.6 -pyinstaller==6.3.0 +pyinstaller==6.11.1 chardet==5.2.0 \ No newline at end of file diff --git a/language/python/extractor/BUILD b/language/python/extractor/BUILD index 6c440d3..0f5fc43 100644 --- a/language/python/extractor/BUILD +++ b/language/python/extractor/BUILD @@ -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/**"], @@ -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) diff --git a/language/python/extractor/requirements.txt b/language/python/extractor/requirements.txt index fe8c65a..f3bba14 100644 --- a/language/python/extractor/requirements.txt +++ b/language/python/extractor/requirements.txt @@ -2,4 +2,4 @@ SQLAlchemy~=1.4.32 tqdm~=4.64.0 astor~=0.8.1 -pyinstaller~=5.3 \ No newline at end of file +pyinstaller==6.11.1 \ No newline at end of file