blob: 0bee80ff50beaa4c25a5130f2a104d9981d8b549 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
Metadata-Version: 1.0
Name: darcsver
Version: 1.6.3
Summary: generate a version number from darcs history
Home-page: http://tahoe-lafs.org/trac/darcsver
Author: Zooko O'Whielacronx
Author-email: zooko@zooko.com
License: BSD
Description: darcsver - generate version numbers from darcs revision control history
=======================================================================
What Does It Do
---------------
Create files containing version numbers, based upon the latest darcs
release tag.
If your source tree is coming from darcs (i.e. it is in a darcs
repository), this tool will determine the most recent release tag,
count the patches that have been applied since then, and compute a
version number to be written into _version.py (and optionally other
version files). This version number will be available by doing:
from your_package_name import __version__
Source trees that do not come from darcs (e.g. release tarballs, nightly
tarballs) and are not within a darcs repository should instead, come with a
_version.py that was generated before the tarball was produced. In this case,
this tool will quietly exit without modifying the existing _version.py .
'release tags' are tags in the source repository that match the following
regexp:
^your_package_name-(\d+)(\.(\d+)(\.(\d+))?)?((a|b|c|rc)(\d+))?
Installation
------------
With easy_install:
easy_install darcsver
Alternative manual installation:
tar -zxvf darcsver-X.Y.Z.tar.gz
cd darcsver-X.Y.Z
python setup.py install
Where X.Y.Z is a version number.
Alternative to make a specific package use darcsver without installing
darcsver into the system:
Put "setup_requires=['darcsver']" in the call to setup() in the
package's setup.py file.
Usage
-----
There are two ways to use this: the command-line tool and the
setuptools plugin.
To use the command-line tool, execute it as:
darcsver $PACKAGE_NAME $PATH_TO_VERSION_PY
To use the setuptools plugin (which enables you to write "./setup.py
darcsver" and which cleverly figures out where the _version.py file
ought to go), you must first package your python module with
`setup.py` and use setuptools.
The former is well documented in the distutils manual:
http://docs.python.org/dist/dist.html
To use setuptools instead of distutils, just edit `setup.py` and
change
from distutils.core import setup
to
from setuptools import setup
References
----------
How to distribute Python modules with Distutils:
http://docs.python.org/dist/dist.html
Setuptools complete manual:
http://peak.telecommunity.com/DevCenter/setuptools
Thanks to Yannick Gingras for providing the prototype for this
README.txt.
Keywords: distutils setuptools plugin setup darcs
Platform: UNKNOWN
Classifier: Framework :: Setuptools Plugin
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: License :: DFSG approved
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.4
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries
|