Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow empty name_suffix #11001

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

allow empty name_suffix #11001

wants to merge 1 commit into from

Conversation

X547
Copy link
Contributor

@X547 X547 commented Nov 4, 2022

It is required for plugins and kernel modules that are looked up by file name and require to specify exact file name. Some plugin systems do not use any prefix or suffix.

@X547 X547 requested a review from jpakkane as a code owner November 4, 2022 22:57
@X547
Copy link
Contributor Author

X547 commented Nov 5, 2022

Dot is still present at end of file name if suffix is empty. More work needed.

@eli-schwartz
Copy link
Member

Wouldn't the correct file extension for kernel modules actually be name_suffix: 'ko', though?

@X547
Copy link
Contributor Author

X547 commented Nov 6, 2022

Wouldn't the correct file extension for kernel modules actually be name_suffix: 'ko', though?

This is true for Linux, but not necessary for another operating systems. For example in Haiku kernel modules have no any prefix or suffix and module file name is used to find requested module. Haiku also do not use any prefix or suffix for various system extension plugins (add-ons) and userspace drivers.

It is required for plugins and kernel modules that are looked up by
file name and require to specify exact file name. Some plugin systems
do not use any prefix or suffix.
@@ -1818,25 +1816,27 @@ def post_init(self) -> None:
if not hasattr(self, 'suffix'):
# Executable for Windows or C#/Mono
if machine.is_windows() or machine.is_cygwin() or 'cs' in self.compilers:
self.suffix = 'exe'
self.suffix = '.exe'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be best not to change this. Instead where the suffix is concatenated to the file name, conditionally add a dot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants