From 6ff5adb852309b19577ba94ce424602c2897ad93 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Wed, 9 Aug 2023 12:43:32 -0700 Subject: [PATCH] move Cinder/module to CinderX/ Summary: I want to add a compilation unit under `Cinder/` for general Cinder infra that is not specifically part of the JIT, Static Python, or Strict Modules. But currently all Cinder compilation units have to be symlinked into the `Cinder/module` directory, since we have the dual build setup where we can either build the Cinder module standalone, or build Cinder features into the main runtime the way we've always done. And I don't want to introduce a cyclic symlink from `Cinder/module/Cinder -> Cinder/`. So instead move `Cinder/module/` out to a separate top-level `CinderX/` to avoid this cycle. The naming between "Cinder" and "CinderX" is a bit confusing here, but my intended logic is that "CinderX/" is specifically the extension module, whereas "Cinder/" is general Cinder code that can be built either as part of CinderX or into the runtime (though eventually only as part of CinderX, at which point the symlinks to `Cinder/`, `Jit/`, etc inside `CinderX` will become the sole real locations of those directories.) Reviewed By: alexmalyshev Differential Revision: D48019256 fbshipit-source-id: a65ab67c05c76d177b543fb8885a8b497b75d50f --- Cinder/module/Jit | 1 - Cinder/module/StaticPython | 1 - Cinder/module/StrictModules | 1 - Cinder/module/ThirdParty | 1 - CinderX/Jit | 1 + {Cinder/module => CinderX}/LICENSE | 0 {Cinder/module => CinderX}/README.md | 0 CinderX/StaticPython | 1 + CinderX/StrictModules | 1 + CinderX/ThirdParty | 1 + {Cinder/module => CinderX}/bootstrap.sh | 0 {Cinder/module => CinderX}/build.sh | 0 Cinder/module/cinder.cpp => CinderX/cinderx.cpp | 0 .../known-core-python-exported-symbols | 0 {Cinder/module => CinderX}/make-current-symbols.sh | 0 {Cinder/module => CinderX}/pip.pyz | Bin {Cinder/module => CinderX}/pyproject.toml | 0 {Cinder/module => CinderX}/setup.py | 4 ++-- .../setuptools-65.6.0-py3-none-any.whl | Bin Makefile.pre.in | 4 ++-- 20 files changed, 8 insertions(+), 8 deletions(-) delete mode 120000 Cinder/module/Jit delete mode 120000 Cinder/module/StaticPython delete mode 120000 Cinder/module/StrictModules delete mode 120000 Cinder/module/ThirdParty create mode 120000 CinderX/Jit rename {Cinder/module => CinderX}/LICENSE (100%) rename {Cinder/module => CinderX}/README.md (100%) create mode 120000 CinderX/StaticPython create mode 120000 CinderX/StrictModules create mode 120000 CinderX/ThirdParty rename {Cinder/module => CinderX}/bootstrap.sh (100%) rename {Cinder/module => CinderX}/build.sh (100%) rename Cinder/module/cinder.cpp => CinderX/cinderx.cpp (100%) rename {Cinder/module => CinderX}/known-core-python-exported-symbols (100%) rename {Cinder/module => CinderX}/make-current-symbols.sh (100%) rename {Cinder/module => CinderX}/pip.pyz (100%) rename {Cinder/module => CinderX}/pyproject.toml (100%) rename {Cinder/module => CinderX}/setup.py (98%) rename {Cinder/module => CinderX}/setuptools-65.6.0-py3-none-any.whl (100%) diff --git a/Cinder/module/Jit b/Cinder/module/Jit deleted file mode 120000 index 33bf53f2d38..00000000000 --- a/Cinder/module/Jit +++ /dev/null @@ -1 +0,0 @@ -../../Jit/ \ No newline at end of file diff --git a/Cinder/module/StaticPython b/Cinder/module/StaticPython deleted file mode 120000 index 99a8368fb3e..00000000000 --- a/Cinder/module/StaticPython +++ /dev/null @@ -1 +0,0 @@ -../../StaticPython \ No newline at end of file diff --git a/Cinder/module/StrictModules b/Cinder/module/StrictModules deleted file mode 120000 index b15f45e7113..00000000000 --- a/Cinder/module/StrictModules +++ /dev/null @@ -1 +0,0 @@ -../../StrictModules/ \ No newline at end of file diff --git a/Cinder/module/ThirdParty b/Cinder/module/ThirdParty deleted file mode 120000 index b794d21a741..00000000000 --- a/Cinder/module/ThirdParty +++ /dev/null @@ -1 +0,0 @@ -../../ThirdParty/ \ No newline at end of file diff --git a/CinderX/Jit b/CinderX/Jit new file mode 120000 index 00000000000..ee5df95ac41 --- /dev/null +++ b/CinderX/Jit @@ -0,0 +1 @@ +../Jit \ No newline at end of file diff --git a/Cinder/module/LICENSE b/CinderX/LICENSE similarity index 100% rename from Cinder/module/LICENSE rename to CinderX/LICENSE diff --git a/Cinder/module/README.md b/CinderX/README.md similarity index 100% rename from Cinder/module/README.md rename to CinderX/README.md diff --git a/CinderX/StaticPython b/CinderX/StaticPython new file mode 120000 index 00000000000..03d8ffc0e81 --- /dev/null +++ b/CinderX/StaticPython @@ -0,0 +1 @@ +../StaticPython \ No newline at end of file diff --git a/CinderX/StrictModules b/CinderX/StrictModules new file mode 120000 index 00000000000..b469dd1eb3a --- /dev/null +++ b/CinderX/StrictModules @@ -0,0 +1 @@ +../StrictModules \ No newline at end of file diff --git a/CinderX/ThirdParty b/CinderX/ThirdParty new file mode 120000 index 00000000000..f254dc747cb --- /dev/null +++ b/CinderX/ThirdParty @@ -0,0 +1 @@ +../ThirdParty \ No newline at end of file diff --git a/Cinder/module/bootstrap.sh b/CinderX/bootstrap.sh similarity index 100% rename from Cinder/module/bootstrap.sh rename to CinderX/bootstrap.sh diff --git a/Cinder/module/build.sh b/CinderX/build.sh similarity index 100% rename from Cinder/module/build.sh rename to CinderX/build.sh diff --git a/Cinder/module/cinder.cpp b/CinderX/cinderx.cpp similarity index 100% rename from Cinder/module/cinder.cpp rename to CinderX/cinderx.cpp diff --git a/Cinder/module/known-core-python-exported-symbols b/CinderX/known-core-python-exported-symbols similarity index 100% rename from Cinder/module/known-core-python-exported-symbols rename to CinderX/known-core-python-exported-symbols diff --git a/Cinder/module/make-current-symbols.sh b/CinderX/make-current-symbols.sh similarity index 100% rename from Cinder/module/make-current-symbols.sh rename to CinderX/make-current-symbols.sh diff --git a/Cinder/module/pip.pyz b/CinderX/pip.pyz similarity index 100% rename from Cinder/module/pip.pyz rename to CinderX/pip.pyz diff --git a/Cinder/module/pyproject.toml b/CinderX/pyproject.toml similarity index 100% rename from Cinder/module/pyproject.toml rename to CinderX/pyproject.toml diff --git a/Cinder/module/setup.py b/CinderX/setup.py similarity index 98% rename from Cinder/module/setup.py rename to CinderX/setup.py index 78daae99529..f233c88f3d7 100644 --- a/Cinder/module/setup.py +++ b/CinderX/setup.py @@ -14,8 +14,8 @@ MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) THIRD_PARTY_DIR = os.path.realpath(f"{MODULE_DIR}/ThirdParty") -CINDER_DIR = os.path.realpath(f"{MODULE_DIR}/..") -PYTHON_DIR = os.path.realpath(f"{MODULE_DIR}/../../") +PYTHON_DIR = os.path.realpath(f"{MODULE_DIR}/..") +CINDER_DIR = os.path.realpath(f"{PYTHON_DIR}/Cinder/") INCLUDE_DIRS = [ f"{CINDER_DIR}/Include", diff --git a/Cinder/module/setuptools-65.6.0-py3-none-any.whl b/CinderX/setuptools-65.6.0-py3-none-any.whl similarity index 100% rename from Cinder/module/setuptools-65.6.0-py3-none-any.whl rename to CinderX/setuptools-65.6.0-py3-none-any.whl diff --git a/Makefile.pre.in b/Makefile.pre.in index bce81a7a9aa..9bd99fbc60f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -328,7 +328,7 @@ ASAN_TEST_ENV_WITH_LSAN= @ASAN_TEST_ENV_WITH_LSAN@ ENABLE_CINDERX_SO=@ENABLE_CINDERX_SO@ ifeq ($(ENABLE_CINDERX_SO), yes) - CINDERX_SO=$(abs_srcdir)/Cinder/module/build/cinderx.$(SOABI).so + CINDERX_SO=$(abs_srcdir)/CinderX/build/cinderx.$(SOABI).so else CINDERX_SO= endif @@ -836,7 +836,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c .PHONY: $(CINDERX_SO) $(CINDERX_SO): - $(abs_srcdir)/Cinder/module/build.sh + $(abs_srcdir)/CinderX/build.sh # Build the interpreter $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) $(CINDERX_SO)