Skip to content

Commit 897ae17

Browse files
committed
Change "distribute" to "setuptools" in docs
Replace several out-dated references to Distribute with setuptools. Change-Id: I8ddd56f0364dee31fd684d3e324f61adf6f95941
1 parent 8fab59f commit 897ae17

File tree

3 files changed

+33
-59
lines changed

3 files changed

+33
-59
lines changed

docs/source/command_ref.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ activated after being initialized.
3333
$ workon
3434
$ mkvirtualenv mynewenv
3535
New python executable in mynewenv/bin/python
36-
Installing distribute.............................................
36+
Installing setuptools.............................................
3737
..................................................................
3838
..................................................................
3939
done.
@@ -79,7 +79,7 @@ A unique virtualenv name is generated.
7979
New python executable in 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/bin/python
8080
Overwriting 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/lib/python2.7/distutils/__init__.py
8181
with new content
82-
Installing distribute...............................................
82+
Installing setuptools...............................................
8383
....................................................................
8484
.................................................................done.
8585
This is a temporary environment. It will be deleted when deactivated.
@@ -180,7 +180,7 @@ Syntax::
180180
$ workon
181181
$ mkvirtualenv source
182182
New python executable in source/bin/python
183-
Installing distribute.............................................
183+
Installing setuptools.............................................
184184
..................................................................
185185
..................................................................
186186
done.
@@ -248,13 +248,13 @@ is printed to stdout.
248248
$ workon
249249
$ mkvirtualenv env1
250250
New python executable in env1/bin/python
251-
Installing distribute.............................................
251+
Installing setuptools.............................................
252252
..................................................................
253253
..................................................................
254254
done.
255255
(env1)$ mkvirtualenv env2
256256
New python executable in env2/bin/python
257-
Installing distribute.............................................
257+
Installing setuptools.............................................
258258
..................................................................
259259
..................................................................
260260
done.
@@ -301,7 +301,7 @@ Syntax::
301301

302302
$ mkvirtualenv env1
303303
New python executable in env1/bin/python
304-
Installing distribute.............................................
304+
Installing setuptools.............................................
305305
..................................................................
306306
..................................................................
307307
done.
@@ -342,7 +342,7 @@ subdirectory.
342342

343343
$ mkvirtualenv env1
344344
New python executable in env1/bin/python
345-
Installing distribute.............................................
345+
Installing setuptools.............................................
346346
..................................................................
347347
..................................................................
348348
done.
@@ -376,7 +376,7 @@ directory to change into.
376376

377377
$ mkvirtualenv env1
378378
New python executable in env1/bin/python
379-
Installing distribute.............................................
379+
Installing setuptools.............................................
380380
..................................................................
381381
..................................................................
382382
done.
@@ -400,13 +400,13 @@ Syntax::
400400

401401
$ mkvirtualenv env1
402402
New python executable in env1/bin/python
403-
Installing distribute.............................................
403+
Installing setuptools.............................................
404404
..................................................................
405405
..................................................................
406406
done.
407407
(env1)$ $ workon env1
408408
(env1)$ lssitepackages
409-
distribute-0.6.10-py2.6.egg pip-0.6.3-py2.6.egg
409+
setuptools-0.6.10-py2.6.egg pip-0.6.3-py2.6.egg
410410
easy-install.pth setuptools.pth
411411

412412
===============
@@ -462,7 +462,7 @@ output.
462462

463463
$ mkvirtualenv env1
464464
New python executable in env1/bin/python
465-
Installing distribute.............................................
465+
Installing setuptools.............................................
466466
..................................................................
467467
..................................................................
468468
done.
@@ -505,7 +505,7 @@ create a virtual environment with the same name as the project.
505505

506506
$ mkproject myproj
507507
New python executable in myproj/bin/python
508-
Installing distribute.............................................
508+
Installing setuptools.............................................
509509
..................................................................
510510
..................................................................
511511
done.
@@ -540,14 +540,14 @@ virtualenv and project directory. An association is made so that when
540540

541541
$ mkproject myproj
542542
New python executable in myproj/bin/python
543-
Installing distribute.............................................
543+
Installing setuptools.............................................
544544
..................................................................
545545
..................................................................
546546
done.
547547
Creating /Users/dhellmann/Devel/myproj
548548
(myproj)$ mkvirtualenv myproj_new_libs
549549
New python executable in myproj/bin/python
550-
Installing distribute.............................................
550+
Installing setuptools.............................................
551551
..................................................................
552552
..................................................................
553553
done.

docs/source/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ installed by pip.
5050
$ source /usr/local/bin/virtualenvwrapper.sh
5151
$ mkvirtualenv env1
5252
Installing
53-
distribute..........................................
53+
setuptools..........................................
5454
....................................................
5555
....................................................
5656
...............................done.
@@ -79,15 +79,15 @@ We can see the new package with ``lssitepackages``::
7979

