From 88b7a29fab9767734813c058d3cab2a07fd57451 Mon Sep 17 00:00:00 2001 From: "Ashwin V. Mohanan" Date: Thu, 7 Nov 2024 11:57:24 +0100 Subject: [PATCH] Note on how to specify dependencies from github --- content/packaging.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/content/packaging.rst b/content/packaging.rst index 4332298e..f5698a1c 100644 --- a/content/packaging.rst +++ b/content/packaging.rst @@ -109,11 +109,6 @@ This is how ``pyproject.toml`` looks: :caption: pyproject.toml :emphasize-lines: 13-15 -.. seealso:: - - pyOpenSci tutorial on - `pyproject.toml metadata `__ - Note how our package requires ``scipy`` and we decided to not pin the version here (see :ref:`version_pinning`). @@ -121,6 +116,22 @@ 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 `__ + - pyOpenSci tutorial on + `pyproject.toml metadata `__ + Exercises 1