Skip to content

Commit

Permalink
Merge pull request #93 from pieces-app/remove_lib
Browse files Browse the repository at this point in the history
Remove lib
  • Loading branch information
bishoy-at-pieces authored Nov 14, 2024
2 parents 1ebf000 + 82d922f commit af4d0e2
Show file tree
Hide file tree
Showing 804 changed files with 48 additions and 177,474 deletions.
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

0 comments on commit af4d0e2

Please sign in to comment.