Skip to content

Commit 1b764a1

Browse files
authored
Merge pull request #864 from naveen521kk/py-win
2 parents bc00c3f + d58d597 commit 1b764a1

10 files changed

Lines changed: 557 additions & 123 deletions

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,22 @@ conflicts, prefer the advice in the Python Packaging User Guide.
2323

2424
Requirements for packaging and distributing
2525
===========================================
26-
2726
1. First, make sure you have already fulfilled the :ref:`requirements for
2827
installing packages <installing_requirements>`.
2928

30-
2. Install "twine" [1]_:
29+
2. Install "twine" [1]_:
30+
31+
.. tab:: Unix/macOS
32+
33+
.. code-block:: bash
3134
32-
::
35+
python3 -m pip install twine
3336
34-
python -m pip install twine
37+
.. tab:: Windows
38+
39+
.. code-block:: bash
40+
41+
py -m pip install twine
3542
3643
You'll need this to upload your project :term:`distributions <Distribution
3744
Package>` to :term:`PyPI <Python Package Index (PyPI)>` (see :ref:`below
@@ -751,10 +758,17 @@ called a :ref:`*Platform Wheel* (see section below) <Platform Wheels>`.
751758
Before you can build wheels for your project, you'll need to install the
752759
``wheel`` package:
753760

754-
.. code-block:: text
761+
.. tab:: Unix/macOS
755762

756-
python -m pip install wheel
763+
.. code-block:: bash
757764
765+
python3 -m pip install wheel
766+
767+
.. tab:: Windows
768+
769+
.. code-block:: bash
770+
771+
py -m pip install wheel
758772
759773
.. _`Universal Wheels`:
760774

@@ -767,9 +781,17 @@ anywhere by :ref:`pip`.
767781

768782
To build the wheel:
769783

770-
.. code-block:: text
784+
.. tab:: Unix/macOS
785+
786+
.. code-block:: bash
787+
788+
python3 setup.py bdist_wheel --universal
771789
772-
python setup.py bdist_wheel --universal
790+
.. tab:: Windows
791+
792+
.. code-block:: bash
793+
794+
py setup.py bdist_wheel --universal
773795
774796
You can also permanently set the ``--universal`` flag in :file:`setup.cfg`:
775797

@@ -803,10 +825,17 @@ and 3.
803825

804826
To build the wheel:
805827

806-
::
828+
.. tab:: Unix/macOS
829+
830+
.. code-block:: bash
831+
832+
python3 setup.py bdist_wheel
833+
834+
.. tab:: Windows
807835

808-
python setup.py bdist_wheel
836+
.. code-block:: bash
809837
838+
py setup.py bdist_wheel
810839
811840
``bdist_wheel`` will detect that the code is pure Python, and build a wheel
812841
that's named such that it's usable on any Python installation with the same
@@ -830,9 +859,17 @@ macOS, or Windows, usually due to containing compiled extensions.
830859

831860
To build the wheel:
832861

833-
::
862+
.. tab:: Unix/macOS
863+
864+
.. code-block:: bash
865+
866+
python3 setup.py bdist_wheel
867+
868+
.. tab:: Windows
869+
870+
.. code-block:: bash
834871
835-
python setup.py bdist_wheel
872+
py setup.py bdist_wheel
836873
837874
838875
:command:`bdist_wheel` will detect that the code is not pure Python, and build

source/guides/dropping-older-python-versions.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,19 @@ Defining the Python version required
5757

5858
Ensure that before you generate source distributions or binary distributions, you update Setuptools and install twine.
5959

60-
Steps::
60+
Steps:
6161

62-
python -m pip install --upgrade setuptools twine
62+
.. tab:: Unix/macOS
63+
64+
.. code-block:: bash
65+
66+
python3 -m pip install  --upgrade setuptools twine
67+
68+
.. tab:: Windows
69+
70+
.. code-block:: bash
71+
72+
py -m pip install  --upgrade setuptools twine
6373
6474
`setuptools` version should be above 24.0.0.
6575

source/guides/hosting-your-own-index.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,19 @@ generate an autoindex.
1212

1313
In either case, since you'll be hosting a repository that is likely not in
1414
your user's default repositories, you should instruct them in your project's
15-
description to configure their installer appropriately. For example with pip::
15+
description to configure their installer appropriately. For example with pip:
1616

17-
python -m pip install --extra-index-url https://python.example.com/ foobar
17+
.. tab:: Unix/macOS
18+
19+
.. code-block:: bash
20+
21+
python3 -m pip install --extra-index-url https://python.example.com/ foobar
22+
23+
.. tab:: Windows
24+
25+
.. code-block:: bash
26+
27+
py -m pip install --extra-index-url https://python.example.com/ foobar
1828
1929
In addition, it is **highly** recommended that you serve your repository with
2030
valid HTTPS. At this time, the security of your user's installations depends on

0 commit comments

Comments
 (0)