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

The shared directory is not installed when building on Windows #131

Open
martinling opened this issue Jul 9, 2024 · 3 comments
Open

The shared directory is not installed when building on Windows #131

martinling opened this issue Jul 9, 2024 · 3 comments
Assignees
Labels

Comments

@martinling
Copy link
Member

When the repository is checked out on Windows with the default Git settings, the symbolic link from cynthion\python\src\shared is not reproduced as a symbolic link, so the shared directory is not installed.

This results in an error at import time:

C:\Users\Martin\Documents\cynthion>cynthion info
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Martin\AppData\Roaming\Python\Python312\Scripts\cynthion.exe\__main__.py", line 4, in <module>
  File "C:\Users\Martin\AppData\Roaming\Python\Python312\site-packages\cynthion\__init__.py", line 16, in <module>
    from .cynthion import Cynthion
  File "C:\Users\Martin\AppData\Roaming\Python\Python312\site-packages\cynthion\cynthion.py", line 5, in <module>
    from .board import CynthionBoard
  File "C:\Users\Martin\AppData\Roaming\Python\Python312\site-packages\cynthion\board.py", line 17, in <module>
    from .shared import usb
ImportError: cannot import name 'usb' from 'cynthion.shared' (C:\Users\Martin\AppData\Roaming\Python\Python312\site-packages\cynthion\shared.py)

There is no problem when using the currently released wheels, this only happens when installing from git on Windows.

@martinling martinling added the bug label Jul 9, 2024
@antoinevg antoinevg self-assigned this Jul 9, 2024
@mossmann
Copy link
Member

It is possible to enable symlinks on Windows:
https://www.scivision.dev/git-windows-symlink/

@antoinevg
Copy link
Member

Cynthion docs have been updated with instructions: https://cynthion.readthedocs.io/en/latest/developer/introduction.html

@martinling
Copy link
Member Author

If there isn't a non-symlink solution here, and the resolution is to require developers to enable symlinks on Windows, can we check at build time that this has been done and that the symlink is present?

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

No branches or pull requests

3 participants