8080
(env1)$ lssitepackages
8181
Django-1.1.1-py2.6.egg-info easy-install.pth
82-
distribute-0.6.10-py2.6.egg pip-0.6.3-py2.6.egg
82+
setuptools-0.6.10-py2.6.egg pip-0.6.3-py2.6.egg
8383
django setuptools.pth
8484

8585
Of course we are not limited to a single virtualenv::
8686

8787
(env1)$ ls $WORKON_HOME
8888
env1 hook.log
8989
(env1)$ mkvirtualenv env2
90-
Installing distribute...............................
90+
Installing setuptools...............................
9191
....................................................
9292
....................................................
9393
........... ...............................done.
@@ -124,7 +124,7 @@ created, letting you automatically install commonly-used tools.
124124
(env2)$ echo 'pip install sphinx' >> $WORKON_HOME/postmkvirtualenv
125125
(env3)$ mkvirtualenv env3
126126
New python executable in env3/bin/python
127-
Installing distribute...............................
127+
Installing setuptools...............................
128128
....................................................
129129
....................................................
130130
........... ...............................done.

docs/source/plugins.rst

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are two ways to attach your code so that virtualenvwrapper will
1616
run it: End-users can use shell scripts or other programs for personal
1717
customization, e.g. automatically performing an action on every new
1818
virtualenv (see :ref:`scripts`). Extensions can also be
19-
implemented in Python by using Distribute_ *entry points*, making it
19+
implemented in Python by using `Setuptools entry points`_, making it
2020
possible to share common behaviors between systems and developers.
2121

2222
Use the hooks provided to eliminate repetitive manual operations and
@@ -162,48 +162,22 @@ Registering Entry Points
162162

163163
The functions defined in the plugin need to be registered as *entry
164164
points* in order for virtualenvwrapper's hook loader to find them.
165-
Distribute_ entry points are configured in the ``setup.py`` for your
166-
package by mapping the entry point name to the function in the package
167-
that implements it.
165+
Entry points are configured in the ``setup.py`` (or ``setup.cfg`` when
166+
using pbr) for your package by mapping the entry point name to the
167+
function in the package that implements it.
168168

169-
This partial copy of virtualenvwrapper's ``setup.py`` illustrates how
169+
This partial copy of virtualenvwrapper's ``setup.cfg`` illustrates how
170170
the ``initialize()`` and ``initialize_source()`` entry points are
171171
configured.
172172

173-
::
174-
175-
# Bootstrap installation of Distribute
176-
import distribute_setup
177-
distribute_setup.use_setuptools()
178-
179-
from setuptools import setup
180-
181-
setup(
182-
name = 'virtualenvwrapper',
183-
version = '2.0',
184-
185-
description = 'Enhancements to virtualenv',
186-
187-
# ... details omitted ...
188-
189-
namespace_packages = [ 'virtualenvwrapper' ],
190-
191-
entry_points = {
192-
'virtualenvwrapper.initialize': [
193-
'user_scripts = virtualenvwrapper.user_scripts:initialize',
194-
],
195-
'virtualenvwrapper.initialize_source': [
196-
'user_scripts = virtualenvwrapper.user_scripts:initialize_source',
197-
],
198-
199-
# ... details omitted ...
200-
},
201-
)
173+
.. include:: ../../setup.cfg
174+
:literal:
175+
:start-after: [entry_points]
202176

203-
The ``entry_points`` argument to ``setup()`` is a dictionary mapping
204-
the entry point *group names* to lists of entry point specifiers. A
205-
different group name is defined by virtualenvwrapper for each
206-
extension point (see :ref:`plugins-extension-points`).
177+
The ``entry_points`` section maps the *group names* to lists of entry
178+
point specifiers. A different group name is defined by
179+
virtualenvwrapper for each extension point (see
180+
:ref:`plugins-extension-points`).
207181

208182
The entry point specifiers are strings with the syntax ``name =
209183
package.module:function``. By convention, the *name* of each entry
@@ -212,8 +186,8 @@ used).
212186

213187
.. seealso::
214188

215-
* `namespace packages <http://packages.python.org/distribute/setuptools.html#namespace-packages>`__
216-
* `Extensible Applications and Frameworks <http://packages.python.org/distribute/setuptools.html#extensible-applications-and-frameworks>`__
189+
* `namespace packages <http://pythonhosted.org//setuptools/setuptools.html#namespace-packages>`__
190+
* `Extensible Applications and Frameworks <http://pythonhosted.org/setuptools/setuptools.html#extensible-applications-and-frameworks>`__
217191

218192
The Hook Loader
219193
---------------
@@ -420,6 +394,6 @@ and::
420394

421395
respectively.
422396

423-
.. _Distribute: http://packages.python.org/distribute/
397+
.. _Setuptools entry points: http://pythonhosted.org//setuptools/pkg_resources.html#entry-points
424398

425399
.. _project: http://www.doughellmann.com/projects/virtualenvwrapper.project/

0 commit comments

Comments
 (0)