Skip to content

Commit

Permalink
deploy: 9a220a5
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Oct 27, 2023
1 parent a89e442 commit 75d5885
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions dump_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# NOTE: Run `pdm add -G dev -e ../dc_schema` first.
from pathlib import Path

import orjson
Expand Down
22 changes: 17 additions & 5 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

GITHUB = 'https://github.com/dipdup-io/dipdup.git'
WHICH_CMDS = (
'bash',
'python3.11',
'pipx',
'dipdup',
Expand All @@ -27,6 +26,12 @@
'pyvenv',
'pyenv',
)
ENV_VARS = (
'SHELL',
'VIRTUAL_ENV',
'PATH',
'PYTHONPATH',
)

WELCOME_ASCII = """\0
____ _ ____
Expand Down Expand Up @@ -68,7 +73,8 @@ def done(msg: str) -> NoReturn:


# NOTE: DipDup has `tabulate` dep, don't use this one elsewhere
def _tab(text: str, indent: int = 20) -> str:
# NOTE: Weird default is to match indentation in `EPILOG`.
def _tab(text: str, indent: int = 23) -> str:
return text + ' ' * (indent - len(text))


Expand All @@ -91,14 +97,20 @@ def print(self) -> None:
print(WELCOME_ASCII)
print(EPILOG)
print()

print(_tab('OS:') + f'{self._os} ({self._arch})')
print(_tab('Python:') + sys.version)
print(_tab('PATH:') + os.environ['PATH'])
print(_tab('PYTHONPATH:') + os.environ.get('PYTHONPATH', ''))
print()

for var in ENV_VARS:
if var in os.environ:
print(_tab(var + ':') + os.environ[var])
print()

for command, path in self._commands.items():
print(_tab(f'{command}:') + (path or ''))
print(_tab('pipx packages:') + ', '.join(self._pipx_packages) + '\n')
print(_tab('pipx packages:') + ', '.join(self._pipx_packages))
print()

def refresh_pipx(self) -> None:
"""Get installed pipx packages"""
Expand Down

0 comments on commit 75d5885

Please sign in to comment.