Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI doesn't work in Windows when installed with conda #80

Open
zmoon opened this issue Oct 28, 2021 · 7 comments · Fixed by conda-forge/xrviz-feedstock#12
Open

CLI doesn't work in Windows when installed with conda #80

zmoon opened this issue Oct 28, 2021 · 7 comments · Fixed by conda-forge/xrviz-feedstock#12

Comments

@zmoon
Copy link

zmoon commented Oct 28, 2021

Invoking xrviz gives this:

#!/bin/sh
'''exec' C:/Users/zmoon/.conda/envs/xrviz/bin/python "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from xrviz.cli import main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

I installed from conda-forge.

With a pip install it is fine (xrviz is a .exe).

@martindurant
Copy link
Member

Agree, there should probably not be any launch script specific to conda beyond whatever pip does. What is it exactly that goes wrong with your invocation?

(Note that xrviz was mainly conceived as callable code or for in the jupyter notebook.)

@zmoon
Copy link
Author

zmoon commented Oct 28, 2021

It seems like with the Conda install, we get an xrviz script that would work in a UNIX-like. What I posted above is the contents of the xrviz file. Invoking xrviz, Windows asks what you want to do with the file. Choosing a text editor I see the file contents that I posted.

Installing with Pip instead, it builds the proper "script" during the Setuptools process, which on Windows is a binary xrviz.exe.

(Note that xrviz was mainly conceived as callable code or for in the jupyter notebook.)

Noted, was just trying it out for fun.

@martindurant
Copy link
Member

I don't see anything in https://github.com/conda-forge/xrviz-feedstock/blob/master/recipe/meta.yaml that would cause this - it just calls pip and that's all. https://github.com/intake/xrviz/blob/master/setup.py#L27 also looks standard. Maybe raise this at the feedstock and ping a conda-forge admin?

@zmoon
Copy link
Author

zmoon commented Oct 28, 2021

I notice some other projects specify the entry points in the meta.yaml (in addition to the Setuptools), e.g., https://github.com/conda-forge/tqdm-feedstock/blob/master/recipe/meta.yaml

Maybe that would fix this?

@martindurant
Copy link
Member

I honestly don't know. It could be a change since when this package was last released, nearly two years ago.

@rsignell-usgs
Copy link
Collaborator

@ocefpaf, what do you think about blowing away the feedstock and starting over with a grayskull created one?

@ocefpaf
Copy link

ocefpaf commented Oct 29, 2021

@ocefpaf, what do you think about blowing away the feedstock and starting over with a grayskull created one?

No need to start a new one. Just update the current one with the entry_point. Doing it now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants