Python: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 276: Line 276:


==== Version ==== <!--T:79-->
==== Version ==== <!--T:79-->
To list a specific version, one can use the same format as with `pip`:
To list a specific version, you can use the same format as with `pip`:
{{Command
{{Command
|avail_wheels numpy{{=}}{{=}}1.23
|avail_wheels numpy{{=}}{{=}}1.23
Line 296: Line 296:
numpy  1.23.0    cp310    generic
numpy  1.23.0    cp310    generic
}}
}}
With the <code>pip</code> format, one can use different operators : <code>==</code>, <code><</code>, <code>></code>, <code>~=</code>, <code><=</code>,<code>>=</code>, <code>!=</code>. For instance, to list inferior versions:
With the <code>pip</code> format, you can use different operators : <code>==</code>, <code><</code>, <code>></code>, <code>~=</code>, <code><=</code>,<code>>=</code>, <code>!=</code>. For instance, to list inferior versions:
{{Command
{{Command
|avail_wheels 'numpy<1.23'
|avail_wheels 'numpy<1.23'
Line 324: Line 324:


==== Python ==== <!--T:80-->
==== Python ==== <!--T:80-->
One can list a specific version of Python:
You can list a specific version of Python:
{{Command
{{Command
|avail_wheels 'numpy<1.23' --python 3.9
|avail_wheels 'numpy<1.23' --python 3.9
Line 332: Line 332:
numpy  1.22.2    cp39      generic
numpy  1.22.2    cp39      generic
}}
}}
The ''python'' column tell us for which python version the wheel is available, where <tt>cp39</tt> stands for <tt>cpython 3.9</tt>.
The <i>python</i> column tell us for which python version the wheel is available, where <code>cp39</code> stands for <code>cpython 3.9</code>.


==== Requirements file ==== <!--T:81-->
==== Requirements file ==== <!--T:81-->
One can list available wheels based on a <tt>requirements.txt</tt> file with:
One can list available wheels based on a <code>requirements.txt</code> file with:
{{Command
{{Command
|avail_wheels -r requirements.txt  
|avail_wheels -r requirements.txt  
rsnt_translations
56,420

edits