You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
just upgrade my python package with python setup.py install. but find that still link to old version package and find that the version was not deleted from easy-install.pth
looks like setuptools==67.7.2 is ok, but from setuptools==67.8.0, there is an issue in _load_raw method of class PthDistributions:
it maybe should is paths[-1]=normalized_path = normalize_path(os.path.join(self.basedir, path))
the paths is not full path, so, there will be an issue in below find_distributions:
self.paths, self.dirty = self._load()
self._init_paths = self.paths[:]
super().init([], None, None)
for path in yield_lines(self.paths): list(map(self.add, find_distributions(path, True)))
Expected behavior
when upgrade the package, the previous version should be remove from easy-install.pth and can link to the current version
How to Reproduce
create a python package with version 1.0.27
install it with python setup.py install
change version to 1.0.28
upgrade it with python setup.py install
check if upgrade success, should have below message, if not, looks like upgrade failed.
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
Output
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
The text was updated successfully, but these errors were encountered:
Hi @morganw, please note that any easy-install solution or python setup.py XXX CLI commands, are deprecated and no longer receive first class support.
The recommended approach is as follows:
Please make sure you have updated the package source code to include a pyproject.toml file with a [build-system] table, as documented in the user guide.
Note that you need to list all your build dependencies in the [build-system] requires field (e.g. if you use any non-stdlib library in your setup.py script.
Please also note that if you need to import your local folders in your setup.py script then you also need to manually add the local folder to sys.path or use build-backend = "setuptools.build_meta:__legacy__"
Please use pip>=23 to install your package using pip install .
setuptools version
setuptools==67.8.0
Python version
Python3.11
OS
macOS
Additional environment information
No response
Description
just upgrade my python package with python setup.py install. but find that still link to old version package and find that the version was not deleted from easy-install.pth
looks like setuptools==67.7.2 is ok, but from setuptools==67.8.0, there is an issue in _load_raw method of class PthDistributions:
normalized_path = normalize_path(os.path.join(self.basedir, path)
it maybe should is paths[-1]=normalized_path = normalize_path(os.path.join(self.basedir, path))
the paths is not full path, so, there will be an issue in below find_distributions:
self.paths, self.dirty = self._load()
self._init_paths = self.paths[:]
super().init([], None, None)
for path in yield_lines(self.paths):
list(map(self.add, find_distributions(path, True)))
Expected behavior
when upgrade the package, the previous version should be remove from easy-install.pth and can link to the current version
How to Reproduce
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
Output
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
The text was updated successfully, but these errors were encountered: