Changeset 19b2ef9 in trunk


Ignore:
Timestamp:
2013-03-19T23:07:22Z (12 years ago)
Author:
Brian Warner <warner@…>
Branches:
master
Children:
8b144fa1
Parents:
9e449db
git-author:
Brian Warner <warner@…> (2013-03-19 22:26:21)
git-committer:
Brian Warner <warner@…> (2013-03-19 23:07:22)
Message:

Remove darcs from setup.py, remove darcsver egg. Closes #1908.

Also remove lingering traces of darcs from MANIFEST.in,
.darcs-boringfile, setup.cfg, and unit tests.

Files:
14 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified MANIFEST.in

    r9e449db r19b2ef9  
    11include COPYING.GPL COPYING.TGPPL.rst CREDITS Makefile NEWS.rst Tahoe.home
    2 include relnotes.txt .darcs-boringfile
     2include relnotes.txt
    33include bin/tahoe-script.template
    44recursive-include src *.xhtml *.js *.png *.css
     
    77graft misc
    88graft static
    9 graft darcsver-1.7.2.egg
    109
    1110graft setuptools-0.6c16dev4.egg
  • TabularUnified setup.cfg

    r9e449db r19b2ef9  
    1515
    1616# https://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-deps.tar.gz contains a
    17 # bundle of these dependencies (as Python source distributions or "sdists"). So
    18 # it you want to avoid the build-time download (say, if you're on an airplane,
    19 # or a desert island), just grab a copy and unpack it in your tahoe darcs tree.
     17# bundle of these dependencies (as Python source distributions or "sdists").
     18# So it you want to avoid the build-time download (say, if you're on an
     19# airplane, or a desert island), just grab a copy and unpack it in your tahoe
     20# source tree.
    2021
    2122# Alternatively, if you're building from a release/nightly tarball instead of
    22 # a darcs tree, the 'sumo' tarball variant will include all of these
     23# a git tree, the 'sumo' tarball variant will include all of these
    2324# dependencies in the tahoe-deps/ directory.
    2425
  • TabularUnified setup.py

    r9e449db r19b2ef9  
    7272
    7373egg = os.path.realpath(glob.glob('setuptools-*.egg')[0])
    74 sys.path.insert(0, egg)
    75 egg = os.path.realpath(glob.glob('darcsver-*.egg')[0])
    7674sys.path.insert(0, egg)
    7775import setuptools; setuptools.bootstrap_install_from = egg
     
    121119setup_requires = []
    122120
    123 # The darcsver command from the darcsver plugin is needed to initialize the
    124 # distribution's .version attribute correctly. (It does this either by
    125 # examining darcs history, or if that fails by reading the
    126 # src/allmydata/_version.py file). darcsver will also write a new version
    127 # stamp in src/allmydata/_version.py, with a version number derived from
    128 # darcs history. Note that the setup.cfg file has an "[aliases]" section
    129 # which enumerates commands that you might run and specifies that it will run
    130 # darcsver before each one. If you add different commands (or if I forgot
    131 # some that are already in use), you may need to add it to setup.cfg and
    132 # configure it to run darcsver before your command, if you want the version
    133 # number to be correct when that command runs.
    134 # http://pypi.python.org/pypi/darcsver
    135 setup_requires.append('darcsver >= 1.7.2')
    136 
    137121# Nevow imports itself when building, which causes Twisted and zope.interface
    138122# to be imported. We need to make sure that the versions of Twisted and
     
    256240                raise
    257241
    258 
    259 DARCS_VERSION_BODY = '''
    260 # This _version.py is generated from darcs metadata by the tahoe setup.py
    261 # and the "darcsver" package.
    262 
    263 __pkgname__ = "%(pkgname)s"
    264 verstr = "%(pkgversion)s"
    265 __version__ = verstr
    266 '''
    267242
    268243GIT_VERSION_BODY = '''
     
    344319    return {"version": version, "normalized": normalized_version, "full": full}
    345320
     321# setup.cfg has an [aliases] section which runs "update_version" before many
     322# commands (like "build" and "sdist") that need to know our package version
     323# ahead of time. If you add different commands (or if we forgot some), you
     324# may need to add it to setup.cfg and configure it to run update_version
     325# before your command.
    346326
    347327class UpdateVersion(Command):
     
    354334        pass
    355335    def run(self):
    356         target = self.distribution.versionfiles[0]
    357         if os.path.isdir(os.path.join(basedir, "_darcs")):
    358             verstr = self.try_from_darcs(target)
    359         elif os.path.isdir(os.path.join(basedir, ".git")):
    360             verstr = self.try_from_git(target)
     336        if os.path.isdir(os.path.join(basedir, ".git")):
     337            verstr = self.try_from_git()
    361338        else:
    362339            print("no version-control data found, leaving _version.py alone")
     
    365342            self.distribution.metadata.version = verstr
    366343
    367     def try_from_darcs(self, target):
    368         from darcsver.darcsvermodule import update
    369         (rc, verstr) = update(pkgname=self.distribution.get_name(),
    370                               verfilename=self.distribution.versionfiles,
    371                               revision_number=True,
    372                               version_body=DARCS_VERSION_BODY)
    373         if rc == 0:
    374             return verstr
    375 
    376     def try_from_git(self, target):
     344    def try_from_git(self):
    377345        versions = versions_from_git("allmydata-tahoe-", verbose=True)
    378346        if versions:
    379             for fn in self.distribution.versionfiles:
    380                 f = open(fn, "wb")
    381                 f.write(GIT_VERSION_BODY %
    382                         { "pkgname": self.distribution.get_name(),
    383                           "version": versions["version"],
    384                           "normalized": versions["normalized"],
    385                           "full": versions["full"] })
    386                 f.close()
    387                 print("git-version: wrote '%s' into '%s'" % (versions["version"], fn))
     347            fn = 'src/allmydata/_version.py'
     348            f = open(fn, "wb")
     349            f.write(GIT_VERSION_BODY %
     350                    { "pkgname": self.distribution.get_name(),
     351                      "version": versions["version"],
     352                      "normalized": versions["normalized"],
     353                      "full": versions["full"] })
     354            f.close()
     355            print("git-version: wrote '%s' into '%s'" % (versions["version"], fn))
    388356        return versions.get("normalized", None)
    389357
     
    480448      entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
    481449      zip_safe=False, # We prefer unzipped for easier access.
    482       versionfiles=['src/allmydata/_version.py',],
    483450      **setup_args
    484451      )
  • TabularUnified src/allmydata/test/test_runner.py

    r9e449db r19b2ef9  
    155155            self.failIfEqual(required_verstr, "unknown",
    156156                             "We don't know our version, because this distribution didn't come "
    157                              "with a _version.py and 'setup.py darcsver' hasn't been run.")
     157                             "with a _version.py and 'setup.py update_version' hasn't been run.")
    158158
    159159            srcdir = os.path.dirname(os.path.dirname(os.path.normcase(os.path.realpath(srcfile))))
Note: See TracChangeset for help on using the changeset viewer.