Skip to content

Conversation

tiran
Copy link
Contributor

@tiran tiran commented Dec 10, 2020

  • add setuptools_rust.__version__
  • populate setup.cfg's version field from setuptools_rust.__version__
  • require setuptools >= 46.1

Version 0.11.6.dev1 means that the current main branch is in
development phase of an upcoming 0.11.6 release.

Resolves: #91
Signed-off-by: Christian Heimes [email protected]

@tiran tiran marked this pull request as ready for review December 11, 2020 12:10
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

The purpose of setuptools_scm is to keep the release process simple without manually updated versions, so it'd be great if we can somehow leverage that functionality still.

See my other comment...

from .tomlgen import tomlgen_rust, find_rust_extensions
from .utils import Binding, Strip

__version__ = "0.11.6.dev1"
Copy link
Member

Choose a reason for hiding this comment

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

To make it easier to do releases, can we use setuptools_scm version hard-coding?

e.g. in pyproject.toml:

[tool.setuptools_scm]
write_to = "pkg/version.py"

and then refer to the generated file here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice trick! I was not aware of this feature. Please check out the update to my PR.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! I will test this quickly 👍

from .test import test_rust
from .tomlgen import tomlgen_rust, find_rust_extensions
from .utils import Binding, Strip
from .version import __version__
Copy link
Member

Choose a reason for hiding this comment

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

From testing I think this needs to be:

Suggested change
from .version import __version__
from .version import version as __version__

... does that match your experience too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I initially used a template with __version__. I removed the template and forgot to re-generate version.py before I pushed the change.

Copy link
Member

Choose a reason for hiding this comment

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

👍 yeah I considered adding a template but thought the default was nicer too.

- add `setuptools_rust.__version__`
- populate setup.cfg's version field from `setuptools_rust.__version__`
- require setuptools >= 46.1

Resolves: PyO3#91
Signed-off-by: Christian Heimes <[email protected]>
@davidhewitt
Copy link
Member

Many thanks! CI seemed to have an issue so I force-pushed to fix; hope that's okay.

@davidhewitt davidhewitt merged commit 3f6776a into PyO3:master Dec 12, 2020
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.

Please include version in setup.cfg
2 participants