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.
294
286
295
-
You can test that it was installed correctly by importing the module and
296
-
referencing the ``name`` property you put in :file:`__init__.py` earlier.
297
-
287
+
You can test that it was installed correctly by importing the package.
298
288
Run the Python interpreter (make sure you're still in your virtualenv):
299
289
300
290
.. code-block:: bash
301
291
302
292
python
303
293
304
-
And then import the module and print out the ``name`` property. This should be
305
-
the same regardless of what you name you gave your :term:`distribution package`
306
-
in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``) because your :term:`import package` is ``example_pkg``.
294
+
and from the interpreter shell import the package:
307
295
308
296
.. code-block:: python
309
297
310
298
>>>import example_pkg
311
-
>>> example_pkg.test_string
312
-
'hello'
313
299
300
+
Note that the :term:`import package` is ``example_pkg`` regardless of what name you gave your :term:`distribution package`
301
+
in :file:`setup.py` (in this case, ``example-pkg-YOUR-USERNAME-HERE``).
0 commit comments