Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
8db1d2d4
Commit
8db1d2d4
authored
Jan 02, 2017
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove documentation about tag-svn-revision. Ref #619.
parent
76e888d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
95 deletions
+7
-95
docs/setuptools.txt
docs/setuptools.txt
+7
-95
No files found.
docs/setuptools.txt
View file @
8db1d2d4
...
...
@@ -1414,10 +1414,6 @@ egg distributions by adding one or more of the following to the project's
manually-specified post-release tag, such as a build or revision number
(``--tag-build=STRING, -bSTRING``)
* A "last-modified revision number" string generated automatically from
Subversion's metadata (assuming your project is being built from a Subversion
"working copy") (``--tag-svn-revision, -r``)
* An 8-character representation of the build date (``--tag-date, -d``), as
a postrelease tag
...
...
@@ -1549,68 +1545,6 @@ this::
in order to check out the in-development version of ``projectname``.
Managing "Continuous Releases" Using Subversion
-----------------------------------------------
If you expect your users to track in-development versions of your project via
Subversion, there are a few additional steps you should take to ensure that
things work smoothly with EasyInstall. First, you should add the following
to your project's ``setup.cfg`` file:
.. code-block:: ini
[egg_info]
tag_build = .dev
tag_svn_revision = 1
This will tell ``setuptools`` to generate package version numbers like
``1.0a1.dev-r1263``, which will be considered to be an *older* release than
``1.0a1``. Thus, when you actually release ``1.0a1``, the entire egg
infrastructure (including ``setuptools``, ``pkg_resources`` and EasyInstall)
will know that ``1.0a1`` supersedes any interim snapshots from Subversion, and
handle upgrades accordingly.
(Note: the project version number you specify in ``setup.py`` should always be
the *next* version of your software, not the last released version.
Alternately, you can leave out the ``tag_build=.dev``, and always use the
*last* release as a version number, so that your post-1.0 builds are labelled
``1.0-r1263``, indicating a post-1.0 patchlevel. Most projects so far,
however, seem to prefer to think of their project as being a future version
still under development, rather than a past version being patched. It is of
course possible for a single project to have both situations, using
post-release numbering on release branches, and pre-release numbering on the
trunk. But you don't have to make things this complex if you don't want to.)
Commonly, projects releasing code from Subversion will include a PyPI link to
their checkout URL (as described in the previous section) with an
``#egg=projectname-dev`` suffix. This allows users to request EasyInstall
to download ``projectname==dev`` in order to get the latest in-development
code. Note that if your project depends on such in-progress code, you may wish
to specify your ``install_requires`` (or other requirements) to include
``==dev``, e.g.:
.. code-block:: python
install_requires=["OtherProject>=0.2a1.dev-r143,==dev"]
The above example says, "I really want at least this particular development
revision number, but feel free to follow and use an ``#egg=OtherProject-dev``
link if you find one". This avoids the need to have actual source or binary
distribution snapshots of in-development code available, just to be able to
depend on the latest and greatest a project has to offer.
A final note for Subversion development: if you are using SVN revision tags
as described in this section, it's a good idea to run ``setup.py develop``
after each Subversion checkin or update, because your project's version number
will be changing, and your script wrappers need to be updated accordingly.
Also, if the project's requirements have changed, the ``develop`` command will
take care of fetching the updated dependencies, building changed extensions,
etc. Be sure to also remind any of your users who check out your project
from Subversion that they need to run ``setup.py develop`` after every update
in order to keep their checkout completely in sync.
Making "Official" (Non-Snapshot) Releases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -1624,18 +1558,18 @@ tagging the release, so the trunk will still produce development snapshots.
Alternately, if you are not branching for releases, you can override the
default version options on the command line, using something like::
python setup.py egg_info -
R
Db "" sdist bdist_egg register upload
python setup.py egg_info -Db "" sdist bdist_egg register upload
The first part of this command (``egg_info -
R
Db ""``) will override the
The first part of this command (``egg_info -Db ""``) will override the
configured tag information, before creating source and binary eggs, registering
the project with PyPI, and uploading the files. Thus, these commands will use
the plain version from your ``setup.py``, without adding the
Subvers
ion
revision number or build designation
string.
the plain version from your ``setup.py``, without adding the
build designat
ion
string.
Of course, if you will be doing this a lot, you may wish to create a personal
alias for this operation, e.g.::
python setup.py alias -u release egg_info -
R
Db ""
python setup.py alias -u release egg_info -Db ""
You can then use it like this::
...
...
@@ -1695,8 +1629,7 @@ the command line supplies its expansion. For example, this command defines
a sitewide alias called "daily", that sets various ``egg_info`` tagging
options::
setup.py alias --global-config daily egg_info --tag-svn-revision \
--tag-build=development
setup.py alias --global-config daily egg_info --tag-build=development
Once the alias is defined, it can then be used with other setup commands,
e.g.::
...
...
@@ -1706,7 +1639,7 @@ e.g.::
setup.py daily sdist bdist_egg # generate both
The above commands are interpreted as if the word ``daily`` were replaced with
``egg_info --tag-
svn-revision --tag-
build=development``.
``egg_info --tag-build=development``.
Note that setuptools will expand each alias *at most once* in a given command
line. This serves two purposes. First, if you accidentally create an alias
...
...
@@ -1993,27 +1926,6 @@ added in the following order:
it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument
to the ``egg_info`` command.
``--tag-svn-revision, -r``
If the current directory is a Subversion checkout (i.e. has a ``.svn``
subdirectory, this appends a string of the form "-rNNNN" to the project's
version string, where NNNN is the revision number of the most recent
modification to the current directory, as obtained from the ``svn info``
command.
If the current directory is not a Subversion checkout, the command will
look for a ``PKG-INFO`` file instead, and try to find the revision number
from that, by looking for a "-rNNNN" string at the end of the version
number. (This is so that building a package from a source distribution of
a Subversion snapshot will produce a binary with the correct version
number.)
If there is no ``PKG-INFO`` file, or the version number contained therein
does not end with ``-r`` and a number, then ``-r0`` is used.
``--no-svn-revision, -R``
Don't include the Subversion revision in the version number. This option
is included so you can override a default setting put in ``setup.cfg``.
``--tag-date, -d``
Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the
project's version number.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment