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

Add version information macros. #722

Merged
merged 2 commits into from Jan 9, 2019
Merged

Add version information macros. #722

merged 2 commits into from Jan 9, 2019

Conversation

dlon
Copy link
Member

@dlon dlon commented Jan 7, 2019

Adds the following macros:

  • PG_MAJOR_VERSION
  • PG_MINOR_VERSION
  • PG_PATCH_VERSION
  • PG_VERSIONNUM(MAJOR, MINOR, PATCH) (1000*(MAJOR) + 100*(MINOR) + (PATCH))
  • PG_VERSION_ATLEAST(MAJOR, MINOR, PATCH)

Analogous macros exist in SDL.

setup.py makes sure the version info is consistent between the version module, setup script, and header.

@dlon
Copy link
Member Author

dlon commented Jan 7, 2019

If pygame 2.0 shouldn't contain the new features, we can use

#if PG_VERSION_ATLEAST(2, 1, 0)

@illume
Copy link
Member

illume commented Jan 9, 2019

Very nice.

@illume
Copy link
Member

illume commented Jan 9, 2019

Great. Your new version macro will come in handy if we have some experimental features we don't want people to rely on.

By the way... Not sure if I told you or just wrote in the Discord...

I started labeling the issues with milestone 2.1 for things which are new SDL2 additions, and left he 2 milestone for things that are compatibility issues. This way it's a bit easier for us to see when pygame 2 is ready. However, I think it's fine for us to include SDL2 features in pygame 2 if they are ready.

@illume illume merged commit f471cbb into master Jan 9, 2019
@illume illume deleted the version-macros branch January 9, 2019 05:16
@illume illume self-requested a review January 9, 2019 05:22
@dlon dlon mentioned this pull request Mar 23, 2019
4 tasks
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

2 participants