Skip to content

Commit ec0b72a

Browse files
committed
Merge pull request #125 from minrk/sys-prefix-flag
Add `--sys-prefix` flag to `ipython kernel install`
2 parents d6dd8a8 + d20ad9f commit ec0b72a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ipykernel/kernelspec.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ def start(self):
154154
parser.add_argument('--prefix', type=str,
155155
help="Specify an install prefix for the kernelspec."
156156
" This is needed to install into a non-default location, such as a conda/virtual-env.")
157+
parser.add_argument('--sys-prefix', action='store_const', const=sys.prefix, dest='prefix',
158+
help="Install to Python's sys.prefix."
159+
" Shorthand for --prefix='%s'. For use in conda/virtual-envs." % sys.prefix)
157160
opts = parser.parse_args(self.argv)
158161
try:
159162
dest = install(user=opts.user, kernel_name=opts.name, prefix=opts.prefix,

0 commit comments

Comments
 (0)