Skip to content

Commit 01ec268

Browse files
alexmalyshevfacebook-github-bot
authored andcommitted
Adjust CMake build for new 3.12/ directory layouts
Summary: Title says it all. Differential Revision: D78364964 fbshipit-source-id: 8ff6837cdcb5c0f19363fed9eba074173d423299
1 parent 57c3230 commit 01ec268

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ target_link_libraries(cached-properties PRIVATE common borrowed)
239239
set(INTERP_SOURCES ${PROJECT_SOURCE_DIR}/Interpreter/iter_helpers.c)
240240

241241
if (${PY_VERSION} EQUAL 3.12)
242-
set(SOURCE_CINDERX_OPCODE_TARGETS_H ${PROJECT_SOURCE_DIR}/Interpreter/cinderx_opcode_targets_312.h)
243-
set(SOURCE_CINDER_OPCODE_H ${PROJECT_SOURCE_DIR}/Interpreter/cinder_opcode_312.h)
244-
set(SOURCE_OPCODE_H ${PROJECT_SOURCE_DIR}/Interpreter/opcode_312.h)
242+
set(SOURCE_CINDERX_OPCODE_TARGETS_H ${PROJECT_SOURCE_DIR}/Interpreter/3.12/cinderx_opcode_targets.h)
243+
set(SOURCE_CINDER_OPCODE_H ${PROJECT_SOURCE_DIR}/Interpreter/3.12/cinder_opcode.h)
244+
set(SOURCE_OPCODE_H ${PROJECT_SOURCE_DIR}/Interpreter/3.12/opcode.h)
245245

246246
if (${META_PYTHON})
247-
set(INTERP_SOURCES ${INTERP_SOURCES} ${PROJECT_SOURCE_DIR}/Interpreter/interpreter-3.12.c)
247+
set(INTERP_SOURCES ${INTERP_SOURCES} ${PROJECT_SOURCE_DIR}/Interpreter/3.12/interpreter.c)
248248
endif()
249249
endif()
250250

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ class BuildPy(build_py):
4040
def run(self) -> None:
4141
super().run()
4242

43-
# Copy opcodes/opcode_312.py to cinderx/opcode.py.
43+
# Copy opcodes/3.12/opcode.py to cinderx/opcode.py.
4444
out_path = self.get_module_outfile(self.build_lib, ["cinderx"], "opcode")
45-
self.copy_file("PythonLib/opcodes/opcode_312.py", out_path, preserve_mode=False)
45+
self.copy_file(
46+
"PythonLib/opcodes/3.12/opcode.py", out_path, preserve_mode=False
47+
)
4648

4749

4850
class CMakeExtension(Extension):

0 commit comments

Comments
 (0)