From 7c2523543ed174b0e7dfc123098a92b502b4b9c9 Mon Sep 17 00:00:00 2001 From: Pavel Tomanek Date: Mon, 4 Nov 2024 17:59:33 +0100 Subject: [PATCH] #357 working 2023b version no test - todo tests deps --- .../2023b_v0.2.11_new/DEPS-0.2.11.txt | 140 ++-- .../2023b_v0.2.11_new/accelerate-2023b.eb | 9 +- .../2023b_v0.2.11_new/fastai-2023b.eb | 20 +- .../grpcio-1.67.1_use-ebroot.patch | 52 ++ .../2023b_v0.2.11_new/grpcio-2023b.eb | 8 +- .../imbalanced-learn-2023b.eb | 2 +- .../2023b_v0.2.11_new/monai-2023b.eb | 2 + .../monai-2023b_full_extras.eb | 88 +++ .../patch_grpcio/grpcio.patch | 50 ++ .../2023b_v0.2.11_new/patch_grpcio/setup.py | 610 ++++++++++++++++++ .../patch_grpcio/setup.py.orig | 607 +++++++++++++++++ .../2023b_v0.2.11_new/python-igraph-2023b.eb | 50 ++ .../2023b_v0.2.11_new/spaCy-2023b.eb | 4 + .../synthcity-0.2.11-2023b.eb | 177 ++++- .../2023b_v0.2.11_new/tensorboard-2023b.eb | 37 +- .../2023b_v0.2.11_new/torchvision-2023b.eb | 6 +- 357_Synthcity/2023b_v0.2.11_new/tsai-2023b.eb | 6 +- .../2023b_v0.2.11_new/xgbse-2023b.eb | 58 ++ 18 files changed, 1800 insertions(+), 126 deletions(-) create mode 100644 357_Synthcity/2023b_v0.2.11_new/grpcio-1.67.1_use-ebroot.patch create mode 100644 357_Synthcity/2023b_v0.2.11_new/monai-2023b_full_extras.eb create mode 100644 357_Synthcity/2023b_v0.2.11_new/patch_grpcio/grpcio.patch create mode 100644 357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py create mode 100644 357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py.orig create mode 100644 357_Synthcity/2023b_v0.2.11_new/python-igraph-2023b.eb create mode 100644 357_Synthcity/2023b_v0.2.11_new/xgbse-2023b.eb diff --git a/357_Synthcity/2023b_v0.2.11_new/DEPS-0.2.11.txt b/357_Synthcity/2023b_v0.2.11_new/DEPS-0.2.11.txt index 46b60faa..8c6466c2 100644 --- a/357_Synthcity/2023b_v0.2.11_new/DEPS-0.2.11.txt +++ b/357_Synthcity/2023b_v0.2.11_new/DEPS-0.2.11.txt @@ -6,11 +6,11 @@ aiohappyeyeballs 2.4.3 -> HAVE 2.3.2 aiohttp 3.10.10 -> HAVE 3.9.5 aiosignal 1.3.1 OK alembic 1.13.3 -> HAVE 1.13.1 -arfpy 0.1.1 OK +arfpy 0.1.1 OK exts attrs 24.2.0 -> HAVE 23.1.0 autograd 1.7.0 OK autograd-gamma 0.5.0 OK -be_great 0.0.8 OK +be_great 0.0.8 OK exts blis 0.7.11 OK Brotli 1.1.0 OK cachetools 5.5.0 OK @@ -32,14 +32,14 @@ fastai 2.7.18 OK fastcore 1.7.19 OK fastdownload 0.0.7 OK fastprogress 1.0.3 OK -feather-format 0.4.1 -fflows 0.0.3 -filelock 3.16.1 -fonttools 4.54.1 +feather-format 0.4.1 OK exts +fflows 0.0.3 OK exts +filelock 3.16.1 -> HAVE 3.13.0 +fonttools 4.54.1 ? -> HAVE 4.53.1 formulaic 1.0.2 OK -frozenlist 1.5.0 -fsspec 2024.9.0 -geomloss 0.2.6 +frozenlist 1.5.0 ? +fsspec 2024.9.0 -> HAVE 2023.10.0 +geomloss 0.2.6 OK exts google-ai-generativelanguage 0.6.10 google-api-core 2.22.0 google-api-python-client 2.151.0 @@ -49,42 +49,42 @@ google-generativeai 0.8.3 googleapis-common-protos 1.65.0 greenlet 3.1.1 -> HAVE 3.0.3 grpcio 1.67.1 OK -grpcio-status 1.67.1 +grpcio-status 1.67.1 ? h5py 3.12.1 -> HAVE 3.11.0 -httplib2 0.22.0 +httplib2 0.22.0 ? huggingface-hub 0.26.2 OK -idna 3.10 -imbalanced-learn 0.12.4 -importlib_metadata 8.5.0 -inflate64 1.0.0 +idna 3.10 ? +imbalanced-learn 0.12.4 OK +importlib_metadata 8.5.0 -> HAVE 6.8.0 +inflate64 1.0.0 OK exts interface-meta 1.3.0 OK -Jinja2 3.1.4 -joblib 1.4.2 -keopscore 2.2.3 -kiwisolver 1.4.7 +Jinja2 3.1.4 -> HAVE 3.1.2 +joblib 1.4.2 -> HAVE 1.3.2 +keopscore 2.2.3 OK exts +kiwisolver 1.4.7 -> HAVE 1.4.5 langcodes 3.4.1 OK language_data 1.2.0 OK lifelines 0.29.0 OK -lightning-utilities 0.11.8 +lightning-utilities 0.11.8 OK llvmlite 0.43.0 OK loguru 0.7.2 OK Mako 1.3.6 -> HAVE 1.2.4 -marisa-trie 1.2.1 -Markdown 3.7 OK -markdown-it-py 3.0.0 -MarkupSafe 3.0.2 +marisa-trie 1.2.1 OK +Markdown 3.7 -> HAVE 3.6 +markdown-it-py 3.0.0 OK +MarkupSafe 3.0.2 -> HAVE 2.1.3 matplotlib 3.9.2 -> HAVE 3.8.2 -mdurl 0.1.2 +mdurl 0.1.2 OK monai 1.4.0 OK (without extras) -mpmath 1.3.0 -multidict 6.1.0 +mpmath 1.3.0 OK +multidict 6.1.0 -> HAVE 6.0.5 multiprocess 0.70.16 OK -multivolumefile 0.2.3 +multivolumefile 0.2.3 OK exts murmurhash 1.0.10 OK networkx 2.8.8 OK -nflows 0.14 +nflows 0.14 OK exts numba 0.60.0 OK -numpy 1.26.4 +numpy 1.26.4 -> HAVE 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 @@ -97,47 +97,47 @@ nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.19.3 nvidia-nvjitlink-cu12 12.6.77 nvidia-nvtx-cu12 12.1.105 -opacus 1.5.2 -opt_einsum 3.4.0 -optuna 4.0.0 -> AVE 3.6.1 -packaging 24.1 -pandas 2.2.3 -patsy 0.5.6 -pgmpy 0.1.26 -pillow 11.0.0 -pip 24.0 +opacus 1.5.2 OK exts +opt_einsum 3.4.0 OK exts +optuna 4.0.0 -> HAVE 3.6.1 +packaging 24.1 -> HAVE 23.2 +pandas 2.2.3 -> HAVE 2.1.3 +patsy 0.5.6 OK +pgmpy 0.1.26 OK exts +pillow 11.0.0 -> maybe not needed - have pillow-simd +pip 24.0 X preshed 3.0.9 OK -propcache 0.2.0 -proto-plus 1.25.0 +propcache 0.2.0 X +proto-plus 1.25.0 ? protobuf 5.28.3 -> HAVE 4.25.3 -psutil 6.1.0 -py7zr 0.22.0 +psutil 6.1.0 -> HAVE 5.9.6 +py7zr 0.22.0 OK exts pyarrow 18.0.0 -> HAVE 16.0.1 -pyasn1 0.6.1 +pyasn1 0.6.1 ? pyasn1_modules 0.4.1 OK -pybcj 1.0.2 -pybind11 2.13.6 -pycox 0.3.0 -pycryptodomex 3.21.0 -pydantic 1.10.18 -Pygments 2.18.0 -pykeops 2.2.3 -pyparsing 3.2.0 -pyppmd 1.1.0 -python-dateutil 2.9.0.post0 +pybcj 1.0.2 OK exts +pybind11 2.13.6 -> HAVE 2.11.1 +pycox 0.3.0 OK exts +pycryptodomex 3.21.0 OK exts +pydantic 1.10.18 OK +Pygments 2.18.0 ? +pykeops 2.2.3 OK exts +pyparsing 3.2.0 -> HAVE 3.1.1 +pyppmd 1.1.0 OK exts +python-dateutil 2.9.0.post0 -> HAVE 2.8.2 pytorch-lightning 1.9.5 OK -pyts 0.13.0 -pytz 2024.2 +pyts 0.13.0 OK (tsai) +pytz 2024.2 -> HAVE 2023.3.post1 PyYAML 6.0.2 -> HAVE 6.0.1 -pyzstd 0.16.2 +pyzstd 0.16.2 OK exts redis 5.2.0 -> HAVE 7.2.4 -regex 2024.9.11 -requests 2.32.3 -rich 13.9.3 +regex 2024.9.11 -> HAVE 2023.10.3 +requests 2.32.3 -> HAVE 2.31.0 +rich 13.9.3 -> HAVE 13.6.0 rsa 4.9 OK safetensors 0.4.5 -> HAVE 0.4.4 scikit-learn 1.5.2 -> HAVE 1.4.0 -scipy 1.14.1 +scipy 1.14.1 -> HAVE 1.11.4 setuptools 75.3.0 shap 0.46.0 OK shellingham 1.5.4 @@ -155,7 +155,7 @@ synthcity 0.2.11 tenacity 9.0.0 tensorboard 2.18.0 tensorboard-data-server 0.7.2 OK -texttable 1.7.0 +texttable 1.7.0 OK exts thinc 8.2.5 OK threadpoolctl 3.5.0 tokenizers 0.20.1 -> HAVE 0.19.1 @@ -163,23 +163,23 @@ torch 2.2.0 -> HAVE 2.1.2 torchdata 0.7.1 OK torchmetrics 1.5.1 torchtext 0.16.2 OK -torchtuples 0.2.2 +torchtuples 0.2.2 OK torchvision 0.17.0 OK tqdm 4.66.6 -> HAVE 4.66.2 transformers 4.46.1 -> HAVE 4.44.0 triton 2.2.0 tsai 0.3.9 OK typer 0.12.5 -> USE 0.10.0 - has no pdm dep - no pdm for 2023b -typing_extensions 4.12.2 -tzdata 2024.2 -uritemplate 4.1.1 -urllib3 2.2.3 +typing_extensions 4.12.2 -> HAVE 4.10.0 +tzdata 2024.2 -> HAVE 2023.3 +uritemplate 4.1.1 ? +urllib3 2.2.3 -> HAVE 2.0.7 wasabi 1.1.3 OK weasel 0.4.1 OK Werkzeug 3.1.0 OK wrapt 1.16.0 OK xgboost 2.1.2 -> HAVE 2.1.1 -xgbse 0.3.3 +xgbse 0.3.3 !!! xxhash 3.5.0 -> HAVE 3.4.1 -yarl 1.17.1 -zipp 3.20.2 \ No newline at end of file +yarl 1.17.1 -> HAVE 1.9.4 +zipp 3.20.2 -> HAVE 3.17.0 \ No newline at end of file diff --git a/357_Synthcity/2023b_v0.2.11_new/accelerate-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/accelerate-2023b.eb index ac4fe2bd..8499ca0a 100644 --- a/357_Synthcity/2023b_v0.2.11_new/accelerate-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/accelerate-2023b.eb @@ -1,7 +1,7 @@ easyblock = 'PythonBundle' name = 'accelerate' -version = '0.33.0' +version = '1.0.1' homepage = 'https://github.com/huggingface/accelerate' description = """A simple way to launch, train, and use PyTorch models on almost any device and @@ -14,9 +14,10 @@ dependencies = [ ('Python', '3.11.5'), ('Python-bundle-PyPI', '2023.10'), ('SciPy-bundle', '2023.11'), - ('PyTorch-bundle', '2.1.2'), + ('PyTorch', '2.1.2'), ('PyYAML', '6.0.1'), ('Safetensors', '0.4.4'), + ('tqdm', '4.66.2'), ] sanity_pip_check = True @@ -25,10 +26,10 @@ use_pip = True exts_list = [ ('huggingface-hub', '0.26.2', { 'sources': ['huggingface_hub-%(version)s.tar.gz'], - 'checksums': ['7b45d6744dd53ce9cbf9880957de00e9d10a9ae837f1c9b7255fc8fa4e8264f3'], + 'checksums': ['b100d853465d965733964d123939ba287da60a547087783ddff8a323f340332b'], }), (name, version, { - 'checksums': ['11ba481ed6ea09191775df55ce464aeeba67a024bd0261a44b77b30fb439e26a'], + 'checksums': ['e8f95fc2db14915dc0a9182edfcf3068e5ddb2fa310b583717ad44e5c442399c'], }), ] diff --git a/357_Synthcity/2023b_v0.2.11_new/fastai-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/fastai-2023b.eb index cb7c57d5..448226e5 100644 --- a/357_Synthcity/2023b_v0.2.11_new/fastai-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/fastai-2023b.eb @@ -10,6 +10,22 @@ toolchain = {'name': 'foss', 'version': '2023b'} use_pip = True +# DEPS: + # OK fastdownload>=0.0.5,<2 + # OK fastcore>=1.5.29,<1.8 + # OK torchvision>=0.11 + # OK matplotlib + # OK pandas + # OK requests + # OK pyyaml + # OK fastprogress>=0.2.4 + # OK pillow>=9.0.0 + # OK scikit-learn + # OK scipy + # OK spacy<4 + # OK packaging + # OK torch>=1.10,<2.6 + dependencies = [ ('Python', '3.11.5'), ('PyTorch', '2.1.2'), @@ -27,13 +43,13 @@ exts_list = [ 'checksums': ['20507edb8e89406a1fbd7775e6e2a3d81a4dd633dd506b0e9cf0e1613e831d6a'], }), ('fastcore', '1.7.19', { - 'checksums': ['3f23dfadd77428be99558fdad66bf04c79a9c626e694c7404ede816ed8372987'], + 'checksums': ['72ac75cf3f7a591966e24aa37a4283512a097a098b4794c944ce707f71ba0f02'], }), ('fastprogress', '1.0.3', { 'checksums': ['7a17d2b438890f838c048eefce32c4ded47197ecc8ea042cecc33d3deb8022f5'], }), (name, version, { - 'checksums': ['f2cc20fd18cdf5ec738cc56d29d54de75887d48ad15f9d35cf50c38d3a856923'], + 'checksums': ['b20593dbcae7522f1d77a8f5163d1fd60314f292640496804dc356e41cb36454'], }), ] diff --git a/357_Synthcity/2023b_v0.2.11_new/grpcio-1.67.1_use-ebroot.patch b/357_Synthcity/2023b_v0.2.11_new/grpcio-1.67.1_use-ebroot.patch new file mode 100644 index 00000000..df7cfd69 --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/grpcio-1.67.1_use-ebroot.patch @@ -0,0 +1,52 @@ +Author: yqshao (Yunqi Shao), Update: Pavel Tománek (Inuits) +Update setup.py to use dependencies from EB +--- setup.py.orig 2024-11-04 12:15:44.508837000 +0100 ++++ setup.py 2024-11-04 12:20:12.717679000 +0100 +@@ -298,29 +298,33 @@ + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + + if BUILD_WITH_SYSTEM_OPENSSL: ++ EBROOTOPENSSL = os.environ.get('EBROOTOPENSSL') + CORE_C_FILES = filter( + lambda x: "third_party/boringssl" not in x, CORE_C_FILES + ) + CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES) +- SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),) ++ SSL_INCLUDE = (os.path.join(EBROOTOPENSSL, "include", "openssl"),) + + if BUILD_WITH_SYSTEM_ZLIB: ++ EBROOTZLIB = os.environ.get('EBROOTZLIB') + CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES) +- ZLIB_INCLUDE = (os.path.join("/usr", "include"),) ++ ZLIB_INCLUDE = (os.path.join(EBROOTZLIB, "include"),) + + if BUILD_WITH_SYSTEM_CARES: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + CARES_INCLUDE = (os.path.join("/usr", "include"),) + + if BUILD_WITH_SYSTEM_RE2: ++ EBROOTRE2 = os.environ.get('EBROOTRE2') + CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES) +- RE2_INCLUDE = (os.path.join("/usr", "include", "re2"),) ++ RE2_INCLUDE = (os.path.join(EBROOTRE2, "include", "re2"),) + + if BUILD_WITH_SYSTEM_ABSL: ++ EBROOTABSEIL = os.environ.get('EBROOTABSEIL') + CORE_C_FILES = filter( + lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES + ) +- ABSL_INCLUDE = (os.path.join("/usr", "include"),) ++ ABSL_INCLUDE = (os.path.join(EBROOTABSEIL, "include"),) + + EXTENSION_INCLUDE_DIRECTORIES = ( + (PYTHON_STEM,) +@@ -363,8 +367,7 @@ + EXTENSION_LIBRARIES += ("re2",) + if BUILD_WITH_SYSTEM_ABSL: + EXTENSION_LIBRARIES += tuple( +- lib.stem[3:] +- for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so")) ++ lib.stem[3:] for lib in pathlib.Path(EBROOTABSEIL).glob("lib*/libabsl_*.so") + ) + + DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) diff --git a/357_Synthcity/2023b_v0.2.11_new/grpcio-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/grpcio-2023b.eb index 749b0ec2..dd33a6a7 100644 --- a/357_Synthcity/2023b_v0.2.11_new/grpcio-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/grpcio-2023b.eb @@ -41,12 +41,10 @@ exts_list = [ "GRPC_PYTHON_BUILD_SYSTEM_RE2=True " "GRPC_PYTHON_BUILD_SYSTEM_ABSL=True " ), - 'patches': ['grpcio-1.57.0_use-ebroot.patch'], + 'patches': ['grpcio-1.67.1_use-ebroot.patch'], 'checksums': [ - {'grpcio-1.62.3.tar.gz': - '4439bbd759636e37b66841117a66444b454937e27f0125205d2d117d7827c643'}, - {'grpcio-1.57.0_use-ebroot.patch': - '5faf822cd817b723ae9361e43656d0ecc7b3333a166bbab2df80b43ae588e510'}, + {'grpcio-1.67.1.tar.gz': '3dc2ed4cabea4dc14d5e708c2b426205956077cc5de419b4d4079315017e9732'}, + {'grpcio-1.67.1_use-ebroot.patch': '8606002b8689d9ffde1c7aa097f0fd430430b42f2230ea427b73525de69c568b'}, ], }), ] diff --git a/357_Synthcity/2023b_v0.2.11_new/imbalanced-learn-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/imbalanced-learn-2023b.eb index 85edfc95..02726fee 100644 --- a/357_Synthcity/2023b_v0.2.11_new/imbalanced-learn-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/imbalanced-learn-2023b.eb @@ -20,7 +20,7 @@ use_pip = True exts_list = [ (name, version, { 'modulename': 'imblearn', - 'checksums': ['5b00796a01419e9102bd425e27c319d58d1f6cf2dfa751e02ed7f4edf67c3c1b'], + 'checksums': ['8153ba385d296b07d97e0901a2624a86c06b48c94c2f92da3a5354827697b7a3'], }), ] diff --git a/357_Synthcity/2023b_v0.2.11_new/monai-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/monai-2023b.eb index 111e5b44..ab8a8f32 100644 --- a/357_Synthcity/2023b_v0.2.11_new/monai-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/monai-2023b.eb @@ -84,4 +84,6 @@ exts_list = [ sanity_pip_check = True +sanity_check_commands = ["python -c 'import monai; monai.config.print_config()'"] + moduleclass = 'vis' diff --git a/357_Synthcity/2023b_v0.2.11_new/monai-2023b_full_extras.eb b/357_Synthcity/2023b_v0.2.11_new/monai-2023b_full_extras.eb new file mode 100644 index 00000000..88e6c368 --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/monai-2023b_full_extras.eb @@ -0,0 +1,88 @@ +easyblock = 'PythonBundle' + +name = 'MONAI' +version = '1.4.0' + +homepage = 'https://monai.io/' +description = """ +MONAI is a PyTorch-based, open-source framework for deep learning in healthcare +imaging, part of PyTorch Ecosystem. +""" + +toolchain = {'name': 'foss', 'version': '2023b'} + +github_account = 'Project-MONAI' + +# DEPS: + # setup_requires = + # torch + # OK ninja + # install_requires = + # torch>=1.9 + # numpy>=1.20 + # extras = + # nibabel + # ? ninja + # scikit-image>=0.14.2 + # scipy>=1.12.0; python_version >= '3.9' + # pillow!=8.3.0 + # tensorboard>=2.12.0 + # gdown>=4.7.3 + # pytorch-ignite==0.4.11 + # torchvision + # itk>=5.2 + # tqdm>=4.47.0 + # lmdb + # psutil + # cucim-cu12; python_version >= '3.9' and python_version <= '3.10' + # openslide-python + # tifffile + # imagecodecs + # pandas + # einops + # transformers>=4.36.0, <4.41.0; python_version <= '3.10' + # mlflow>=2.12.2 + # clearml>=1.10.0rc0 + # matplotlib>=3.6.3 + # tensorboardX + # pyyaml + # fire + # jsonschema + # pynrrd + # pydicom + # h5py + # nni + # optuna + # onnx>=1.13.0 + # onnxruntime; python_version <= '3.10' + # zarr + # lpips==0.1.4 + # ?nvidia-ml-py + # huggingface_hub - NEW one + +builddependencies = [ + ('Ninja', '1.11.1'), +] + +dependencies = [ + ('Python', '3.11.5'), + ('SciPy-bundle', '2023.11'), + ('PyTorch', '2.1.2'), +] + +use_pip = True + +exts_list = [ + (name, version, { + 'preinstallopts': 'BUILD_MONAI=1', + 'source_urls': ['https://github.com/%(github_account)s/%(name)s/archive'], + 'sources': ['%(version)s.tar.gz'], + 'checksums': ['3ed592c7a760f5c3084021da5585cd1ba5e52a969b85a62e1f15495cb71ae26e'], + }), +] + +sanity_pip_check = True + +sanity_check_commands = ["python -c 'import monai; monai.config.print_config()'"] + +moduleclass = 'vis' diff --git a/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/grpcio.patch b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/grpcio.patch new file mode 100644 index 00000000..2bee70e1 --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/grpcio.patch @@ -0,0 +1,50 @@ +--- setup.py.orig 2024-11-04 12:15:44.508837000 +0100 ++++ setup.py 2024-11-04 12:20:12.717679000 +0100 +@@ -298,29 +298,33 @@ + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + + if BUILD_WITH_SYSTEM_OPENSSL: ++ EBROOTOPENSSL = os.environ.get('EBROOTOPENSSL') + CORE_C_FILES = filter( + lambda x: "third_party/boringssl" not in x, CORE_C_FILES + ) + CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES) +- SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),) ++ SSL_INCLUDE = (os.path.join(EBROOTOPENSSL, "include", "openssl"),) + + if BUILD_WITH_SYSTEM_ZLIB: ++ EBROOTZLIB = os.environ.get('EBROOTZLIB') + CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES) +- ZLIB_INCLUDE = (os.path.join("/usr", "include"),) ++ ZLIB_INCLUDE = (os.path.join(EBROOTZLIB, "include"),) + + if BUILD_WITH_SYSTEM_CARES: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + CARES_INCLUDE = (os.path.join("/usr", "include"),) + + if BUILD_WITH_SYSTEM_RE2: ++ EBROOTRE2 = os.environ.get('EBROOTRE2') + CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES) +- RE2_INCLUDE = (os.path.join("/usr", "include", "re2"),) ++ RE2_INCLUDE = (os.path.join(EBROOTRE2, "include", "re2"),) + + if BUILD_WITH_SYSTEM_ABSL: ++ EBROOTABSEIL = os.environ.get('EBROOTABSEIL') + CORE_C_FILES = filter( + lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES + ) +- ABSL_INCLUDE = (os.path.join("/usr", "include"),) ++ ABSL_INCLUDE = (os.path.join(EBROOTABSEIL, "include"),) + + EXTENSION_INCLUDE_DIRECTORIES = ( + (PYTHON_STEM,) +@@ -363,8 +367,7 @@ + EXTENSION_LIBRARIES += ("re2",) + if BUILD_WITH_SYSTEM_ABSL: + EXTENSION_LIBRARIES += tuple( +- lib.stem[3:] +- for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so")) ++ lib.stem[3:] for lib in pathlib.Path(EBROOTABSEIL).glob("lib*/libabsl_*.so") + ) + + DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) diff --git a/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py new file mode 100644 index 00000000..306f1236 --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py @@ -0,0 +1,610 @@ +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A setup module for the GRPC Python package.""" + +# NOTE(https://github.com/grpc/grpc/issues/24028): allow setuptools to monkey +# patch distutils +import setuptools # isort:skip + +# Monkey Patch the unix compiler to accept ASM +# files used by boring SSL. +from distutils.unixccompiler import UnixCCompiler + +UnixCCompiler.src_extensions.append(".S") +del UnixCCompiler + +import os +import os.path +import pathlib +import platform +import re +import shlex +import shutil +import subprocess +from subprocess import PIPE +import sys +import sysconfig + +import _metadata +from setuptools import Extension +from setuptools.command import egg_info + +# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in. +egg_info.manifest_maker.template = "PYTHON-MANIFEST.in" + +PY3 = sys.version_info.major == 3 +PYTHON_STEM = os.path.join("src", "python", "grpcio") +CORE_INCLUDE = ( + "include", + ".", +) +ABSL_INCLUDE = (os.path.join("third_party", "abseil-cpp"),) +ADDRESS_SORTING_INCLUDE = ( + os.path.join("third_party", "address_sorting", "include"), +) +CARES_INCLUDE = ( + os.path.join("third_party", "cares", "cares", "include"), + os.path.join("third_party", "cares"), + os.path.join("third_party", "cares", "cares"), +) +if "darwin" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_darwin"),) +if "freebsd" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_freebsd"),) +if "linux" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_linux"),) +if "openbsd" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_openbsd"),) +RE2_INCLUDE = (os.path.join("third_party", "re2"),) +SSL_INCLUDE = ( + os.path.join("third_party", "boringssl-with-bazel", "src", "include"), +) +UPB_INCLUDE = (os.path.join("third_party", "upb"),) +UPB_GRPC_GENERATED_INCLUDE = (os.path.join("src", "core", "ext", "upb-gen"),) +UPBDEFS_GRPC_GENERATED_INCLUDE = ( + os.path.join("src", "core", "ext", "upbdefs-gen"), +) +UTF8_RANGE_INCLUDE = (os.path.join("third_party", "utf8_range"),) +XXHASH_INCLUDE = (os.path.join("third_party", "xxhash"),) +ZLIB_INCLUDE = (os.path.join("third_party", "zlib"),) +README = os.path.join(PYTHON_STEM, "README.rst") + +# Ensure we're in the proper directory whether or not we're being used by pip. +os.chdir(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, os.path.abspath(PYTHON_STEM)) + +# Break import-style to ensure we can actually find our in-repo dependencies. +import _parallel_compile_patch +import _spawn_patch +import grpc_core_dependencies +import python_version + +import commands +import grpc_version + +_parallel_compile_patch.monkeypatch_compile_maybe() +_spawn_patch.monkeypatch_spawn() + + +LICENSE = "Apache License 2.0" + +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) + + +def _env_bool_value(env_name, default): + """Parses a bool option from an environment variable""" + return os.environ.get(env_name, default).upper() not in ["FALSE", "0", ""] + + +BUILD_WITH_BORING_SSL_ASM = _env_bool_value( + "GRPC_BUILD_WITH_BORING_SSL_ASM", "True" +) + +# Export this environment variable to override the platform variant that will +# be chosen for boringssl assembly optimizations. This option is useful when +# crosscompiling and the host platform as obtained by sysconfig.get_platform() +# doesn't match the platform we are targetting. +# Example value: "linux-aarch64" +BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = os.environ.get( + "GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM", "" +) + +# Environment variable to determine whether or not the Cython extension should +# *use* Cython or use the generated C files. Note that this requires the C files +# to have been generated by building first *with* Cython support. Even if this +# is set to false, if the script detects that the generated `.c` file isn't +# present, then it will still attempt to use Cython. +BUILD_WITH_CYTHON = _env_bool_value("GRPC_PYTHON_BUILD_WITH_CYTHON", "False") + +# Export this variable to use the system installation of openssl. You need to +# have the header files installed (in /usr/include/openssl) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_OPENSSL = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL", "False" +) + +# Export this variable to use the system installation of zlib. You need to +# have the header files installed (in /usr/include/) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_ZLIB = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_ZLIB", "False" +) + +# Export this variable to use the system installation of cares. You need to +# have the header files installed (in /usr/include/) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_CARES = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_CARES", "False" +) + +# Export this variable to use the system installation of re2. You need to +# have the header files installed (in /usr/include/re2) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_RE2 = _env_bool_value("GRPC_PYTHON_BUILD_SYSTEM_RE2", "False") + +# Export this variable to use the system installation of abseil. You need to +# have the header files installed (in /usr/include/absl) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_ABSL = os.environ.get("GRPC_PYTHON_BUILD_SYSTEM_ABSL", False) + +# Export this variable to force building the python extension with a statically linked libstdc++. +# At least on linux, this is normally not needed as we can build manylinux-compatible wheels on linux just fine +# without statically linking libstdc++ (which leads to a slight increase in the wheel size). +# This option is useful when crosscompiling wheels for aarch64 where +# it's difficult to ensure that the crosscompilation toolchain has a high-enough version +# of GCC (we require >=5.1) but still uses old-enough libstdc++ symbols. +# TODO(jtattermusch): remove this workaround once issues with crosscompiler version are resolved. +BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value( + "GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX", "False" +) + +# For local development use only: This skips building gRPC Core and its +# dependencies, including protobuf and boringssl. This allows "incremental" +# compilation by first building gRPC Core using make, then building only the +# Python/Cython layers here. +# +# Note that this requires libboringssl.a in the libs/{dbg,opt}/ directory, which +# may require configuring make to not use the system openssl implementation: +# +# make HAS_SYSTEM_OPENSSL_ALPN=0 +# +# TODO(ericgribkoff) Respect the BUILD_WITH_SYSTEM_* flags alongside this option +USE_PREBUILT_GRPC_CORE = _env_bool_value( + "GRPC_PYTHON_USE_PREBUILT_GRPC_CORE", "False" +) + +# Environment variable to determine whether or not to enable coverage analysis +# in Cython modules. +ENABLE_CYTHON_TRACING = _env_bool_value( + "GRPC_PYTHON_ENABLE_CYTHON_TRACING", "False" +) + +# Environment variable specifying whether or not there's interest in setting up +# documentation building. +ENABLE_DOCUMENTATION_BUILD = _env_bool_value( + "GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD", "False" +) + + +def check_linker_need_libatomic(): + """Test if linker on system needs libatomic.""" + code_test = ( + b"#include \n" + + b"int main() { return std::atomic{}; }" + ) + cxx = shlex.split(os.environ.get("CXX", "c++")) + cpp_test = subprocess.Popen( + cxx + ["-x", "c++", "-std=c++14", "-"], + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, + ) + cpp_test.communicate(input=code_test) + if cpp_test.returncode == 0: + return False + # Double-check to see if -latomic actually can solve the problem. + # https://github.com/grpc/grpc/issues/22491 + cpp_test = subprocess.Popen( + cxx + ["-x", "c++", "-std=c++14", "-", "-latomic"], + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, + ) + cpp_test.communicate(input=code_test) + return cpp_test.returncode == 0 + + +# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are +# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. +# We use these environment variables to thus get around that without locking +# ourselves in w.r.t. the multitude of operating systems this ought to build on. +# We can also use these variables as a way to inject environment-specific +# compiler/linker flags. We assume GCC-like compilers and/or MinGW as a +# reasonable default. +EXTRA_ENV_COMPILE_ARGS = os.environ.get("GRPC_PYTHON_CFLAGS", None) +EXTRA_ENV_LINK_ARGS = os.environ.get("GRPC_PYTHON_LDFLAGS", None) +if EXTRA_ENV_COMPILE_ARGS is None: + EXTRA_ENV_COMPILE_ARGS = "" + if "win32" in sys.platform: + # MSVC by defaults uses C++14 so C11 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " /std:c11" + # We need to statically link the C++ Runtime, only the C runtime is + # available dynamically + EXTRA_ENV_COMPILE_ARGS += " /MT" + elif "linux" in sys.platform: + # GCC by defaults uses C17 so only C++14 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " -std=c++14" + EXTRA_ENV_COMPILE_ARGS += ( + " -fvisibility=hidden -fno-wrapv -fno-exceptions" + ) + elif "darwin" in sys.platform: + # AppleClang by defaults uses C17 so only C++14 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " -std=c++14" + EXTRA_ENV_COMPILE_ARGS += ( + " -stdlib=libc++ -fvisibility=hidden -fno-wrapv -fno-exceptions" + " -DHAVE_UNISTD_H" + ) + +if EXTRA_ENV_LINK_ARGS is None: + EXTRA_ENV_LINK_ARGS = "" + if "linux" in sys.platform or "darwin" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -lpthread" + if check_linker_need_libatomic(): + EXTRA_ENV_LINK_ARGS += " -latomic" + if "linux" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -static-libgcc" + +# Explicitly link Core Foundation framework for MacOS to ensure no symbol is +# missing when compiled using package managers like Conda. +if "darwin" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -framework CoreFoundation" + +EXTRA_COMPILE_ARGS = shlex.split(EXTRA_ENV_COMPILE_ARGS) +EXTRA_LINK_ARGS = shlex.split(EXTRA_ENV_LINK_ARGS) + +if BUILD_WITH_STATIC_LIBSTDCXX: + EXTRA_LINK_ARGS.append("-static-libstdc++") + +CYTHON_EXTENSION_PACKAGE_NAMES = () + +CYTHON_EXTENSION_MODULE_NAMES = ("grpc._cython.cygrpc",) + +CYTHON_HELPER_C_FILES = () + +CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES) +if "win32" in sys.platform: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + +if BUILD_WITH_SYSTEM_OPENSSL: + EBROOTOPENSSL = os.environ.get('EBROOTOPENSSL') + CORE_C_FILES = filter( + lambda x: "third_party/boringssl" not in x, CORE_C_FILES + ) + CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES) + SSL_INCLUDE = (os.path.join(EBROOTOPENSSL, "include", "openssl"),) + +if BUILD_WITH_SYSTEM_ZLIB: + EBROOTZLIB = os.environ.get('EBROOTZLIB') + CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES) + ZLIB_INCLUDE = (os.path.join(EBROOTZLIB, "include"),) + +if BUILD_WITH_SYSTEM_CARES: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + CARES_INCLUDE = (os.path.join("/usr", "include"),) + +if BUILD_WITH_SYSTEM_RE2: + EBROOTRE2 = os.environ.get('EBROOTRE2') + CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES) + RE2_INCLUDE = (os.path.join(EBROOTRE2, "include", "re2"),) + +if BUILD_WITH_SYSTEM_ABSL: + EBROOTABSEIL = os.environ.get('EBROOTABSEIL') + CORE_C_FILES = filter( + lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES + ) + ABSL_INCLUDE = (os.path.join(EBROOTABSEIL, "include"),) + +EXTENSION_INCLUDE_DIRECTORIES = ( + (PYTHON_STEM,) + + CORE_INCLUDE + + ABSL_INCLUDE + + ADDRESS_SORTING_INCLUDE + + CARES_INCLUDE + + RE2_INCLUDE + + SSL_INCLUDE + + UPB_INCLUDE + + UPB_GRPC_GENERATED_INCLUDE + + UPBDEFS_GRPC_GENERATED_INCLUDE + + UTF8_RANGE_INCLUDE + + XXHASH_INCLUDE + + ZLIB_INCLUDE +) + +EXTENSION_LIBRARIES = () +if "linux" in sys.platform: + EXTENSION_LIBRARIES += ("rt",) +if not "win32" in sys.platform: + EXTENSION_LIBRARIES += ("m",) +if "win32" in sys.platform: + EXTENSION_LIBRARIES += ( + "advapi32", + "bcrypt", + "dbghelp", + "ws2_32", + ) +if BUILD_WITH_SYSTEM_OPENSSL: + EXTENSION_LIBRARIES += ( + "ssl", + "crypto", + ) +if BUILD_WITH_SYSTEM_ZLIB: + EXTENSION_LIBRARIES += ("z",) +if BUILD_WITH_SYSTEM_CARES: + EXTENSION_LIBRARIES += ("cares",) +if BUILD_WITH_SYSTEM_RE2: + EXTENSION_LIBRARIES += ("re2",) +if BUILD_WITH_SYSTEM_ABSL: + EXTENSION_LIBRARIES += tuple( + lib.stem[3:] for lib in pathlib.Path(EBROOTABSEIL).glob("lib*/libabsl_*.so") + ) + +DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) +asm_files = [] + + +# Quotes on Windows build macros are evaluated differently from other platforms, +# so we must apply quotes asymmetrically in order to yield the proper result in +# the binary. +def _quote_build_define(argument): + if "win32" in sys.platform: + return '"\\"{}\\""'.format(argument) + return '"{}"'.format(argument) + + +DEFINE_MACROS += ( + ("GRPC_XDS_USER_AGENT_NAME_SUFFIX", _quote_build_define("Python")), + ( + "GRPC_XDS_USER_AGENT_VERSION_SUFFIX", + _quote_build_define(_metadata.__version__), + ), +) + +asm_key = "" +if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: + boringssl_asm_platform = ( + BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM + if BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM + else sysconfig.get_platform() + ) + if "i686" in boringssl_asm_platform: + print("Enabling SSE2 on %s platform" % boringssl_asm_platform) + EXTRA_COMPILE_ARGS.append("-msse2") + else: + print("SSE2 not enabled on %s platform" % boringssl_asm_platform) + # BoringSSL's gas-compatible assembly files are all internally conditioned + # by the preprocessor. Provided the platform has a gas-compatible assembler + # (i.e. not Windows), we can include the assembly files and let BoringSSL + # decide which ones should and shouldn't be used for the build. + if not boringssl_asm_platform.startswith("win"): + asm_key = "crypto_asm" + else: + print( + "ASM Builds for BoringSSL currently not supported on:", + boringssl_asm_platform, + ) +if asm_key: + asm_files = grpc_core_dependencies.ASM_SOURCE_FILES[asm_key] +else: + DEFINE_MACROS += (("OPENSSL_NO_ASM", 1),) + +if "win32" in sys.platform: + # TODO(zyc): Re-enable c-ares on x64 and x86 windows after fixing the + # ares_library_init compilation issue + DEFINE_MACROS += ( + ("WIN32_LEAN_AND_MEAN", 1), + ("CARES_STATICLIB", 1), + ("GRPC_ARES", 0), + ("NTDDI_VERSION", 0x06000000), + ("NOMINMAX", 1), + ) + if "64bit" in platform.architecture()[0]: + DEFINE_MACROS += (("MS_WIN64", 1),) + elif sys.version_info >= (3, 5): + # For some reason, this is needed to get access to inet_pton/inet_ntop + # on msvc, but only for 32 bits + DEFINE_MACROS += (("NTDDI_VERSION", 0x06000000),) +else: + DEFINE_MACROS += ( + ("HAVE_CONFIG_H", 1), + ("GRPC_ENABLE_FORK_SUPPORT", 1), + ) + +# Fix for multiprocessing support on Apple devices. +# TODO(vigneshbabu): Remove this once the poll poller gets fork support. +DEFINE_MACROS += (("GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER", 1),) + +# Fix for Cython build issue in aarch64. +# It's required to define this macro before include . +# was included in core/telemetry/call_tracer.h. +# This macro should already be defined in grpc/grpc.h through port_platform.h, +# but we're still having issue in aarch64, so we manually define the macro here. +# TODO(xuanwn): Figure out what's going on in the aarch64 build so we can support +# gcc + Bazel. +DEFINE_MACROS += (("__STDC_FORMAT_MACROS", None),) + +LDFLAGS = tuple(EXTRA_LINK_ARGS) +CFLAGS = tuple(EXTRA_COMPILE_ARGS) +if "linux" in sys.platform or "darwin" in sys.platform: + pymodinit_type = "PyObject*" if PY3 else "void" + pymodinit = 'extern "C" __attribute__((visibility ("default"))) {}'.format( + pymodinit_type + ) + DEFINE_MACROS += (("PyMODINIT_FUNC", pymodinit),) + DEFINE_MACROS += (("GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK", 1),) + + +def cython_extensions_and_necessity(): + cython_module_files = [ + os.path.join(PYTHON_STEM, name.replace(".", "/") + ".pyx") + for name in CYTHON_EXTENSION_MODULE_NAMES + ] + config = os.environ.get("CONFIG", "opt") + prefix = "libs/" + config + "/" + if USE_PREBUILT_GRPC_CORE: + extra_objects = [ + prefix + "libares.a", + prefix + "libboringssl.a", + prefix + "libgpr.a", + prefix + "libgrpc.a", + ] + core_c_files = [] + else: + core_c_files = list(CORE_C_FILES) + extra_objects = [] + extensions = [ + Extension( + name=module_name, + sources=( + [module_file] + + list(CYTHON_HELPER_C_FILES) + + core_c_files + + asm_files + ), + include_dirs=list(EXTENSION_INCLUDE_DIRECTORIES), + libraries=list(EXTENSION_LIBRARIES), + define_macros=list(DEFINE_MACROS), + extra_objects=extra_objects, + extra_compile_args=list(CFLAGS), + extra_link_args=list(LDFLAGS), + ) + for (module_name, module_file) in zip( + list(CYTHON_EXTENSION_MODULE_NAMES), cython_module_files + ) + ] + need_cython = BUILD_WITH_CYTHON + if not BUILD_WITH_CYTHON: + need_cython = ( + need_cython + or not commands.check_and_update_cythonization(extensions) + ) + # TODO: the strategy for conditional compiling and exposing the aio Cython + # dependencies will be revisited by https://github.com/grpc/grpc/issues/19728 + return ( + commands.try_cythonize( + extensions, + linetracing=ENABLE_CYTHON_TRACING, + mandatory=BUILD_WITH_CYTHON, + ), + need_cython, + ) + + +CYTHON_EXTENSION_MODULES, need_cython = cython_extensions_and_necessity() + +PACKAGE_DIRECTORIES = { + "": PYTHON_STEM, +} + +INSTALL_REQUIRES = () + +EXTRAS_REQUIRES = { + "protobuf": "grpcio-tools>={version}".format(version=grpc_version.VERSION), +} + +SETUP_REQUIRES = ( + INSTALL_REQUIRES + ("Sphinx~=1.8.1",) if ENABLE_DOCUMENTATION_BUILD else () +) + +try: + import Cython +except ImportError: + if BUILD_WITH_CYTHON: + sys.stderr.write( + "You requested a Cython build via GRPC_PYTHON_BUILD_WITH_CYTHON, " + "but do not have Cython installed. We won't stop you from using " + "other commands, but the extension files will fail to build.\n" + ) + elif need_cython: + sys.stderr.write( + "We could not find Cython. Setup may take 10-20 minutes.\n" + ) + SETUP_REQUIRES += ("cython>=3.0.0",) + +COMMAND_CLASS = { + "doc": commands.SphinxDocumentation, + "build_project_metadata": commands.BuildProjectMetadata, + "build_py": commands.BuildPy, + "build_ext": commands.BuildExt, + "gather": commands.Gather, + "clean": commands.Clean, +} + +# Ensure that package data is copied over before any commands have been run: +credentials_dir = os.path.join(PYTHON_STEM, "grpc", "_cython", "_credentials") +try: + os.mkdir(credentials_dir) +except OSError: + pass +shutil.copyfile( + os.path.join("etc", "roots.pem"), os.path.join(credentials_dir, "roots.pem") +) + +PACKAGE_DATA = { + # Binaries that may or may not be present in the final installation, but are + # mentioned here for completeness. + "grpc._cython": [ + "_credentials/roots.pem", + "_windows/grpc_c.32.python", + "_windows/grpc_c.64.python", + ], +} +PACKAGES = setuptools.find_packages(PYTHON_STEM) + +setuptools.setup( + name="grpcio", + version=grpc_version.VERSION, + description="HTTP/2-based RPC framework", + author="The gRPC Authors", + author_email="grpc-io@googlegroups.com", + url="https://grpc.io", + project_urls={ + "Source Code": "https://github.com/grpc/grpc", + "Bug Tracker": "https://github.com/grpc/grpc/issues", + "Documentation": "https://grpc.github.io/grpc/python", + }, + license=LICENSE, + classifiers=CLASSIFIERS, + long_description_content_type="text/x-rst", + long_description=open(README).read(), + ext_modules=CYTHON_EXTENSION_MODULES, + packages=list(PACKAGES), + package_dir=PACKAGE_DIRECTORIES, + package_data=PACKAGE_DATA, + python_requires=f">={python_version.MIN_PYTHON_VERSION}", + install_requires=INSTALL_REQUIRES, + extras_require=EXTRAS_REQUIRES, + setup_requires=SETUP_REQUIRES, + cmdclass=COMMAND_CLASS, +) \ No newline at end of file diff --git a/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py.orig b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py.orig new file mode 100644 index 00000000..e8c87fee --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/patch_grpcio/setup.py.orig @@ -0,0 +1,607 @@ +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A setup module for the GRPC Python package.""" + +# NOTE(https://github.com/grpc/grpc/issues/24028): allow setuptools to monkey +# patch distutils +import setuptools # isort:skip + +# Monkey Patch the unix compiler to accept ASM +# files used by boring SSL. +from distutils.unixccompiler import UnixCCompiler + +UnixCCompiler.src_extensions.append(".S") +del UnixCCompiler + +import os +import os.path +import pathlib +import platform +import re +import shlex +import shutil +import subprocess +from subprocess import PIPE +import sys +import sysconfig + +import _metadata +from setuptools import Extension +from setuptools.command import egg_info + +# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in. +egg_info.manifest_maker.template = "PYTHON-MANIFEST.in" + +PY3 = sys.version_info.major == 3 +PYTHON_STEM = os.path.join("src", "python", "grpcio") +CORE_INCLUDE = ( + "include", + ".", +) +ABSL_INCLUDE = (os.path.join("third_party", "abseil-cpp"),) +ADDRESS_SORTING_INCLUDE = ( + os.path.join("third_party", "address_sorting", "include"), +) +CARES_INCLUDE = ( + os.path.join("third_party", "cares", "cares", "include"), + os.path.join("third_party", "cares"), + os.path.join("third_party", "cares", "cares"), +) +if "darwin" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_darwin"),) +if "freebsd" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_freebsd"),) +if "linux" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_linux"),) +if "openbsd" in sys.platform: + CARES_INCLUDE += (os.path.join("third_party", "cares", "config_openbsd"),) +RE2_INCLUDE = (os.path.join("third_party", "re2"),) +SSL_INCLUDE = ( + os.path.join("third_party", "boringssl-with-bazel", "src", "include"), +) +UPB_INCLUDE = (os.path.join("third_party", "upb"),) +UPB_GRPC_GENERATED_INCLUDE = (os.path.join("src", "core", "ext", "upb-gen"),) +UPBDEFS_GRPC_GENERATED_INCLUDE = ( + os.path.join("src", "core", "ext", "upbdefs-gen"), +) +UTF8_RANGE_INCLUDE = (os.path.join("third_party", "utf8_range"),) +XXHASH_INCLUDE = (os.path.join("third_party", "xxhash"),) +ZLIB_INCLUDE = (os.path.join("third_party", "zlib"),) +README = os.path.join(PYTHON_STEM, "README.rst") + +# Ensure we're in the proper directory whether or not we're being used by pip. +os.chdir(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, os.path.abspath(PYTHON_STEM)) + +# Break import-style to ensure we can actually find our in-repo dependencies. +import _parallel_compile_patch +import _spawn_patch +import grpc_core_dependencies +import python_version + +import commands +import grpc_version + +_parallel_compile_patch.monkeypatch_compile_maybe() +_spawn_patch.monkeypatch_spawn() + + +LICENSE = "Apache License 2.0" + +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) + + +def _env_bool_value(env_name, default): + """Parses a bool option from an environment variable""" + return os.environ.get(env_name, default).upper() not in ["FALSE", "0", ""] + + +BUILD_WITH_BORING_SSL_ASM = _env_bool_value( + "GRPC_BUILD_WITH_BORING_SSL_ASM", "True" +) + +# Export this environment variable to override the platform variant that will +# be chosen for boringssl assembly optimizations. This option is useful when +# crosscompiling and the host platform as obtained by sysconfig.get_platform() +# doesn't match the platform we are targetting. +# Example value: "linux-aarch64" +BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = os.environ.get( + "GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM", "" +) + +# Environment variable to determine whether or not the Cython extension should +# *use* Cython or use the generated C files. Note that this requires the C files +# to have been generated by building first *with* Cython support. Even if this +# is set to false, if the script detects that the generated `.c` file isn't +# present, then it will still attempt to use Cython. +BUILD_WITH_CYTHON = _env_bool_value("GRPC_PYTHON_BUILD_WITH_CYTHON", "False") + +# Export this variable to use the system installation of openssl. You need to +# have the header files installed (in /usr/include/openssl) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_OPENSSL = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL", "False" +) + +# Export this variable to use the system installation of zlib. You need to +# have the header files installed (in /usr/include/) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_ZLIB = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_ZLIB", "False" +) + +# Export this variable to use the system installation of cares. You need to +# have the header files installed (in /usr/include/) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_CARES = _env_bool_value( + "GRPC_PYTHON_BUILD_SYSTEM_CARES", "False" +) + +# Export this variable to use the system installation of re2. You need to +# have the header files installed (in /usr/include/re2) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_RE2 = _env_bool_value("GRPC_PYTHON_BUILD_SYSTEM_RE2", "False") + +# Export this variable to use the system installation of abseil. You need to +# have the header files installed (in /usr/include/absl) and during +# runtime, the shared library must be installed +BUILD_WITH_SYSTEM_ABSL = os.environ.get("GRPC_PYTHON_BUILD_SYSTEM_ABSL", False) + +# Export this variable to force building the python extension with a statically linked libstdc++. +# At least on linux, this is normally not needed as we can build manylinux-compatible wheels on linux just fine +# without statically linking libstdc++ (which leads to a slight increase in the wheel size). +# This option is useful when crosscompiling wheels for aarch64 where +# it's difficult to ensure that the crosscompilation toolchain has a high-enough version +# of GCC (we require >=5.1) but still uses old-enough libstdc++ symbols. +# TODO(jtattermusch): remove this workaround once issues with crosscompiler version are resolved. +BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value( + "GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX", "False" +) + +# For local development use only: This skips building gRPC Core and its +# dependencies, including protobuf and boringssl. This allows "incremental" +# compilation by first building gRPC Core using make, then building only the +# Python/Cython layers here. +# +# Note that this requires libboringssl.a in the libs/{dbg,opt}/ directory, which +# may require configuring make to not use the system openssl implementation: +# +# make HAS_SYSTEM_OPENSSL_ALPN=0 +# +# TODO(ericgribkoff) Respect the BUILD_WITH_SYSTEM_* flags alongside this option +USE_PREBUILT_GRPC_CORE = _env_bool_value( + "GRPC_PYTHON_USE_PREBUILT_GRPC_CORE", "False" +) + +# Environment variable to determine whether or not to enable coverage analysis +# in Cython modules. +ENABLE_CYTHON_TRACING = _env_bool_value( + "GRPC_PYTHON_ENABLE_CYTHON_TRACING", "False" +) + +# Environment variable specifying whether or not there's interest in setting up +# documentation building. +ENABLE_DOCUMENTATION_BUILD = _env_bool_value( + "GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD", "False" +) + + +def check_linker_need_libatomic(): + """Test if linker on system needs libatomic.""" + code_test = ( + b"#include \n" + + b"int main() { return std::atomic{}; }" + ) + cxx = shlex.split(os.environ.get("CXX", "c++")) + cpp_test = subprocess.Popen( + cxx + ["-x", "c++", "-std=c++14", "-"], + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, + ) + cpp_test.communicate(input=code_test) + if cpp_test.returncode == 0: + return False + # Double-check to see if -latomic actually can solve the problem. + # https://github.com/grpc/grpc/issues/22491 + cpp_test = subprocess.Popen( + cxx + ["-x", "c++", "-std=c++14", "-", "-latomic"], + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, + ) + cpp_test.communicate(input=code_test) + return cpp_test.returncode == 0 + + +# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are +# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. +# We use these environment variables to thus get around that without locking +# ourselves in w.r.t. the multitude of operating systems this ought to build on. +# We can also use these variables as a way to inject environment-specific +# compiler/linker flags. We assume GCC-like compilers and/or MinGW as a +# reasonable default. +EXTRA_ENV_COMPILE_ARGS = os.environ.get("GRPC_PYTHON_CFLAGS", None) +EXTRA_ENV_LINK_ARGS = os.environ.get("GRPC_PYTHON_LDFLAGS", None) +if EXTRA_ENV_COMPILE_ARGS is None: + EXTRA_ENV_COMPILE_ARGS = "" + if "win32" in sys.platform: + # MSVC by defaults uses C++14 so C11 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " /std:c11" + # We need to statically link the C++ Runtime, only the C runtime is + # available dynamically + EXTRA_ENV_COMPILE_ARGS += " /MT" + elif "linux" in sys.platform: + # GCC by defaults uses C17 so only C++14 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " -std=c++14" + EXTRA_ENV_COMPILE_ARGS += ( + " -fvisibility=hidden -fno-wrapv -fno-exceptions" + ) + elif "darwin" in sys.platform: + # AppleClang by defaults uses C17 so only C++14 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " -std=c++14" + EXTRA_ENV_COMPILE_ARGS += ( + " -stdlib=libc++ -fvisibility=hidden -fno-wrapv -fno-exceptions" + " -DHAVE_UNISTD_H" + ) + +if EXTRA_ENV_LINK_ARGS is None: + EXTRA_ENV_LINK_ARGS = "" + if "linux" in sys.platform or "darwin" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -lpthread" + if check_linker_need_libatomic(): + EXTRA_ENV_LINK_ARGS += " -latomic" + if "linux" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -static-libgcc" + +# Explicitly link Core Foundation framework for MacOS to ensure no symbol is +# missing when compiled using package managers like Conda. +if "darwin" in sys.platform: + EXTRA_ENV_LINK_ARGS += " -framework CoreFoundation" + +EXTRA_COMPILE_ARGS = shlex.split(EXTRA_ENV_COMPILE_ARGS) +EXTRA_LINK_ARGS = shlex.split(EXTRA_ENV_LINK_ARGS) + +if BUILD_WITH_STATIC_LIBSTDCXX: + EXTRA_LINK_ARGS.append("-static-libstdc++") + +CYTHON_EXTENSION_PACKAGE_NAMES = () + +CYTHON_EXTENSION_MODULE_NAMES = ("grpc._cython.cygrpc",) + +CYTHON_HELPER_C_FILES = () + +CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES) +if "win32" in sys.platform: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + +if BUILD_WITH_SYSTEM_OPENSSL: + CORE_C_FILES = filter( + lambda x: "third_party/boringssl" not in x, CORE_C_FILES + ) + CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES) + SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),) + +if BUILD_WITH_SYSTEM_ZLIB: + CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES) + ZLIB_INCLUDE = (os.path.join("/usr", "include"),) + +if BUILD_WITH_SYSTEM_CARES: + CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES) + CARES_INCLUDE = (os.path.join("/usr", "include"),) + +if BUILD_WITH_SYSTEM_RE2: + CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES) + RE2_INCLUDE = (os.path.join("/usr", "include", "re2"),) + +if BUILD_WITH_SYSTEM_ABSL: + CORE_C_FILES = filter( + lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES + ) + ABSL_INCLUDE = (os.path.join("/usr", "include"),) + +EXTENSION_INCLUDE_DIRECTORIES = ( + (PYTHON_STEM,) + + CORE_INCLUDE + + ABSL_INCLUDE + + ADDRESS_SORTING_INCLUDE + + CARES_INCLUDE + + RE2_INCLUDE + + SSL_INCLUDE + + UPB_INCLUDE + + UPB_GRPC_GENERATED_INCLUDE + + UPBDEFS_GRPC_GENERATED_INCLUDE + + UTF8_RANGE_INCLUDE + + XXHASH_INCLUDE + + ZLIB_INCLUDE +) + +EXTENSION_LIBRARIES = () +if "linux" in sys.platform: + EXTENSION_LIBRARIES += ("rt",) +if not "win32" in sys.platform: + EXTENSION_LIBRARIES += ("m",) +if "win32" in sys.platform: + EXTENSION_LIBRARIES += ( + "advapi32", + "bcrypt", + "dbghelp", + "ws2_32", + ) +if BUILD_WITH_SYSTEM_OPENSSL: + EXTENSION_LIBRARIES += ( + "ssl", + "crypto", + ) +if BUILD_WITH_SYSTEM_ZLIB: + EXTENSION_LIBRARIES += ("z",) +if BUILD_WITH_SYSTEM_CARES: + EXTENSION_LIBRARIES += ("cares",) +if BUILD_WITH_SYSTEM_RE2: + EXTENSION_LIBRARIES += ("re2",) +if BUILD_WITH_SYSTEM_ABSL: + EXTENSION_LIBRARIES += tuple( + lib.stem[3:] + for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so")) + ) + +DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) +asm_files = [] + + +# Quotes on Windows build macros are evaluated differently from other platforms, +# so we must apply quotes asymmetrically in order to yield the proper result in +# the binary. +def _quote_build_define(argument): + if "win32" in sys.platform: + return '"\\"{}\\""'.format(argument) + return '"{}"'.format(argument) + + +DEFINE_MACROS += ( + ("GRPC_XDS_USER_AGENT_NAME_SUFFIX", _quote_build_define("Python")), + ( + "GRPC_XDS_USER_AGENT_VERSION_SUFFIX", + _quote_build_define(_metadata.__version__), + ), +) + +asm_key = "" +if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: + boringssl_asm_platform = ( + BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM + if BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM + else sysconfig.get_platform() + ) + if "i686" in boringssl_asm_platform: + print("Enabling SSE2 on %s platform" % boringssl_asm_platform) + EXTRA_COMPILE_ARGS.append("-msse2") + else: + print("SSE2 not enabled on %s platform" % boringssl_asm_platform) + # BoringSSL's gas-compatible assembly files are all internally conditioned + # by the preprocessor. Provided the platform has a gas-compatible assembler + # (i.e. not Windows), we can include the assembly files and let BoringSSL + # decide which ones should and shouldn't be used for the build. + if not boringssl_asm_platform.startswith("win"): + asm_key = "crypto_asm" + else: + print( + "ASM Builds for BoringSSL currently not supported on:", + boringssl_asm_platform, + ) +if asm_key: + asm_files = grpc_core_dependencies.ASM_SOURCE_FILES[asm_key] +else: + DEFINE_MACROS += (("OPENSSL_NO_ASM", 1),) + +if "win32" in sys.platform: + # TODO(zyc): Re-enable c-ares on x64 and x86 windows after fixing the + # ares_library_init compilation issue + DEFINE_MACROS += ( + ("WIN32_LEAN_AND_MEAN", 1), + ("CARES_STATICLIB", 1), + ("GRPC_ARES", 0), + ("NTDDI_VERSION", 0x06000000), + ("NOMINMAX", 1), + ) + if "64bit" in platform.architecture()[0]: + DEFINE_MACROS += (("MS_WIN64", 1),) + elif sys.version_info >= (3, 5): + # For some reason, this is needed to get access to inet_pton/inet_ntop + # on msvc, but only for 32 bits + DEFINE_MACROS += (("NTDDI_VERSION", 0x06000000),) +else: + DEFINE_MACROS += ( + ("HAVE_CONFIG_H", 1), + ("GRPC_ENABLE_FORK_SUPPORT", 1), + ) + +# Fix for multiprocessing support on Apple devices. +# TODO(vigneshbabu): Remove this once the poll poller gets fork support. +DEFINE_MACROS += (("GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER", 1),) + +# Fix for Cython build issue in aarch64. +# It's required to define this macro before include . +# was included in core/telemetry/call_tracer.h. +# This macro should already be defined in grpc/grpc.h through port_platform.h, +# but we're still having issue in aarch64, so we manually define the macro here. +# TODO(xuanwn): Figure out what's going on in the aarch64 build so we can support +# gcc + Bazel. +DEFINE_MACROS += (("__STDC_FORMAT_MACROS", None),) + +LDFLAGS = tuple(EXTRA_LINK_ARGS) +CFLAGS = tuple(EXTRA_COMPILE_ARGS) +if "linux" in sys.platform or "darwin" in sys.platform: + pymodinit_type = "PyObject*" if PY3 else "void" + pymodinit = 'extern "C" __attribute__((visibility ("default"))) {}'.format( + pymodinit_type + ) + DEFINE_MACROS += (("PyMODINIT_FUNC", pymodinit),) + DEFINE_MACROS += (("GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK", 1),) + + +def cython_extensions_and_necessity(): + cython_module_files = [ + os.path.join(PYTHON_STEM, name.replace(".", "/") + ".pyx") + for name in CYTHON_EXTENSION_MODULE_NAMES + ] + config = os.environ.get("CONFIG", "opt") + prefix = "libs/" + config + "/" + if USE_PREBUILT_GRPC_CORE: + extra_objects = [ + prefix + "libares.a", + prefix + "libboringssl.a", + prefix + "libgpr.a", + prefix + "libgrpc.a", + ] + core_c_files = [] + else: + core_c_files = list(CORE_C_FILES) + extra_objects = [] + extensions = [ + Extension( + name=module_name, + sources=( + [module_file] + + list(CYTHON_HELPER_C_FILES) + + core_c_files + + asm_files + ), + include_dirs=list(EXTENSION_INCLUDE_DIRECTORIES), + libraries=list(EXTENSION_LIBRARIES), + define_macros=list(DEFINE_MACROS), + extra_objects=extra_objects, + extra_compile_args=list(CFLAGS), + extra_link_args=list(LDFLAGS), + ) + for (module_name, module_file) in zip( + list(CYTHON_EXTENSION_MODULE_NAMES), cython_module_files + ) + ] + need_cython = BUILD_WITH_CYTHON + if not BUILD_WITH_CYTHON: + need_cython = ( + need_cython + or not commands.check_and_update_cythonization(extensions) + ) + # TODO: the strategy for conditional compiling and exposing the aio Cython + # dependencies will be revisited by https://github.com/grpc/grpc/issues/19728 + return ( + commands.try_cythonize( + extensions, + linetracing=ENABLE_CYTHON_TRACING, + mandatory=BUILD_WITH_CYTHON, + ), + need_cython, + ) + + +CYTHON_EXTENSION_MODULES, need_cython = cython_extensions_and_necessity() + +PACKAGE_DIRECTORIES = { + "": PYTHON_STEM, +} + +INSTALL_REQUIRES = () + +EXTRAS_REQUIRES = { + "protobuf": "grpcio-tools>={version}".format(version=grpc_version.VERSION), +} + +SETUP_REQUIRES = ( + INSTALL_REQUIRES + ("Sphinx~=1.8.1",) if ENABLE_DOCUMENTATION_BUILD else () +) + +try: + import Cython +except ImportError: + if BUILD_WITH_CYTHON: + sys.stderr.write( + "You requested a Cython build via GRPC_PYTHON_BUILD_WITH_CYTHON, " + "but do not have Cython installed. We won't stop you from using " + "other commands, but the extension files will fail to build.\n" + ) + elif need_cython: + sys.stderr.write( + "We could not find Cython. Setup may take 10-20 minutes.\n" + ) + SETUP_REQUIRES += ("cython>=3.0.0",) + +COMMAND_CLASS = { + "doc": commands.SphinxDocumentation, + "build_project_metadata": commands.BuildProjectMetadata, + "build_py": commands.BuildPy, + "build_ext": commands.BuildExt, + "gather": commands.Gather, + "clean": commands.Clean, +} + +# Ensure that package data is copied over before any commands have been run: +credentials_dir = os.path.join(PYTHON_STEM, "grpc", "_cython", "_credentials") +try: + os.mkdir(credentials_dir) +except OSError: + pass +shutil.copyfile( + os.path.join("etc", "roots.pem"), os.path.join(credentials_dir, "roots.pem") +) + +PACKAGE_DATA = { + # Binaries that may or may not be present in the final installation, but are + # mentioned here for completeness. + "grpc._cython": [ + "_credentials/roots.pem", + "_windows/grpc_c.32.python", + "_windows/grpc_c.64.python", + ], +} +PACKAGES = setuptools.find_packages(PYTHON_STEM) + +setuptools.setup( + name="grpcio", + version=grpc_version.VERSION, + description="HTTP/2-based RPC framework", + author="The gRPC Authors", + author_email="grpc-io@googlegroups.com", + url="https://grpc.io", + project_urls={ + "Source Code": "https://github.com/grpc/grpc", + "Bug Tracker": "https://github.com/grpc/grpc/issues", + "Documentation": "https://grpc.github.io/grpc/python", + }, + license=LICENSE, + classifiers=CLASSIFIERS, + long_description_content_type="text/x-rst", + long_description=open(README).read(), + ext_modules=CYTHON_EXTENSION_MODULES, + packages=list(PACKAGES), + package_dir=PACKAGE_DIRECTORIES, + package_data=PACKAGE_DATA, + python_requires=f">={python_version.MIN_PYTHON_VERSION}", + install_requires=INSTALL_REQUIRES, + extras_require=EXTRAS_REQUIRES, + setup_requires=SETUP_REQUIRES, + cmdclass=COMMAND_CLASS, +) \ No newline at end of file diff --git a/357_Synthcity/2023b_v0.2.11_new/python-igraph-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/python-igraph-2023b.eb new file mode 100644 index 00000000..3748963d --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/python-igraph-2023b.eb @@ -0,0 +1,50 @@ +easyblock = 'PythonBundle' + +name = 'python-igraph' +version = '0.11.8' + +homepage = 'https://igraph.org/python' +description = """Python interface to the igraph high performance graph library, primarily aimed at complex network + research and analysis.""" + +toolchain = {'name': 'foss', 'version': '2023b'} + +builddependencies = [ + ('pkgconf', '2.0.3'), + ('CMake', '3.27.6'), +] + +dependencies = [ + ('Python', '3.11.5'), + ('Python-bundle-PyPI', '2023.10'), + ('Clang', '17.0.6'), + ('libxml2', '2.11.5'), + ('zlib', '1.2.13'), + ('igraph', '0.10.12'), + ('cairo', '1.18.0'), +] + +use_pip = True + +exts_list = [ + ('texttable', '1.7.0', { + 'checksums': ['2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638'], + }), + ('cairocffi', '1.7.1', { + 'checksums': ['2e48ee864884ec4a3a34bfa8c9ab9999f688286eb714a15a43ec9d068c36557b'], + }), + ('igraph', version, { + 'modulename': 'igraph', + 'checksums': ['d7dc1404567ba3b0ea1bf8b5fa6e101617915c8ad11ea5a9f925a40bf4adad7d'], + }), +] + +# cairo must be available for proper plotting support +sanity_check_commands = [ + "python -c 'from igraph.drawing.cairo.utils import find_cairo; " + "cairo = find_cairo(); cairo.Context'", +] + +sanity_pip_check = True + +moduleclass = 'lib' diff --git a/357_Synthcity/2023b_v0.2.11_new/spaCy-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/spaCy-2023b.eb index 58defafa..1c56ff44 100644 --- a/357_Synthcity/2023b_v0.2.11_new/spaCy-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/spaCy-2023b.eb @@ -70,6 +70,9 @@ exts_list = [ 'source_tmpl': 'smart_open-%(version)s.tar.gz', 'checksums': ['d3672003b1dbc85e2013e4983b88eb9a5ccfd389b0d4e5015f39a9ee5620ec18'], }), + ('marisa_trie', '1.2.1', { + 'checksums': ['3a27c408e2aefc03e0f1d25b2ff2afb85aac3568f6fa2ae2a53b57a2e87ce29d'], + }), ('language_data', '1.2.0', { 'checksums': ['82a86050bbd677bfde87d97885b17566cfe75dad3ac4f5ce44b52c28f752e773'], }), @@ -92,6 +95,7 @@ sanity_pip_check = True moduleclass = 'data' +# language-data 1.2.0 requires marisa-trie, which is not installed. # E1: OK # -> use typer v 0.12.0 - there is no pdm dep # <- failed on build diff --git a/357_Synthcity/2023b_v0.2.11_new/synthcity-0.2.11-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/synthcity-0.2.11-2023b.eb index 1116bb70..2815a5e8 100644 --- a/357_Synthcity/2023b_v0.2.11_new/synthcity-0.2.11-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/synthcity-0.2.11-2023b.eb @@ -11,6 +11,52 @@ description = """A library for generating and evaluating synthetic tabular data. toolchain = {'name': 'foss', 'version': '2023b'} # DEPS in DEPS-0.2.11.txt + # ok py7zr 0.22.0 requires texttable, which is not installed. + # OK nflows 0.14 requires tensorboard, which is not installed. + # OK synthcity 0.2.11 requires tsai, which is not installed. + # ok pycox 0.3.0 requires torchtuples, which is not installed. + # ? synthcity 0.2.11 has requirement xgbse>=0.3.1, but you have xgbse 0.2.3. + # -> use xgbse 0.2.3 -> NO -> try 0.3.1 + # xgbse 0.3.1 has requirement joblib<2.0.0,>=1.4.2, but you have joblib 1.3.2. + # xgbse 0.3.1 has requirement numpy<2.0.0,>=1.26.4, but you have numpy 1.26.2. + # xgbse 0.3.1 has requirement pandas<3.0.0,>=2.2.0, but you have pandas 2.1.3. + # xgbse 0.3.1 has requirement scikit-learn<2.0.0,>=1.5.0, but you have scikit-learn 1.4.0. +# TEST_DEPS: + # OK setuptools - in py + # OK pytest - in pypi bundle + # ok pytest-cov + # OK? jupyter + # OK? notebook + # ok bandit + # ok black + # ok? black-nb + # ok darglint + # OK docutils<0.18 + # ok doc8 + # ok flake8 + # ok isort + # OK nbconvert - jupyter-server + # OK nbformat - jupyter-server + # ok pytest-benchmark + # OK? pytest-xdist[psutil] + # ok pytest-xprocess + # OK igraph - CREATED + # py # pytest 7.2.0 bug https://github.com/pytest-dev/pytest-xprocess/issues/110 + # ok pre-commit + # ok tabulate + # ok click + # OK coverage + # pre-commit 4.0.1 requires cfgv, which is not installed. + # pre-commit 4.0.1 requires identify, which is not installed. + # pre-commit 4.0.1 requires nodeenv, which is not installed. + # flake8 7.1.1 requires mccabe, which is not installed. + # flake8 7.1.1 requires pycodestyle, which is not installed. + # flake8 7.1.1 requires pyflakes, which is not installed. + # doc8 1.1.1 requires restructuredtext-lint, which is not installed. + # doc8 1.1.1 requires stevedore, which is not installed. + # bandit 1.7.9 requires stevedore, which is not installed. + # pytest-benchmark 5.1.0 requires py-cpuinfo, which is not installed. + # pytest-benchmark 5.1.0 has requirement pytest>=8.1, but you have pytest 7.4.3. builddependencies = [('poetry', '1.6.1')] dependencies = [ @@ -30,15 +76,19 @@ dependencies = [ ('h5py', '3.11.0'), ('Brotli-python', '1.1.0'), ('statsmodels', '0.14.1'), - ('imbalanced-learn', '0.12.3'), + ('imbalanced-learn', '0.12.4'), ('Optuna', '3.6.1'), ('MONAI', '1.4.0'), ('DECAF-synthetic-data', '0.1.6'), ('PyTorch-Lightning', '1.9.5'), - # # TESTS - # ('Jupyter-bundle', '20240522'), - # # ('python-igraph', '0.11.4'), - # ('coverage', '7.4.4'), + ('accelerate', '1.0.1'), + ('tsai', '0.3.9'), + ('tensorboard', '2.18.0'), + # TESTS + ('Jupyter-bundle', '20240522'), + ('black', '24.10.0'), + ('python-igraph', '0.11.8'), + ('coverage', '7.4.4'), # ('py-cpuinfo', '9.0.0'), # # ('pycodestyle', '2.11.1'), ] @@ -79,26 +129,133 @@ use_pip = True # " -e 's/pandas>=1.0.\*/pandas>=1.0.0/'" # " setup.py && " # ) +local_xgbse_preinstallopts = ( + "sed -i " + " -e 's/1.26.4/1.26.2/'" + " -e 's/1.5.0/1.4.0/'" + " -e 's/2.2.0/2.1.3/'" + " -e 's/1.4.2/1.3.2/'" + " pyproject.toml && " +) exts_list = [ - ('accelerate', '1.0.1'), + ('bandit', '1.7.9', { + 'checksums': ['7c395a436743018f7be0a4cbb0a4ea9b902b6d87264ddecf8cfdc73b4f78ff61'], + }), + ('darglint', '1.8.1', { + 'checksums': ['080d5106df149b199822e7ee7deb9c012b49891538f14a11be681044f0bb20da'], + }), + ('doc8', '1.1.1', { + 'checksums': ['d97a93e8f5a2efc4713a0804657dedad83745cca4cd1d88de9186f77f9776004'], + }), + ('flake8', '7.1.1', { + 'checksums': ['049d058491e228e03e67b390f311bbf88fce2dbaa8fa673e7aea87b7198b8d38'], + }), + ('isort', '5.13.2', { + 'checksums': ['48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109'], + }), + ('pytest-benchmark', '5.1.0', { + 'checksums': ['9ea661cdc292e8231f7cd4c10b0319e56a2118e2c09d9f50e1b3d150d2aca105'], + }), + ('pytest-xprocess', '1.0.2', { + 'modulename': 'xprocess', + 'checksums': ['15e270637586eabc56755ee5fcc81c48bdb46ba7ef7c0d5b1b64302d080cc60f'], + }), + ('pytest-cov', '5.0.0', { + 'checksums': ['5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857'], + }), + ('pre_commit', '4.0.1', { + 'checksums': ['80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2'], + }), ('arfpy', '0.1.1', { 'checksums': ['88170d5e72638b0dbfec28cfbdfee02e97bd6a06d5a636e960acd5d90d480707'], }), ('be_great', '0.0.8', { 'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl', - 'checksums': ['824f10482581f5211d3a435d8b14adcc6c21b38d952f00b6a792fc7c089788b1'], + 'checksums': ['68e515b388254ef930bca272b929156fb901873fcdbcfeef56d7ad3d78d4c2b0'], + }), + ('feather-format', '0.4.1', { + 'modulename': 'feather', + 'checksums': ['45f67e3745d394d4f160ca6d636bbfd4f8b68d01199dc1649b6e487d3e878903'], + }), + ('fflows', '0.0.3', { + 'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl', + 'checksums': ['18de7a7b98e3708ff2d5ae9f10fad625740230c4de6447906b7ca477667b78fb'], + }), + ('geomloss', '0.2.6', { + 'checksums': ['491c47085c5001b2cb6128ea541fd2d0a8808ae50e88a0798c7853c9d995faeb'], + }), + ('inflate64', '1.0.0', { + 'checksums': ['3278827b803cf006a1df251f3e13374c7d26db779e5a33329cc11789b804bc2d'], + }), + ('keopscore', '2.2.3', { + 'checksums': ['64d5dad1e8c806d7070cdc60e48fd5bbf006f2bf1afd39ad3fa5e9fb213517d2'], + }), + ('multivolumefile', '0.2.3', { + 'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl', + 'checksums': ['237f4353b60af1703087cf7725755a1f6fcaeeea48421e1896940cd1c920d678'], + }), + ('nflows', '0.14', { + 'checksums': ['6299844a62f9999fcdf2d95cb2d01c091a50136bd17826e303aba646b2d11b55'], + }), + ('opacus', '1.5.2', { + 'checksums': ['167b66a5f7d5313df396dda143f21d2303b82e554b6798b30675a04103afaeb6'], + }), + ('opt_einsum', '3.4.0', { + 'checksums': ['96ca72f1b886d148241348783498194c577fa30a8faac108586b14f1ba4473ac'], + }), + ('pgmpy', '0.1.26', { + 'checksums': ['de8096175a8417f6bbac4e6ddb4a253c824947697d7beed93266d6e4163d039e'], + }), + ('texttable', '1.7.0', { + 'checksums': ['2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638'], + }), + ('py7zr', '0.22.0', { + 'checksums': ['c6c7aea5913535184003b73938490f9a4d8418598e533f9ca991d3b8e45a139e'], + }), + ('pybcj', '1.0.2', { + 'modulename': 'bcj', + 'checksums': ['c7f5bef7f47723c53420e377bc64d2553843bee8bcac5f0ad076ab1524780018'], + }), + ('torchtuples', '0.2.2', { + 'checksums': ['e0c7fe69977eb594fd9e81015821bb62c849be94d378bd072bdcb08cd68fffc3'], + }), + ('pycox', '0.3.0', { + 'checksums': ['745859ecfa4097cf8e8aef06f08048a41b7b2254fcffb9fc9f8926b1f38b6b1b'], + }), + ('pycryptodomex', '3.21.0', { + 'modulename': 'Crypto', + 'checksums': ['222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c'], + }), + ('pykeops', '2.2.3', { + 'checksums': ['2e2cba1de5e05c35559957a14f41cb5165dc667cc51b3b2118d7e0027eb435a1'], + }), + ('pyppmd', '1.1.0', { + 'checksums': ['1d38ce2e4b7eb84b53bc8a52380b94f66ba6c39328b8800b30c2b5bf31693973'], + }), + ('pyzstd', '0.16.2', { + 'checksums': ['179c1a2ea1565abf09c5f2fd72f9ce7c54b2764cf7369e05c0bfd8f1f67f63d2'], + }), + ('xgbse', '0.3.1', { + 'preinstallopts': "sed -i -e 's/1.26.4/1.26.2/' -e 's/1.5.0/1.4.0/' -e 's/2.2.0/2.1.3/' -e 's/1.4.2/1.3.2/' pyproject.toml && ", + 'checksums': ['39f7a4a897e085fcfb5c926503a5155d77fd5c9d8d8a621fa4f1b0a49115c098'], }), (name, version, { - # 'preinstallopts': local_preinstallopts, 'source_urls': ['https://github.com/vanderschaarlab/synthcity/archive/'], 'sources': ['v%(version)s.tar.gz'], + # 'runtest': "cd tests && pytest -vsx", # 'testinstall': True, - # 'runtest': local_pretestopts + 'cd tests && pytest -vvvs -m "not slow" --durations=50', - 'checksums': ['122a8546cad35e3ac5c74cf81281252dec4dd3c7b1d7afe0f45ef785f89cc682'], + 'checksums': ['5926d2e869e1528e556fb794d5f7e914c635113f9cc58034612fa067cdbf84d4'], }), ] + # ('xgbse', '0.3.1', { + # # fix invalid syntax of xgbse/setup.py + # 'preinstallopts': "sed -i -e '45,49d' -e 's/pandas>=1.0.\*/pandas>=1.0.0/' setup.py && ", + # 'source_urls': ['https://github.com/loft-br/xgboost-survival-embeddings/archive/'], + # 'sources': ['v%(version)s.tar.gz'], + # 'checksums': ['5639893d35038c8bd8d0d38c7ed84f4663b20033a105be890ccd39b7ca527a9c'], + # }), # old exts_list = [ # ('networkx', '2.8.8', { # already in decaf # 'checksums': ['230d388117af870fce5647a3c52401fcf753e94720e6ea6b4197a5355648885e'], diff --git a/357_Synthcity/2023b_v0.2.11_new/tensorboard-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/tensorboard-2023b.eb index 3940b3c4..9eb80903 100644 --- a/357_Synthcity/2023b_v0.2.11_new/tensorboard-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/tensorboard-2023b.eb @@ -16,13 +16,13 @@ toolchain = {'name': 'gfbf', 'version': '2023b'} # DEPS: # ok absl-py >= 0.4 # OK grpcio >= 1.48.2 - # ok markdown >= 2.6.8 + # OK markdown >= 2.6.8 # OK numpy >= 1.12.0 # OK packaging # OK protobuf >= 3.19.6, != 4.24.0 # OK setuptools >= 41.0.0 # ok tensorboard-data-server >= 0.7.0, < 0.8.0 - # werkzeug >= 1.0.1 + # ok werkzeug >= 1.0.1 builddependencies = [ ('poetry', '1.6.1'), @@ -33,6 +33,7 @@ dependencies = [ ('SciPy-bundle', '2023.11'), ('protobuf-python', '4.25.3'), ('grpcio', '1.67.1'), + ('Markdown', '3.6'), ] use_pip = True @@ -44,49 +45,29 @@ exts_list = [ 'checksums': ['7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff'], }), ('cachetools', '5.5.0', { - 'checksums': ['086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2'], + 'checksums': ['2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a'], }), ('pyasn1_modules', '0.4.1', { - 'checksums': ['5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c'], + 'checksums': ['c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c'], }), ('rsa', '4.9', { 'checksums': ['e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21'], }), - ('google-auth', '2.35.0', { + ('google_auth', '2.35.0', { 'modulename': 'google.auth', - 'checksums': ['97327dbbf58cccb58fc5a1712bba403ae76668e64814eb30f7316f7e27126b81'], - }), - # ('oauthlib', '3.2.2', { - # 'checksums': ['9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918'], - # }), - # ('requests-oauthlib', '1.3.1', { - # 'checksums': ['75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a'], - # }), - # ('google-auth-oauthlib', '1.2.0', { - # 'checksums': ['292d2d3783349f2b0734a0a0207b1e1e322ac193c2c09d8f7c613fb7cc501ea8'], - # }), - ('Markdown', '3.7', { - 'checksums': ['e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8'], + 'checksums': ['f4c64ed4e01e8e8b646ef34c018f8bf3338df0c8e37d8b3bba40e7f574a3278a'], }), ('tensorboard_data_server', '0.7.2', { 'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl', 'checksums': ['7e0610d205889588983836ec05dc098e80f97b7e7bbff7e994ebb78f578d0ddb'], }), - # ('gviz-api', '1.10.0', { - # 'source_tmpl': 'gviz_api-%(version)s.tar.gz', - # 'checksums': ['846692dd8cc73224fc31b18e41589bd934e1cc05090c6576af4b4b26c2e71b90'], - # }), - # ('tensorboard-plugin-profile', '2.15.1', { - # 'source_tmpl': 'tensorboard_plugin_profile-%(version)s.tar.gz', - # 'checksums': ['84bb33e446eb4a9c0616f669fc6a42cdd40eadd9ae1d74bf756f4f0479993273'], - # }), ('Werkzeug', '3.1.0', { 'source_tmpl': '%(namelower)s-%(version)s.tar.gz', - 'checksums': ['e39b645a6ac92822588e7b39a692e7828724ceae0b0d702ef96701f90e70128d'], + 'checksums': ['6f2a0d38f25ba5a75c36c45b4ae350c7a23b57e3b974e9eb2d6851f2c648c00d'], }), (name, version, { 'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl', - 'checksums': ['9f2b4e7dad86667615c0e5cd072f1ea8403fc032a299f0072d6f74855775cc45'], + 'checksums': ['107ca4821745f73e2aefa02c50ff70a9b694f39f790b11e6f682f7d326745eab'], }), ] diff --git a/357_Synthcity/2023b_v0.2.11_new/torchvision-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/torchvision-2023b.eb index c05c9965..56bf2c7b 100644 --- a/357_Synthcity/2023b_v0.2.11_new/torchvision-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/torchvision-2023b.eb @@ -14,10 +14,10 @@ patches = [ '%(name)s-%(version)s_quantized_tol.patch' ] checksums = [ - {'v0.16.2.tar.gz': '8c1f2951e98d8ada6e5a468f179af4be9f56d2ebc3ab057af873da61669806d7'}, - {'torchvision-0.16.2_fix-build-with-FFmpeg6.patch': + {'v0.17.0.tar.gz': '55e395d5c7d9bf7658c82ac633cac2224aa168e1bfe8bb5b2b2a296c792a3500'}, + {'torchvision-0.17.0_fix-build-with-FFmpeg6.patch': '64404865a489c0348f79684419831ebd71ece7c7326a80184785578a368047b5'}, - {'torchvision-0.16.2_quantized_tol.patch': '991b959f7d5e0fd418a163fa3ad828a2b60a64d0ce894cf579847138b13b62af'}, + {'torchvision-0.17.0_quantized_tol.patch': '991b959f7d5e0fd418a163fa3ad828a2b60a64d0ce894cf579847138b13b62af'}, ] builddependencies = [ diff --git a/357_Synthcity/2023b_v0.2.11_new/tsai-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/tsai-2023b.eb index 43f90979..dc468f3d 100644 --- a/357_Synthcity/2023b_v0.2.11_new/tsai-2023b.eb +++ b/357_Synthcity/2023b_v0.2.11_new/tsai-2023b.eb @@ -14,10 +14,10 @@ toolchain = {'name': 'foss', 'version': '2023b'} dependencies = [ ('Python', '3.11.5'), ('fastai', '2.7.18'), - ('imbalanced-learn', '0.12.3'), - ('scikit-learn', '1.3.2'), + ('imbalanced-learn', '0.12.4'), + ('scikit-learn', '1.4.0'), ('PyTorch', '2.1.2'), - ('numba', '0.59.0'), + ('numba', '0.60.0'), ] sanity_pip_check = True diff --git a/357_Synthcity/2023b_v0.2.11_new/xgbse-2023b.eb b/357_Synthcity/2023b_v0.2.11_new/xgbse-2023b.eb new file mode 100644 index 00000000..8ea5d601 --- /dev/null +++ b/357_Synthcity/2023b_v0.2.11_new/xgbse-2023b.eb @@ -0,0 +1,58 @@ +# only test xgbse separatly - not used - in synthcity as extension +easyblock = 'PythonBundle' + +name = 'xgbse' +version = '0.3.1' + +homepage = 'https://github.com/loft-br/xgboost-survival-embeddings' +description = """Improving XGBoost survival analysis with embeddings and debiased estimators.""" + +toolchain = {'name': 'foss', 'version': '2023b'} + +# DEPS: + # OK xgboost = "^2.1.0" + # NO numpy = "^1.26.4" -> sed to 1.26.2 + # NO scikit-learn = "^1.5.0" -> sed to 1.4.0 + # NO pandas = "^2.2.0" -> sed to 2.1.3 + # NO joblib = "^1.4.2" -> sed to 1.3.2 + # OK lifelines = "^0.29.0" + +builddependencies = [('poetry', '1.6.1')] +dependencies = [ + ('Python', '3.11.5'), + ('Python-bundle-PyPI', '2023.10'), + ('SciPy-bundle', '2023.11'), + ('XGBoost', '2.1.1'), + ('scikit-learn', '1.4.0'), + ('lifelines', '0.29.0'), + # TESTS + ('coverage', '7.4.4'), +] + +sanity_pip_check = True +use_pip = True + +local_preinstallopts = ( + "sed -i " + " -e 's/1.26.4/1.26.2/'" + " -e 's/1.5.0/1.4.0/'" + " -e 's/2.2.0/2.1.3/'" + " -e 's/1.4.2/1.3.2/'" + " pyproject.toml && " +) + +exts_list = [ + ('pytest-cov', '5.0.0', { + 'checksums': ['5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857'], + }), + (name, version, { + 'preinstallopts': "sed -i -e 's/1.26.4/1.26.2/' -e 's/1.5.0/1.4.0/' -e 's/2.2.0/2.1.3/' -e 's/1.4.2/1.3.2/' pyproject.toml && ", + 'runtest': "pytest --cov-report term-missing --cov=xgbse tests/", + 'source_urls': ['https://github.com/loft-br/xgboost-survival-embeddings/archive/'], + 'sources': ['v%(version)s.tar.gz'], + 'testinstall': True, + 'checksums': ['5639893d35038c8bd8d0d38c7ed84f4663b20033a105be890ccd39b7ca527a9c'], + }), +] + +moduleclass = 'ai'