Closed jwmullally closed 7 years ago
Thank you for reporting the issue, also my mass copr builds of pypi packages showed that this is very frequent problem. I am afraid it wil be not enough to return package from filter function package_to_path. Dash in the name of the package is sometimes replaced with underscore in directory name.
Python packages like "my-package" will be incorrectly translated as "my_package" in the generated SPEC.
This looks like a minor edge case but I recall having seen other packages with '-' in the past...
(Even though this is a bad package name and can't be loaded with "import", its still used here: https://github.com/hgrecco/pyvisa/blob/1.8/pyvisa/highlevel.py#L1413 )
Should the function in commit 7db699a just do
return package
instead? Givenpackage='pyvisa-py'
in this case came directly from setup.py (or from the dir itself) it should be assumed correct, so maybe the .replace() is sanitization that is in the wrong place...