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

Installing editable project with scripts fails #108

Closed
coldfix opened this issue Mar 13, 2019 · 2 comments
Closed

Installing editable project with scripts fails #108

coldfix opened this issue Mar 13, 2019 · 2 comments

Comments

@coldfix
Copy link

coldfix commented Mar 13, 2019

Installing a project that only has a scripts entry results in an error No binaries associated with package XXX. and removes the installed environment. The same package installed in non-development mode works fine.

As far as I could find python setup.py develop leaves no record of the installed script (except for the script itself), and therefore the metadata based detection is destined to fail.

Two plausible fixes that come to mind:

  • ask the user before simply removing the virtualenv, they could then manually create the symlinks to binaries
  • change the binary detection code such that it diffs for the presence of scripts in $VIRTUAL_ENV/bin before/after installation of each package. This might be overall simpler and more reliable than metadata, but requires that depedencies are installed in separate steps from the main package. If the installation is already performed in such a controlled manner, this solution might be preferrable, otherwise unreasonable.

pipx version: 0.12.3.3

Minimal example:

Command

pipx install -e --spec . simple

setup.py

from distutils.core import setup
setup(name='simple', scripts=['simple'])

simple:

#! /usr/bin/env python
print("hello world")
@gaborbernat
Copy link
Contributor

python setup.py develop is no longer supported.

@coldfix
Copy link
Author

coldfix commented Dec 3, 2023

Though, the erroneous behaviour still occurs, using same minimal example from above (except, now using pipx install -e .). just the error message changed to:

No apps associated with package simple or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead.

(checked on pipx version 1.2.1 and 1.3.1)

gh271 pushed a commit to gh271/pipx that referenced this issue Jan 2, 2025
Improve validation and make field nullable
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

No branches or pull requests

2 participants