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

Group meson commands in preparation for other build systems #52

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

stefanv
Copy link
Member

@stefanv stefanv commented Mar 2, 2023

This refactoring makes it easier to add commands for other build systems.
Backward compatibility is preserved for now so as to not break existing projects.

@stefanv stefanv force-pushed the group-meson-commands branch 3 times, most recently from 79bbcd6 to a8ecf8b Compare March 2, 2023 05:42
@stefanv stefanv force-pushed the group-meson-commands branch from a8ecf8b to ab20df7 Compare March 2, 2023 06:49
@stefanv stefanv merged commit 1ef2112 into scientific-python:main Mar 2, 2023
@jarrodmillman jarrodmillman added this to the 0.1 milestone Mar 10, 2023
@@ -45,12 +81,22 @@ On Unix-like systems, you can also copy the [`dev.py` script](https://github.com

## Built-in commands

### [Meson](https://meson-python.readthedocs.io)

Choose a reason for hiding this comment

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

https://mesonbuild.com/ should be the right link here.

devpy does not invoke meson-python through the devpy meson commands so this could be confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

The build backend is mesonpy, but the build engine is meson. My thought was that this is an easier place to start:

https://meson-python.readthedocs.io/en/latest/tutorials/introduction.html#tutorial-introduction

from . import meson

# Backward compatibility with older versions
build = meson.build

Choose a reason for hiding this comment

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

Can we issue a deprecation warning for people still using these directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, do you know of an easy way to implement that?

Copy link

@lithomas1 lithomas1 Mar 11, 2023

Choose a reason for hiding this comment

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

You can try a module-level __getattr__ (for python 3.7+), that raises the Deprecation/FutureWarning.

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.

3 participants