@@ -149,120 +149,10 @@ profile:
149
149
``setup_requires ``.
150
150
151
151
152
- .. _`Requirements File Format` :
153
-
154
152
Requirements File Format
155
153
------------------------
156
154
157
- Each line of the requirements file indicates something to be installed,
158
- and like arguments to :ref: `pip install `, the following forms are supported::
159
-
160
- [[--option]...]
161
- <requirement specifier> [; markers] [[--option]...]
162
- <archive url/path>
163
- [-e] <local project path>
164
- [-e] <vcs project url>
165
-
166
- For details on requirement specifiers, see :ref: `Requirement Specifiers `.
167
-
168
- See the :ref: `pip install Examples<pip install Examples> ` for examples of all these forms.
169
-
170
- A line that begins with ``# `` is treated as a comment and ignored. Whitespace
171
- followed by a ``# `` causes the ``# `` and the remainder of the line to be
172
- treated as a comment.
173
-
174
- A line ending in an unescaped ``\ `` is treated as a line continuation
175
- and the newline following it is effectively ignored.
176
-
177
- Comments are stripped *after * line continuations are processed.
178
-
179
- To interpret the requirements file in UTF-8 format add a comment
180
- ``# -*- coding: utf-8 -*- `` to the first or second line of the file.
181
-
182
- The following options are supported:
183
-
184
- .. pip-requirements-file-options-ref-list ::
185
-
186
- Please note that the above options are global options, and should be specified on their individual lines.
187
- The options which can be applied to individual requirements are
188
- :ref: `--install-option <install_--install-option >`, :ref: `--global-option <install_--global-option >` and ``--hash ``.
189
-
190
- For example, to specify :ref: `--pre <install_--pre >`, :ref: `--no-index <install_--no-index >` and two
191
- :ref: `--find-links <install_--find-links >` locations:
192
-
193
- ::
194
-
195
- --pre
196
- --no-index
197
- --find-links /my/local/archives
198
- --find-links http://some.archives.com/archives
199
-
200
-
201
- If you wish, you can refer to other requirements files, like this::
202
-
203
- -r more_requirements.txt
204
-
205
- You can also refer to :ref: `constraints files <Constraints Files >`, like this::
206
-
207
- -c some_constraints.txt
208
-
209
- .. _`Using Environment Variables` :
210
-
211
- Using Environment Variables
212
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
213
-
214
- Since version 10, pip supports the use of environment variables inside the
215
- requirements file. You can now store sensitive data (tokens, keys, etc.) in
216
- environment variables and only specify the variable name for your requirements,
217
- letting pip lookup the value at runtime. This approach aligns with the commonly
218
- used `12-factor configuration pattern <https://12factor.net/config >`_.
219
-
220
- You have to use the POSIX format for variable names including brackets around
221
- the uppercase name as shown in this example: ``${API_TOKEN} ``. pip will attempt
222
- to find the corresponding environment variable defined on the host system at
223
- runtime.
224
-
225
- .. note ::
226
-
227
- There is no support for other variable expansion syntaxes such as
228
- ``$VARIABLE `` and ``%VARIABLE% ``.
229
-
230
-
231
- .. _`Example Requirements File` :
232
-
233
- Example Requirements File
234
- ^^^^^^^^^^^^^^^^^^^^^^^^^
235
-
236
- Use ``pip install -r example-requirements.txt `` to install::
237
-
238
- #
239
- ####### example-requirements.txt #######
240
- #
241
- ###### Requirements without Version Specifiers ######
242
- nose
243
- nose-cov
244
- beautifulsoup4
245
- #
246
- ###### Requirements with Version Specifiers ######
247
- # See https://www.python.org/dev/peps/pep-0440/#version-specifiers
248
- docopt == 0.6.1 # Version Matching. Must be version 0.6.1
249
- keyring >= 4.1.1 # Minimum version 4.1.1
250
- coverage != 3.5 # Version Exclusion. Anything except version 3.5
251
- Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.*
252
- #
253
- ###### Refer to other requirements files ######
254
- -r other-requirements.txt
255
- #
256
- #
257
- ###### A particular file ######
258
- ./downloads/numpy-1.9.2-cp34-none-win32.whl
259
- http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev1820+49a8884-cp34-none-win_amd64.whl
260
- #
261
- ###### Additional Requirements without Version Specifiers ######
262
- # Same as 1st section, just here to show that you can put things in any order.
263
- rejected
264
- green
265
- #
155
+ This section has been moved to :doc: `../reference/requirements-file-format `.
266
156
267
157
.. _`Requirement Specifiers` :
268
158
0 commit comments