Re: [PATCH v6 4/5] add option for snapshot-id suffix to __version__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/13/2013 05:42 PM, Gene Czarcinski wrote:
> 1.  The added suffix is in the form YYYYMMDD and that is all.
> 
> 2.  Code is added to classes my_sdist and my_rpm to check and
> see is a snapshot id is requested (--snapshot) and, if
> requested, to append the id to the value of cliconfig.__version__
> 
> 3.  The added suffix only applies to the name of the sdist-tarball
> and the rpm spec file it includes ... the "internal" version
> remains unchanged.
> .
> Signed-off-by: Gene Czarcinski <gene@xxxxxxxxx>
> ---
>  setup.py             | 33 +++++++++++++++++++++++++++++----
>  virtcli/cliconfig.py |  2 ++
>  2 files changed, 31 insertions(+), 4 deletions(-)
> 
> diff --git a/setup.py b/setup.py
> index aa712c2..ace1c3e 100644
> --- a/setup.py
> +++ b/setup.py
> @@ -5,6 +5,7 @@ import fnmatch
>  import os
>  import sys
>  import unittest
> +from datetime import date
>  
>  from distutils.core import Command, setup
>  from distutils.command.sdist import sdist
> @@ -20,6 +21,10 @@ from DistUtilsExtra.command.build_icons import build_icons
>  
>  from virtcli import cliconfig
>  
> +sdist.user_options.insert(0, ("snapshot", None,
> +         "add snapshot id to version"))
> +sdist.boolean_options.insert(0, "snapshot")
> +

Why do it like this and not just add user_options to the my_sdist definition?
Look at the configure example that you edited in the previous patch.

Rest looks fine.

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux