Skip to content

In "out-of-tree" build regen-all generates different paths #125084

@cmaloney

Description

@cmaloney

Feature or enhancement

Proposal:

In a "out-of-tree" build regen-all generates different paths

I build CPython with my build directory outside of the cpython checkout:

dev_dir/
    build/
    cpython/ <- cpython repo clone

and then from inside build/ I run ../cpython/configure && make

If I do a make regen-all, it generates paths which include the ../ into the
generated code comments

ex:

diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index a0d3072d2cd..fa43d118818 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -1,6 +1,6 @@
-// This file is generated by Tools/cases_generator/opcode_metadata_generator.py
+// This file is generated by /<dev_dir>/projects/python/build/../cpython/Tools/cases_generator/opcode_metadata_generator.py
 // from:
-//   Python/bytecodes.c
+//   ../cpython/Python/bytecodes.c
 // Do not edit!
 
 #ifndef Py_CORE_OPCODE_METADATA_H

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions