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

feat: Add command line argument for gyp --version #164

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 26, 2022

Support will be difficult without this basic diagnostic capability.

DRY says we should not support the version number both in this file and setup.py

% gyp --version
v0.13.0

% gyp -V
v0.13.0

% gyp --help
usage: usage: gyp_main.py [options ...] [build_file ...]

options:
  -h, --help            show this help message and exit
  [ ... ]
  -V, --version         Show the version and exit.

@cclauss cclauss added the enhancement New feature or request label Aug 26, 2022

options, build_files_arg = parser.parse_args(args)
if options.version:
print("v0.13.0")
Copy link
Member

Choose a reason for hiding this comment

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

Can this be done reading https://github.com/nodejs/gyp-next/blob/main/setup.py ?
Currently auto release may not update this timely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The version number should not be stored in an executable file like setup.py but in a config file like pyproject.toml or setup.cfg. I will make that change...

@cclauss
Copy link
Contributor Author

cclauss commented Aug 28, 2022

Shrink setup.py by adding setup.cfg. https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

@targos
Copy link
Member

targos commented Aug 29, 2022

Make sure to merge with a commit message starting with feat:. Then we can check if release-please works with this new setup.
For Python they need:
image

@gengjiawen gengjiawen changed the title Add command line argument for gyp --version feat: Add command line argument for gyp --version Aug 30, 2022
@gengjiawen gengjiawen merged commit 5c9f4d0 into nodejs:main Aug 30, 2022
@cclauss cclauss deleted the gyp--version branch August 30, 2022 06:54
This was referenced Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants