File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,23 @@ def run(self):
5959 return [paragraph_node ]
6060
6161
62+ class CondaInstallVersionDirective (SphinxDirective ):
63+
64+ def run (self ):
65+ help_text = (
66+ "conda create -n <env_name> python=3.13\n "
67+ "conda activate <env_name>\n "
68+ f"pip install jwst=={ version } \n "
69+ )
70+ paragraph_node = nodes .literal_block (text = help_text )
71+ return [paragraph_node ]
72+
73+
6274def setup (app ):
6375 # add a custom AttributeDocumenter subclass to handle Step.spec formatting
6476 app .add_autodocumenter (StepSpecDocumenter , True )
6577 app .add_directive ('pip_install_literal' , PipInstallVersionDirective )
78+ app .add_directive ('conda_install_literal' , CondaInstallVersionDirective )
6679
6780
6881conf = ConfigParser ()
Original file line number Diff line number Diff line change @@ -47,12 +47,9 @@ shell.
4747Installing Latest Release
4848-------------------------
4949
50- You can install the latest released version via ``pip ``. From a bash/zsh shell::
50+ You can install the latest released version via ``pip ``. From a bash/zsh shell:
5151
52- conda create -n <env_name> python=3.13
53- conda activate <env_name>
54-
55- .. pip_install_literal ::
52+ .. conda_install_literal ::
5653
5754|version | |release | If no version tag is specified in the install command, `pip ` will find the latest release compatible
5855with the current environment. This could lead to an unintended `jwst ` version if the latest release
You can’t perform that action at this time.
0 commit comments