Rename Package serial -> serial_labgrid#2
Rename Package serial -> serial_labgrid#2Bastian-Krause wants to merge 1 commit intolabgrid-project:mainfrom
Conversation
labgrid's pyserial fork uses the same package name as the original
pyserial. This becomes a problem once another dependency pulls in the
original pyserial. Then one package will overwrite the other.
Thus, rename the package from "serial" to "serial_labgrid":
- pyproject.toml edited manually
- `pip install rope`, then run:
```
import rope
project = rope.base.project.Project(".")
serial = project.find_module("serial")
changes = rope.refactor.rename.Rename(project, serial).get_changes("serial_labgrid")
project.do(changes)
```
- update serial.urlhandler -> serial_labgrid.urlhandler
in serial_labgrid/__init__.py:protocol_handler_packages
Signed-off-by: Bastian Krause <bst@pengutronix.de>
|
This prevents distributions from using a correctly patched upstream pyserial. I am less in favor of merging this because of that reason. |
For the record: @Emantor means these import changes that will be needed in labgrid:
Since the pyproject.toml already references this fork, a patch would be required anyway (at least if the distro uses that somehow). As far as I know, nixos is the only distro packaging a recent labgrid version. Alternatives to this PR are:
As the alternatives sound like they might introduce even bigger problems, I'm still in favour of merging this "cleaner solution" - at least for now. |
labgrid's pyserial fork uses the same package name as the original pyserial. This becomes a problem once another dependency pulls in the original pyserial. Then one package will overwrite the other.
Thus, rename the package from "serial" to "serial_labgrid":
pip install rope, then run:serial.urlhandler->serial_labgrid.urlhandlerinserial_labgrid/__init__.py:protocol_handler_packagesThis is the first step to fix labgrid-project/labgrid#1245.