Editable installs do not make scripts editable

We just updated from Python 3.8.12 to 3.12.4, and the ‘scripts’ are no longer installed in such a way that they’re mere references to the original when “-e” is passed.

This is running in pyenv.

$ pip install -e workflow_api_website
$ which waw_retail_brand_list
/home/dustin/.pyenv/shims/waw_retail_brand_list

$ pyenv which waw_retail_brand_list
/home/dustin/.pyenv/versions/workflow_application/bin/waw_retail_brand_list

The normal module scripts are installed as references as expected:

>>> waw.utility.__file__
'/home/dustin/development/obo/workflow_application/workflow_api_website/waw/utility.py'

This project does not have a setup.cfg .

What could I be doing or not doing that is breaking this?

Probably something changed in setuptools, no? Can you identify the versions of setuptools being used?

Also I do not know pyenv, I do not know what pyenv does or doesn’t.

78.0.2, which is the latest on PyPI.

As far as I can tell, setuptools 78.0.2 requires “Python >= 3.9”, so it seems unlikely that this is this version that you use with “Python 3.8.12”.

Any thoughts on what might be happening in 3.12.4?

Again, if I were you I would rather investigate what has changed in setuptools between the version of setuptools that you used with Python 3.8 and the version of setuptools that you used with Python 3.12.

You still have not said what version of setuptools you used with Python 3.8, so I can not tell for sure. But I know that setuptools changed a lot lately. In particular but not exclusively about editable installations.

1 Like

It’s a nonmystery and a distraction.

It’s a totally different setup. With version-management tools, you’ll often get a certain version of pip and setuptools for a certain version of Python. With 3.12.4 under pyenv, you get setuptools 78.0.2 . With 3.8.12, you get 56:

$ python -V
Python 3.8.12

$ pip list
Package    Version
---------- -------
pip        21.1.1
setuptools 56.0.0

Sorry, I thought you were asking for advice from others. Sorry again for the distraction. Good luck.

4 Likes

I appreciate that you’re willing to discuss other things about my environment that have already been explained, but, meanwhile, this is still a problem.

You realise you just brushed off the person trying to help you, right?

[my bold] the setuptools version you were using on python 3.8 had not been mentioned before you called it a distraction (and pretending otherwise will just cause people to stop helping you).

Back to your problem: going from setuptools v56 to v78 is a huge change. You can try to bisect the version range by installing different setuptool versions and check when the behaviour you expect changed.

5 Likes

That’s a good tactic. Thanks for pointing that out.