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

Editable mode fails to install in Python 3 #13

Open
buddly27 opened this issue Sep 28, 2020 · 1 comment
Open

Editable mode fails to install in Python 3 #13

buddly27 opened this issue Sep 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@buddly27
Copy link
Contributor

Package installation fails in editable mode when targeting Python 3

Traceback (most recent call last):
  File "/Users/jeremyr/.virtualenvs/qip-p38/bin/qip", line 33, in <module>
    sys.exit(load_entry_point('qip-installer', 'console_scripts', 'qip')())
  File "/Users/jeremyr/dev/github/qip/source/qip/__main__.py", line 8, in main
    qip.command_line.main(prog_name="qip")
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/jeremyr/dev/github/qip/source/qip/command_line.py", line 161, in install
    qip.install(
  File "/Users/jeremyr/dev/github/qip/source/qip/__init__.py", line 139, in install
    qip.definition.export(
  File "/Users/jeremyr/dev/github/qip/source/qip/definition.py", line 38, in export
    definition = qip.definition.retrieve(mapping)
  File "/Users/jeremyr/dev/github/qip/source/qip/definition.py", line 105, in retrieve
    mapping["location"], mapping["module_name"], "package_data", "wiz.json"
KeyError: 'location'

It seems to be because editable installation provides the easy-install.pth file without the site.py in Python 3. This leads the pip show command to fail to return metadata.

@buddly27
Copy link
Contributor Author

Setuptools 49.0.0 has indeed dropped installation of the site.py file.
https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v4900

I guess we should manually parse it to set the environment variable then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant