Skip to content
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

FileExistsError with pylint 1.8.3 #106

Closed
rossburton opened this issue Mar 9, 2022 · 4 comments
Closed

FileExistsError with pylint 1.8.3 #106

rossburton opened this issue Mar 9, 2022 · 4 comments

Comments

@rossburton
Copy link

If I try and use installer to install the pylint 1.8.3 wheel I just built:

$ rm -rf foo
$ python3 -minstaller --destdir foo pylint-1.8.3-py2.py3-none-any.whl
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ross/Mess/installer/src/installer/__main__.py", line 84, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/home/ross/Mess/installer/src/installer/__main__.py", line 80, in _main
    installer.install(source, destination, {})
  File "/home/ross/Mess/installer/src/installer/_core.py", line 109, in install
    record = destination.write_file(
  File "/home/ross/Mess/installer/src/installer/destinations.py", line 203, in write_file
    return self.write_to_fs(
  File "/home/ross/Mess/installer/src/installer/destinations.py", line 167, in write_to_fs
    raise FileExistsError(message)
FileExistsError: File already exists: foo/usr/bin/epylint

(yes, this is an old release)

This is quite likely a pylint bug, especially as I fixed it by upgrading to the latest release, but pip will install the wheel fine so possibly installer should be doing something better to handle wheels like this.

@rossburton rossburton changed the title Cannot install pylint Cannot install old pylint Mar 9, 2022
@pradyunsg pradyunsg changed the title Cannot install old pylint FileExistsError with pylint 1.8.3 Mar 10, 2022
@FFY00
Copy link
Member

FFY00 commented Mar 10, 2022

So, the problem here is that the wheel defines both an entrypoint for epylint and a epylint script in .data/scripts.

@pradyunsg
Copy link
Member

🤦🏽‍♂️

Of course it does.

@pradyunsg
Copy link
Member

pip will install the wheel fine so possibly installer should be doing something better to handle wheels like this.

The fact that pip installs such wheels is considered a bug in pip -- pypa/pip#4625. I don't think this package should aim for bug-for-bug compatibility with pip.

@rossburton
Copy link
Author

Sounds perfectly reasonable to me. Thought I'd raise it as a difference, obviously bug-for-bug compatibility is exactly the opposite of what should be aimed for here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants