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

Installation into virtualenv doesn't install the saunter executable #53

Open
billzingler opened this issue Aug 15, 2016 · 1 comment
Open

Comments

@billzingler
Copy link

When I install into a virtualenv using Pip 8.1.2, I get the error:

Invalid script entry point: <ExportEntry saunter = saunter.main:None []> for req: saunter - A callable suffix is required. Cf https://packaging.python.org/en/latest/distributing.html#console-scripts for more information.

I don't encounter this when installing into the OS Python.

@mbroadhead
Copy link

Bump. I'm getting the same thing using pyenv. After doing a bit of research it seems you aren't supposed to provide a script as an entry point:

The console_scripts Entry Point
The second approach is called an ‘entry point’. Setuptools allows modules to register entrypoints which other packages can hook into to provide certain functionality. It also provides a few itself, including the console_scripts entry point.

This allows Python functions (not scripts!) to be directly registered as command-line accessible tools.

See: http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html

If I am understanding this, you need wrap all your code inside saunter/main.py in a 'main' function and then change your entry point from:

entry_points={
        "console_scripts": [
            "saunter = saunter.main",
        ],
    }

to:

entry_points={
        "console_scripts": [
            "saunter = saunter.main:main",
        ],
    }

maphew added a commit to leo-editor/leo-editor that referenced this issue Oct 6, 2017
Found after uploading a test release to test pypi. Pip install then generated an error:

    Invalid script entry point: <ExportEntry leow = leo.core.runLeo.run:None []> for req: leo - A callable suffix is required.

Which lead me to Element-34/py.saunter#53 and the dot-colon mistake.
maphew added a commit to leo-editor/leo-editor that referenced this issue Oct 26, 2017
Found after uploading a test release to test pypi. Pip install then generated an error:

    Invalid script entry point: <ExportEntry leow = leo.core.runLeo.run:None []> for req: leo - A callable suffix is required.

Which lead me to Element-34/py.saunter#53 and the dot-colon mistake.
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