11INSTALLATION
22============
33
4- pythondialog is packaged with Distutils . With the current state of
4+ pythondialog is packaged with Setuptools . With the current state of
55Python packaging and installation tools, there are several ways to
66install the Python 2 backport of pythondialog from source.
77
8- Probably, the easiest and cleanest method at this date (April 2015) is
9- to use pip, possibly inside a virtual environment created with
10- virtualenv or venv.py/pyvenv (at the time of this writing,
11- venv.py/pyvenv is only available for Python 3). Typically, assuming you
12- have a working pip setup (see below), you just have to run one of the
13- following commands:
8+ Probably, the easiest and cleanest method at this date (December 2019)
9+ is to use pip, possibly inside a virtual environment created with
10+ virtualenv. Typically, assuming you have a working pip setup (see
11+ below), you just have to run one of the following commands:
1412
1513 pip install python2-pythondialog (which normally installs from PyPI)
1614
1715or
1816
19- pip install /path/to/python2-pythondialog- X.Y.Z.tar.gz
17+ pip install /path/to/python2_pythondialog- X.Y.Z-py2-none-any.whl
2018
2119or
2220
23- pip install https://url /to/python2-pythondialog-X.Y.Z.tar.gz
21+ pip install /path /to/python2-pythondialog-X.Y.Z.tar.gz
2422
2523or
2624
27- pip install http://url/to/python2-pythondialog-X.Y.Z.tar.gz
25+ pip install https://url/to/python2-pythondialog-X.Y.Z.tar.gz
26+
27+ etc.
2828
2929Notes:
30- - old versions of pip don't support https;
30+ - very old versions of pip don't support https---better upgrade pip if
31+ you have such an old version;
3132 - upgrades can be done by passing '--upgrade' or '-U' to the
3233 'pip install' command; please refer to the pip documentation for
3334 details.
@@ -83,53 +84,46 @@ desirable inside a virtual environment created with virtualenv or
8384venv.py/pyvenv.
8485
8586
86- Old way, without pip
87- --------------------
88-
89- The following instructions explain how to install the Python 2 backport
90- of pythondialog directly from its setup.py, without using pip. If
91- possible, the method based on pip is preferable because it makes
92- uninstallation standard and easy.
93-
94- Here are the steps:
95- - make this file's directory your shell's current directory
96- - optionally edit setup.cfg (cf. the "Installing Python Modules"
97- chapter of the Python documentation).
87+ Older ways, without pip
88+ -----------------------
9889
99- - a) 1) type:
90+ The installation method based on pip is much preferred because for one,
91+ it makes uninstallation standard and easy. In case you really can't use
92+ pip, the following instructions should help you install the Python 2
93+ backport of pythondialog, nevertheless. Here are two ways:
10094
101- python2 ./setup.py build
95+ 1) Because pythondialog only needs dialog.py in the proper place to
96+ work, you may simply copy this file to an appropriate directory for
97+ your Python installation (probably something like
98+ <base_dir>/lib/python2.7/site-packages). For uninstallation, simply
99+ remove the file you copied (also byte-compiled files such as
100+ dialog.pyc if such files have been created from dialog.py).
102101
103- (depending on your system and the Python version you want to
104- install for, you may have to replace "python2" with "python"
105- or, for instance, "python2.7")
102+ 2) Another technique can be used if you have Setuptools installed. In
103+ this case, you can run:
106104
107- 2) then, as root (after replacing /usr/local with the actual
108- installation prefix you want to use):
105+ python2 ./setup.py build
109106
110- python2 ./setup.py install --prefix=/usr/local \
111- --record /path/to/foo
107+ from the root of the pythondialog distribution, followed by
112108
113- where foo is a file of your choice which will contain the list
114- of all files installed on your system by the preceding
115- command. This will make uninstallation easy (you could ommit
116- the "--record /path/to/foo", but uninstallation could not be
117- automated, then).
109+ python2 ./setup.py install
118110
119- OR
111+ (the second command might need root privileges, depending on where
112+ you are trying to install). This should create a file such as
113+ <base_dir>/lib/python2.7/site-packages/python2_pythondialog-3.5.1-py2.7.egg
114+ and add an entry to
115+ <base_dir>/lib/python2.7/site-packages/easy-install.pth that points
116+ to the .egg file. Uninstallation would then be done with
117+ '<base_dir>/bin/easy_install -m python2-pythondialog' followed by
118+ manual removal of the .egg file.
120119
121- b) type, as root (after replacing the installation prefix):
122-
123- python2 ./setup.py install --prefix=/usr/local \
124- --record /path/to/foo
125-
126- This will automatically build the package before installing it.
127- The observations made in a) also apply here.
128-
129-
130- If this default installation is not what you wish, please read the
131- Distutils documentation which should be available in the "Installing
132- Python Modules" chapter of the Python documentation.
120+ I repeat: the supported method is with pip, as documented earlier in
121+ this file. The tips in this section are only given to help people with
122+ uncommon constraints such as "I can't use pip". Tip 1 (copying
123+ dialog.py) is rather straightforward, no real problem. Tip 2 has been
124+ quickly tested in a virtualenv, appears to work fine but uses deprecated
125+ tools. You can use it, but will be on your own in case things don't go
126+ exactly as you expected.
133127
134128
135129UNINSTALLATION
@@ -140,20 +134,13 @@ uninstall it with the following command:
140134
141135 pip uninstall python2-pythondialog
142136
143- (which should be run under the same account that was used to run the
144- "pip install" command)
145-
146- Otherwise, if you have followed the old installation procedure, you have
147- a /path/to/foo file that contains all the files the installation process
148- put on your system. Great! All you have to do is:
149-
150- while read file; do rm -f "$file"; done < /path/to/foo
151-
152- under a POSIX-style shell and with appropriate privileges (maybe root,
153- depending on how you installed the Python 2 backport of pythondialog).
137+ It should be run under the same account that was used to run the
138+ 'pip install' command.
154139
155- Note: this will handle file names with spaces correctly, unlike the
156- simpler "rm -f $(cat /path/to/foo)".
140+ On the other hand, if you installed pythondialog using techniques from
141+ the previous section ("Older ways, without pip"), uninstallation
142+ instructions were given there along with each of the mentioned
143+ techniques.
157144
158145
159146# Local Variables:
0 commit comments