-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from pieces-app/remove_lib
Remove lib
- Loading branch information
Showing
804 changed files
with
48 additions
and
177,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.