#260 closed enhancement (wontfix)

automatic freshening of version number

Reported by: zooko Owned by: zooko
Priority: major Milestone: eventually
Component: packaging Version: 0.7.0
Keywords: Cc:
Launchpad Bug:

Description

(split off from #257)

We could add the following to setup.py:

if 'darcsver' in not sys.argv: # to avoid recursion in case of weird sys.argv
    for arg in sys.argv:
        for start in ['bdist', 'build', 'sdist', 'install', 'develop']:
            if cmdname.startswith(start):
                (cin, cout, cerr,)= os.popen3("setup.py darcsver")
                print cout.read()

This would be similar to what we already did in setup.py back when "darcsver" was a separate script instead of a setuptools plugin, but it would be better, in that it would execute "darcsver" only in the case that the setup.py command being executed is one of those which wants a fresh version number. One problem with this is that "./setup.py darcsver" seems to take a long time -- 6 seconds for Brian. I don't know how much of that is darcs, how much is darcsver, and how much is setuptools plugin management. I'll investigate later.

Change History (2)

comment:1 Changed at 2008-01-23T02:45:44Z by zooko

  • Milestone changed from 0.7.1 to undecided

comment:2 Changed at 2008-05-30T03:12:28Z by zooko

  • Resolution set to wontfix
  • Status changed from new to closed

I did some quick profiling and this takes a couple of seconds on my machines, all of which is spent by darcs examining its files and printing out a complete list of changes (so that darcsver can count them.

For now I'm closing this as wontfix -- you'll have to explicitly invoke ./setup.py darcsver --count-all-patches or equivalently make version whenever you want to freshen the version number. In future modifications of darcsver I intend to make it faster and then I'll revisit this issue in my mind.

Note: See TracTickets for help on using tickets.