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

Remove lib #93

Merged
merged 9 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 24 additions & 1 deletion rplugin/python3/pieces_python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
from .main import Pieces
from ._version import __version__
import pynvim
import pip

def update_sdks():
pip.main(["install","pieces_os_client","--upgrade"])


try:
from pieces_os_client import __version__ as pieces_os_client_version

try: # If there is any issue in the version checker then it is outdated
from pieces_os_client.wrapper.version_compatibility import VersionChecker
VersionChecker.compare("1.0.0","1.0.0") # Check also that the compare is working too
except (AttributeError, ModuleNotFoundError):
update_sdks()
raise ModuleNotFoundError

if VersionChecker.compare(pieces_os_client_version,"4.0.3") < 0: # We need to be above 4.0.0
update_sdks()
raise ModuleNotFoundError
from .main import Pieces
except ModuleNotFoundError:
pip.main(["install","pieces_os_client"])
from .main import Pieces
Loading