On Tue, 2011-10-04 at 10:13 -0400, Chris Lalancette wrote:
On 10/03/11 - 04:44:16PM, James Laska wrote:
A pre-release is any release where %{release} starts with 0. When building RPMs of pre-releases, a datestamp and githash are included in the RPM %{release} string. This allows to easily determine when and what is included in the built packages.
oz.spec.in | 2 +- setup.py | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-)
I feel like we can be a bit more pythonic about this. I've taken your patch and modified it a bit; the result is attached. Please take a look and tell me what you think.
Much better! I debated removing the 'sed' in favor of a iterating through the file in python. I like you're approach better.
There is one bit about this I still don't like. Right now when I go to do a release, I only have to the VERSION field in setup.py, and things will work properly. By moving to this new scheme, I have to change VERSION in setup.py and Release in oz.spec.in. I think I might rather move the Release field into setup.py, and then at least I would only have a single file to change (even if I do have to change 2 fields).
Good thinking. Let's make life easier for you come release time. Perhaps just go with @VERSION@ and @RELEASE@%{?dist} in oz.spec.in? The following attached patch seems to handle that for me, feel free to adjust as needed.
Thanks, James