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

Output of logo causes failure with pipsi (via setup.py --name) #288

Closed
blueyed opened this issue Jul 12, 2015 · 9 comments
Closed

Output of logo causes failure with pipsi (via setup.py --name) #288

blueyed opened this issue Jul 12, 2015 · 9 comments
Milestone

Comments

@blueyed
Copy link
Contributor

blueyed commented Jul 12, 2015

When trying to install xonsh with pipsi it fails because of the logo.

pipsi uses setup.py --name to get the name, but this will include the logo.

% pipsi install --editable ~v/xonsh 
Traceback (most recent call last):
  File "/home/user/.local/bin/pipsi3", line 9, in <module>
    load_entry_point('pipsi==0.9.dev0', 'console_scripts', 'pipsi')()
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/decorators.py", line 26, in new_func
    return ctx.invoke(f, ctx.obj, *args[1:], **kwargs)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "…/pipsi/pipsi.py", line 366, in install
    if repo.install(package, python, editable):
  File "…/pipsi/pipsi.py", line 215, in install
    venv_path = self.get_package_path(package)
  File "…/pipsi/pipsi.py", line 187, in get_package_path
    return join(self.home, normalize_package(package))
  File "…/pipsi/pipsi.py", line 61, in normalize_package
    requirement = Requirement.parse(value)
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2986, in parse
    reqs = list(parse_requirements(s))
  File "/home/user/.local/venvs3/pipsi/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2917, in parse_requirements
    raise RequirementParseError("Missing distribution spec", line)
pkg_resources.RequirementParseError: Missing distribution spec ╓██▄

I could imagine to skip output of the logo in case --name is passed as argument (but that should cover other, similar usecases then probably, too).
Or to write it to stderr - although it's clearly no error.

@scopatz scopatz added this to the v0.2 milestone Jul 12, 2015
@scopatz
Copy link
Member

scopatz commented Jul 12, 2015

Hmm interesting. I am not sure that there is a good way to avoid printing the logo with distutils. Have you reported this to pipsi? ./setup.py --name doesn't seem like a robust way to get the name of a package. Does pipsi provide other hooks that we could implement?

@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2015

Does pipsi provide other hooks that we could implement?

No. See https://github.com/mitsuhiko/pipsi/blob/master/pipsi.py#L177-179 for the code.

I've reported it to pipsi at mitsuhiko/pipsi#53 now, with some more additional information.

@RonnyPfannschmidt
Copy link
Contributor

in general, please avoid doing anything but the absolute minimum required for packaging in setup.py,

the tooling is a mess and breaking semi-expected behaviors just because you can makes it even harder for consumers

its impossible to properly use hooks at that position since some people don't use setup-tools

in a better world there would be static metadata and it could just be read

@scopatz
Copy link
Member

scopatz commented Jul 12, 2015

I think that this is mostly a pipsi robustness issue, so we should have the conversation there. We'll leave this issue open, to be closed when there is a better upstream pipsi solution.

@RonnyPfannschmidt
Copy link
Contributor

pipsi will not fix this with setup.py - the only reliable way is the upcoming static metadata, but that's years away

trying to be robust in this absolute mess is a waste of manpower when something sane is on the horizon

also its pretty much your choice to print random fancy stuff at setup.py execution, which is pretty much a 'lets make things worse because we can item'

@scopatz
Copy link
Member

scopatz commented Aug 7, 2015

If there is something direct that you would like to see changed, please open a PR. If there is an alternate way of giving pipsi the package name, such as a .pipsi file, please let us know and/or open a PR.

@scopatz
Copy link
Member

scopatz commented Aug 7, 2015

@blueyed - please let us know if this is able to be closed since #349 has been merged.

@scopatz scopatz closed this as completed Sep 12, 2015
@blueyed
Copy link
Contributor Author

blueyed commented Sep 12, 2015

@scopatz
Sorry for not replying earlier - this should be fixed.
Thanks!

@scopatz
Copy link
Member

scopatz commented Sep 12, 2015

No worries @blueyed! Thanks for pushing this issue. I am glad it was resolved :)

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

No branches or pull requests

3 participants