Skip to content

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Mar 28, 2025

@pablogsal
Copy link
Member Author

Does someone has a better name for this flags? I don't like that we have PY_STDMODULE_CFLAGS and PY_STDMODULE_CFLAGS

@pablogsal pablogsal force-pushed the configldflags branch 2 times, most recently from 0cc69ae to f936956 Compare March 28, 2025 15:07
@pablogsal
Copy link
Member Author

I live in the past. I need to move all of this to 3.14 🤦

@vstinner
Copy link
Member

You should add "needs backport to 3.13" label if you want to add this feature to Python 3.13.

@ned-deily
Copy link
Member

ned-deily commented Mar 28, 2025

A terminology question: builtin (or built-in) is used elsewhere to mean linked statically with the interpreter / python library, like here. The intent for this PR is to apply to all standard library extension modules, static and dynamically loaded, right? If so, we should find another word for the variables and descriptions.

@pablogsal
Copy link
Member Author

pablogsal commented Mar 28, 2025

A terminology question: builtin (or built-in) is used elsewhere to mean linked statically with the interpreter / python library, like here. The intent for this PR is to apply to all standard library extension modules, static and dynamically loaded, right? If so, we should find another word for the variables and descriptions.

Agreed. See #131847 (comment)

Any ideas of a better name?

@vstinner
Copy link
Member

Any ideas of a better name?

I suggest to reuse the "extra" term: PY_EXTRA_STDMODULE_CFLAGS and PY_EXTRA_STDMODULE_LDFLAGS.

@pablogsal pablogsal force-pushed the configldflags branch 2 times, most recently from 4c459a4 to 2f61043 Compare March 28, 2025 16:44
…lation of builtin extension modules

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
@ned-deily
Copy link
Member

I think this PR warrants more discussion. See my comment on the issue.

@pablogsal
Copy link
Member Author

Ok I answered in the issue let's move the discussion there #131842 (comment)

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 6, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we use PY_STDMODULE_CFLAGS for shared extension modules and PY_BUILTIN_MODULE_CFLAGS for built-in extension modules. This PR is slightly confusing, since it adds extra {C,LD}FLAGS for built-in extension modules using naming similar to what we use for shared extension modules.

I think we should follow the existing naming scheme, and I also think we should consider introduce variables for both shared and built-in modules. Alternatively, we could use a more neutral name (for example PY_EXTRA_MODULE_*FLAGS) and apply those to both shared and built-in extension modules.


.. envvar:: PY_EXTRA_STDMODULE_LDFLAGS

Equivalent flag to :envvar:`LDLAGS_NODIST` but it only applies to **all** builtin extension
Copy link
Contributor

@erlend-aasland erlend-aasland Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Equivalent flag to :envvar:`LDLAGS_NODIST` but it only applies to **all** builtin extension
Equivalent flag to :envvar:`LDFLAGS_NODIST` but it only applies to **all** builtin extension

with :c:expr:`Py_NO_LINK_LIB`. (Contributed by Jean-Christophe
Fillion-Robin in :gh:`82909`.)

* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and
* Two new configure flags are added: :envvar:`PY_EXTRA_STDMODULE_CFLAGS` and

Fillion-Robin in :gh:`82909`.)

* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and
:envvar:`LDFLAGS_BUILTIN_MODULE`. These flags allows refistributors to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:envvar:`LDFLAGS_BUILTIN_MODULE`. These flags allows refistributors to
:envvar:`PY_EXTRA_STDMODULE_LDFLAGS`. These flags allows refistributors to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants