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 installs with src in 3.5.0 #471

Closed
bollwyvl opened this issue Nov 22, 2021 · 7 comments · Fixed by #472
Closed

Editable installs with src in 3.5.0 #471

bollwyvl opened this issue Nov 22, 2021 · 7 comments · Fixed by #472
Milestone

Comments

@bollwyvl
Copy link

Thanks for flit, and congrats on 3.5.0!

Using a src/<module>/__init__.py layout, I am, however, seeing some odd behavior with editable installs on flit(-core) 3.5.0:

flint install --symlink --deps=none

Symlinking src/jupyterlite -> ~/envs/default/lib/python3.9/site-packages/src/jupyterlite  I-flit.install
Traceback (most recent call last):
  File "~/envs/default/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "~/envs/default/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "~/envs/default/lib/python3.9/site-packages/flit/__main__.py", line 5, in <module>
    main()
  File "~/envs/default/lib/python3.9/site-packages/flit/__init__.py", line 200, in main
    Installer.from_ini_path(args.ini_file, user=args.user, python=python,
  File "~/envs/default/lib/python3.9/site-packages/flit/install.py", line 416, in install
    self.install_directly()
  File "~/envs/default/lib/python3.9/site-packages/flit/install.py", line 312, in install_directly
    os.symlink(src.resolve(), dst)
FileNotFoundError: [Errno 2] No such file or directory: '~/jupyterlite/py/jupyterlite/src/jupyterlite' -> '~/envs/default/lib/python3.9/site-packages/src/jupyterlite'

  • presumably failing because site-packages/src does not exist

flit install --pth-file --deps=none

Adding .pth file ~/envs/default/lib/python3.9/site-packages/jupyterlite.pth for src  I-flit.install
Writing script to ~/envs/default/bin/jupyter-lite  I-flit.install
  • just exhibits no module named jupyterlite when importing, running CLI, etc.

Meanwhile... reverting to flit 3.4.0 does not have this issue:

Symlinking src/jupyterlite -> ~/envs/default/lib/python3.9/site-packages/jupyterlite  I-flit.install
Writing script to ~/envs/default/bin/jupyter-lite  I-flit.install
Adding .pth file ~/envs/default/lib/python3.9/site-packages/jupyterlite.pth for ~/jupyterlite/py/jupyterlite/src  I-flit.install
Writing script to ~/envs/default/bin/jupyter-lite  I-flit.install
@bollwyvl bollwyvl changed the title Editable installs in 3.5.0 Editable installs with src in 3.5.0 Nov 22, 2021
@takluyver
Copy link
Member

Sorry about that. It will be the changes in #468 that broke it.

@takluyver
Copy link
Member

#472 should fix this.

@bollwyvl
Copy link
Author

Fantastic turn-around, thanks!

@takluyver takluyver added this to the 3.5.1 milestone Nov 23, 2021
@bollwyvl
Copy link
Author

bollwyvl commented Nov 23, 2021 via email

@takluyver
Copy link
Member

I hope so: 3.5.1 is out now and should fix this. Feel free to open a new issue, or comment here, if there are still problems.

@bollwyvl
Copy link
Author

Sounds great, and thanks again. My CI will be testing it out as soon as conda-forge/flit-feedstock#32 lands! It's great to see src under test, going forward.

@bollwyvl
Copy link
Author

(actually, will be testing the PyPI version before that, locally)

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

Successfully merging a pull request may close this issue.

2 participants