You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. note:: This example uses ``--index-url`` flag to specify TestPyPI instead of live PyPI. Additionally, it specifies ``--no-deps``. Since TestPyPI doesn't have the same packages as the live PyPI, it's possible that attempting to install dependencies may fail or install something unexpected. While our example package doesn't have any dependencies, it's a good practice to avoid installing dependencies when using TestPyPI.
296
289
297
-
You can test that it was installed correctly by importing the module and
298
-
referencing the ``name`` property you put in :file:`__init__.py` earlier.
299
-
290
+
You can test that it was installed correctly by importing the package.
300
291
Run the Python interpreter (make sure you're still in your virtualenv):
301
292
302
293
.. code-block:: bash
303
294
304
295
python
305
296
306
-
And then import the module and print out the ``name`` property. This should be
307
-
the same regardless of what you name you gave your :term:`distribution package`
308
-
in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``) because your :term:`import package` is ``example_pkg``.
297
+
and from the interpreter shell import the package:
309
298
310
299
.. code-block:: python
311
300
312
301
>>>import example_pkg
313
-
>>> example_pkg.name
314
-
'example_pkg'
315
302
303
+
Note that the :term:`import package` is ``example_pkg`` regardless of what name you gave your :term:`distribution package`
304
+
in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``).
0 commit comments