-
Notifications
You must be signed in to change notification settings - Fork 152
bad interaction: entrypoint script vs 'setup.py develop' #83
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
Comments
One additional datapoint: the console scripts generated when wheels are involved is much simpler, and just imports and runs. The new version of pip (7) tries to use wheels all the time, which is why I'm seeing many generate scripts on my system that would work with versioneer. Unfortunately A new workaround option is to make sure your main package can be used as an executable (by using Another (painful) workaround would be to:
I have to admit I'm still strongly tempted to have |
I think I understand this a bit better now.
If the egg_info (SRCDIR/PKG.egg-info.PKG-INFO) version doesn't match the generated entrypoint script's version, you get the error. The trick is that a local development install (
Now the ve2/bin/SCRIPT has the old version baked in, but second Another common pattern that will break the local install is to run Even if you only have a single virtualenv, there are other commands that will run So my new workaround is:
This seems to be ok. (incidentally, I think the If anyone can think of a better fix, I'm all ears, but I suspect this is going to have to be resolved with a docs change, rather than code. |
https://bitbucket.org/pypa/setuptools/issues/439 , fixed in setuptools-18.6, might fix this: they've stopped pinning the precise version number when installing with |
Cannot reproduce with recent setuptools. |
I noticed a bad interaction today. In my "magic-wormhole" project (which uses versioneer), I created a new virtualenv and ran "pip install -e .". The project uses an entrypoint, and it wrote the entrypoint script into venv/bin/wormhole. The generated script looks like:
This works fine until I make a commit, which changes the version that
setup.py version
reports into something different than the one frozen into the entrypoint script. After making a commit, running the script gives me an error:That makes me sad: if I want to use the virtualenv for testing the executable, I have to re-run
pip install -e .
after basically every commit.I think one workaround might be to avoid entrypoints and just use a regular
scripts=
argument (in setup.py), with a small executable that does a plain import-and-run. I haven't been able to come up with a better idea.The text was updated successfully, but these errors were encountered: