-
Notifications
You must be signed in to change notification settings - Fork 96
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
Make setup.py
OS-agnostic and replace fcntl
with an OS-agnostic alternative
#1670
Comments
setup.py
OS-agnostic and replace fcntl
with an OS-agnostic alternative
where a possible fix would be: from os import path
home_dir = os.environ.get('HOME') or os.environ.get('USERPROFILE')
path.join(home_dir, ".config/covalent") A workaround is:
I realize Windows isn't officially supported, but wanted to leave this here for provenance. |
What should we add?
Setting aside some potential UI challenges, if you want to make Covalent
Electron
objects compatible with Windows (e.g. to use as regular functions), I don't think it's all that difficult.The first change is to modify
open("README.md").read()
to beopen("README.md", encoding="utf8").read()
below so the Windows user canpip install covalent
.covalent/setup.py
Line 209 in 90d1560
Edit: This was merged in #1685.
The second change is to use an OS-agnostic locking mechanism in place of
fcntl
below so the config file can be properly written. Portalocker is one such option, which is basically a drop-in replacement offcntl.lockf(f, fcntl.LOCK_EX)
withportalocker.lock(f, portalocker.LOCK_EX)
.covalent/covalent/_shared_files/config.py
Lines 112 to 148 in 90d1560
Once those two changes are made, you can import/use
Electron
objects as normal functions on Windows.Describe alternatives you've considered.
No response
The text was updated successfully, but these errors were encountered: