Skip to content

Commit

Permalink
Note on how to specify dependencies from github
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Nov 7, 2024
1 parent 9f8464e commit 88b7a29
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions content/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,29 @@ This is how ``pyproject.toml`` looks:
:caption: pyproject.toml
:emphasize-lines: 13-15

.. seealso::

pyOpenSci tutorial on
`pyproject.toml metadata <https://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html>`__

Note how our package requires ``scipy`` and we decided to not pin the version
here (see :ref:`version_pinning`).

Now we have all the building blocks to test a local pip install. This is a good
test before trying to upload a package to PyPI or test-PyPI
(see :ref:`pypi`)

.. note::

Sometime you need to rely on unreleased, development versions as
dependencies and this is also possible. For example, to use the
latest ``xarray`` you could add::

dependencies = [
"scipy",
"xarray @ https://github.com/pydata/xarray/archive/main.zip"
]

.. seealso::
- `pip requirement specifiers <https://pip.pypa.io/en/stable/reference/requirement-specifiers/>`__
- pyOpenSci tutorial on
`pyproject.toml metadata <https://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html>`__



Exercises 1
Expand Down

0 comments on commit 88b7a29

Please sign in to comment.