From e9bed633455ce6e07a87a53157daa295a6e45ce0 Mon Sep 17 00:00:00 2001 From: zooko Date: Sun, 16 Jan 2011 23:17:25 +0530 Subject: [PATCH] setup: don't build-dep on darcsver unless 'darcsver' appears on sys.argv (thus neatly avoiding a bug in distribute) Ignore-this: 4315aad71297613be76823aca5260f1a darcs-hash:deacf6ad9fb7b06c9894a01ab2b4ca31045f0224 --- zfec/setup.cfg | 9 --------- zfec/setup.py | 27 ++++++++++----------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/zfec/setup.cfg b/zfec/setup.cfg index 3b0349f..620b349 100644 --- a/zfec/setup.cfg +++ b/zfec/setup.cfg @@ -5,12 +5,3 @@ # harder for people to get at the source code, and doesn't actually # provide any benefits that I am aware of. zip_ok=False - -[aliases] -build = darcsver --count-all-patches build -test = darcsver --count-all-patches trial -sdist = darcsver --count-all-patches sdist -install = darcsver --count-all-patches install -bdist_egg = darcsver --count-all-patches bdist_egg -trial = darcsver --count-all-patches trial -sdist_dsc = darcsver --count-all-patches sdist_dsc diff --git a/zfec/setup.py b/zfec/setup.py index ba5f45b..a9bd4d8 100755 --- a/zfec/setup.py +++ b/zfec/setup.py @@ -100,28 +100,21 @@ tests_require = [] tests_require.append("pyutil >= 1.3.19") -# The darcsver command from the darcsver plugin is needed to initialize the -# distribution's .version attribute correctly. (It does this either by -# examining darcs history, or if that fails by reading the -# zfec/_version.py file). darcsver will also write a new version -# stamp in zfec/_version.py, with a version number derived from -# darcs history. Note that the setup.cfg file has an "[aliases]" section -# which enumerates commands that you might run and specifies that it will run -# darcsver before each one. If you add different commands (or if I forgot -# some that are already in use), you may need to add it to setup.cfg and -# configure it to run darcsver before your command, if you want the version -# number to be correct when that command runs. -# http://pypi.python.org/pypi/darcsver -setup_requires.append('darcsver >= 1.2.0') +# darcsver is needed only if you want "./setup.py darcsver" to write a new +# version stamp in pyutil/_version.py, with a version number derived from +# darcs history. http://pypi.python.org/pypi/darcsver +if 'darcsver' in sys.argv[1:]: + setup_requires.append('darcsver >= 1.0.0') # setuptools_darcs is required to produce complete distributions (such # as with "sdist" or "bdist_egg"), unless there is a # zfec.egg-info/SOURCE.txt file present which contains a complete # list of files that should be included. -# http://pypi.python.org/pypi/setuptools_darcs However, requiring it -# runs afoul of a bug in Distribute, which was shipped in Ubuntu -# Lucid, so for now you have to manually install it before building -# sdists or eggs: +# http://pypi.python.org/pypi/setuptools_darcs + +# However, requiring it runs afoul of a bug in Distribute, which was +# shipped in Ubuntu Lucid, so for now you have to manually install it +# before building sdists or eggs: # http://bitbucket.org/tarek/distribute/issue/55/revision-control-plugin-automatically-installed-as-a-build-dependency-is-not-present-when-another-build-dependency-is-being if False: setup_requires.append('setuptools_darcs >= 1.1.0') -- 2.37.2