diff --git a/source/guides/distributing-packages-using-setuptools.rst b/source/guides/distributing-packages-using-setuptools.rst index 3a0ba8018..c6e7ebf41 100644 --- a/source/guides/distributing-packages-using-setuptools.rst +++ b/source/guides/distributing-packages-using-setuptools.rst @@ -36,7 +36,7 @@ Requirements for packaging and distributing .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install twine @@ -728,7 +728,7 @@ Before you can build wheels and sdists for your project, you'll need to install .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install build @@ -747,7 +747,7 @@ Minimally, you should create a :term:`Source Distribution =2.0.0,<3.0.0 @@ -260,7 +277,7 @@ To install pre-release versions of packages, use the ``--pre`` flag: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --pre requests @@ -279,7 +296,7 @@ specifying the extra in brackets: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install requests[security] @@ -301,7 +318,7 @@ pip can install a package directly from source, for example: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat cd google-auth py -m pip install . @@ -318,7 +335,7 @@ installed package without needing to re-install: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --editable . @@ -354,7 +371,7 @@ wheel, or tar file) you can install it directly with pip: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install requests-2.18.4.tar.gz @@ -370,7 +387,7 @@ pip to look for packages there and not to use the .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --no-index --find-links=/local/dir/ requests @@ -393,7 +410,7 @@ If you want to download packages from a different index than the .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --index-url http://index.example.com/simple/ SomeProject @@ -409,7 +426,7 @@ and a separate index, you can use the ``--extra-index-url`` flag instead: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --extra-index-url http://index.example.com/simple/ SomeProject @@ -427,7 +444,7 @@ install the latest version of ``requests`` and all of its dependencies: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade requests @@ -453,7 +470,7 @@ And tell pip to install all of the packages in this file using the ``-r`` flag: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install -r requirements.txt @@ -471,7 +488,7 @@ Pip can export a list of all installed packages and their versions using the .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip freeze diff --git a/source/guides/making-a-pypi-friendly-readme.rst b/source/guides/making-a-pypi-friendly-readme.rst index 04fdce648..32e8f2f09 100644 --- a/source/guides/making-a-pypi-friendly-readme.rst +++ b/source/guides/making-a-pypi-friendly-readme.rst @@ -53,7 +53,7 @@ such as ``text/plain``, ``text/x-rst`` (for reStructuredText), or ``text/markdow .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --user --upgrade setuptools wheel twine @@ -115,7 +115,7 @@ You can check your README for markup errors before uploading as follows: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade twine diff --git a/source/guides/using-testpypi.rst b/source/guides/using-testpypi.rst index 7f03d38fb..e8676fc25 100644 --- a/source/guides/using-testpypi.rst +++ b/source/guides/using-testpypi.rst @@ -49,7 +49,7 @@ specifying the ``--index-url`` flag .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --index-url https://test.pypi.org/simple/ your-package @@ -65,7 +65,7 @@ you're testing has dependencies: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple your-package diff --git a/source/tutorials/creating-documentation.rst b/source/tutorials/creating-documentation.rst index 685e703d4..392220f31 100644 --- a/source/tutorials/creating-documentation.rst +++ b/source/tutorials/creating-documentation.rst @@ -21,7 +21,7 @@ Use ``pip`` to install Sphinx: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install -U sphinx diff --git a/source/tutorials/installing-packages.rst b/source/tutorials/installing-packages.rst index 63420c70e..3e567d416 100644 --- a/source/tutorials/installing-packages.rst +++ b/source/tutorials/installing-packages.rst @@ -45,7 +45,7 @@ version is available from your command line. You can check this by running: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py --version @@ -109,7 +109,7 @@ check this by running: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip --version @@ -132,7 +132,7 @@ standard library: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m ensurepip --default-pip @@ -180,7 +180,7 @@ but here's the basic `venv`_ [3]_ command to use on a typical Linux system: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m venv tutorial_env tutorial_env\Scripts\activate @@ -240,7 +240,7 @@ Using `venv`_: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m venv \Scripts\activate @@ -256,7 +256,7 @@ Using :ref:`virtualenv`: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat virtualenv \Scripts\activate @@ -314,7 +314,7 @@ To install the latest version of "SomeProject": .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install "SomeProject" @@ -328,7 +328,7 @@ To install a specific version: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install "SomeProject==1.4" @@ -342,7 +342,7 @@ To install greater than or equal to one version and less than another: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install "SomeProject>=1,<2" @@ -358,7 +358,7 @@ with a certain version: [4]_ .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install "SomeProject~=1.4.2" @@ -398,7 +398,7 @@ Upgrade an already installed ``SomeProject`` to the latest from PyPI. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade SomeProject @@ -418,7 +418,7 @@ current user, use the ``--user`` flag: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --user SomeProject @@ -470,7 +470,7 @@ Install a list of requirements specified in a :ref:`Requirements File .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install -r requirements.txt @@ -491,7 +491,7 @@ syntax, see pip's section on :ref:`VCS Support `. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomeProject # from git py -m pip install -e hg+https://hg.repo/some_pkg#egg=SomeProject # from mercurial @@ -511,7 +511,7 @@ Install from an alternate index .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --index-url http://my.package.repo/simple/ SomeProject @@ -526,7 +526,7 @@ Package Index (PyPI)>` .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --extra-index-url http://my.package.repo/simple SomeProject @@ -547,7 +547,7 @@ still editable from the src tree. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install -e @@ -561,7 +561,7 @@ You can also install normally from src .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install @@ -578,7 +578,7 @@ Install a particular source archive file. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install ./downloads/SomeProject-1.0.4.tar.gz @@ -595,7 +595,7 @@ Install from a local directory containing archives (and don't check :term:`PyPI .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --no-index --find-links=file:///local/dir/ SomeProject py -m pip install --no-index --find-links=/local/dir/ SomeProject @@ -629,7 +629,7 @@ default, pip only finds stable versions. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --pre SomeProject @@ -648,7 +648,7 @@ Install `setuptools extras`_. .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install SomePackage[PDF] py -m pip install SomePackage[PDF]==3.0 diff --git a/source/tutorials/managing-dependencies.rst b/source/tutorials/managing-dependencies.rst index 96430d8a6..99b889ca1 100644 --- a/source/tutorials/managing-dependencies.rst +++ b/source/tutorials/managing-dependencies.rst @@ -45,7 +45,7 @@ Use ``pip`` to install Pipenv: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --user pipenv diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index db65eb097..bfc094436 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -26,7 +26,7 @@ sure you have the latest version installed: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade pip @@ -415,7 +415,7 @@ Make sure you have the latest version of PyPA's :ref:`build` installed: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade build @@ -432,7 +432,7 @@ Now run this command from the same directory where :file:`pyproject.toml` is loc .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m build @@ -485,7 +485,7 @@ distribution packages. You'll need to install Twine: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --upgrade twine @@ -499,7 +499,7 @@ Once installed, run Twine to upload all of the archives under :file:`dist`: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m twine upload --repository testpypi dist/* @@ -539,7 +539,7 @@ and install your package from TestPyPI: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-pkg-YOUR-USERNAME-HERE @@ -573,7 +573,7 @@ Make sure you're still in your virtual environment, then run Python: .. tab:: Windows - .. code-block:: bash + .. code-block:: bat py