Skip to content

Commit

Permalink
Refactor installer to use pyproject.toml; Eliminate shlib as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Sep 10, 2022
1 parent 2201a27 commit d1ccb6b
Show file tree
Hide file tree
Showing 13 changed files with 1,132 additions and 74 deletions.
2 changes: 1 addition & 1 deletion clean
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ set nonomatch
rm -f *.pyc *.pyo */*.pyc */*.pyo .test*.sum expected result install.out
rm -rf build *.egg-info dist __pycache__ */__pycache__ .coverage
rm -rf tests/home/.python-eggs .eggs tests/.coverage htmlcov tests/htmlcov
rm -rf .cache tests/.cache tests/home/.cache .tox .hypothesis .pytest_cache
rm -rf .cache tests/.cache tests/home/.cache .tox .hypothesis .pytest_cache */.pytest_cache
2 changes: 1 addition & 1 deletion emborg/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
warn,
)
from quantiphy import Quantity, UnitConversion, QuantiPhyError
from shlib import (
from .shlib import (
Cmd, Run, cwd, mkdir, rm, set_prefs as set_shlib_prefs, split_cmd, to_path
)
from time import sleep
Expand Down
4 changes: 1 addition & 3 deletions emborg/overdue.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@
import pwd
import socket
from textwrap import dedent

import arrow
from docopt import docopt

from inform import (
Color,
Error,
Expand All @@ -61,11 +59,11 @@
terminate,
warn,
)
from shlib import Run, to_path, set_prefs as set_shlib_prefs

from . import __released__, __version__
from .preferences import CONFIG_DIR, DATA_DIR, OVERDUE_FILE, OVERDUE_LOG_FILE
from .python import PythonFile
from .shlib import Run, to_path, set_prefs as set_shlib_prefs

# Globals {{{1
set_shlib_prefs(use_inform=True, log_cmd=True)
Expand Down
2 changes: 1 addition & 1 deletion emborg/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Imports {{{1
from os.path import expanduser as expand_user
from inform import Error, error, log
from shlib import to_path
from .shlib import to_path


# Globals {{{1
Expand Down
1 change: 0 additions & 1 deletion emborg/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

# Imports {{{1
from textwrap import dedent

from appdirs import user_config_dir, user_data_dir

# Preferences {{{1
Expand Down
2 changes: 1 addition & 1 deletion emborg/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Imports {{{1
from inform import Error, display, full_stop, narrate, os_error
from shlib import cp, to_path
from .shlib import cp, to_path


# PythonFile class {{{1
Expand Down
5 changes: 2 additions & 3 deletions emborg/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
render,
warn,
)
from shlib import (
from .shlib import (
Run, cd, cwd, getmod, mv, render_command, rm, to_path,
set_prefs as set_shlib_prefs
)
Expand Down Expand Up @@ -730,8 +730,7 @@ def run_borg(
ends_at = arrow.now()
log("ends at: {!s}".format(ends_at))
log("elapsed = {!s}".format(ends_at - starts_at))
if borg.status:
narrate("Borg exit status:", borg.status)
narrate("Borg exit status:", borg.status)
if borg.status == 1 and borg.stderr:
warnings = borg.stderr.partition(72*'-')[0]
warn('warning emitted by Borg:', codicil=warnings)
Expand Down

0 comments on commit d1ccb6b

Please sign in to comment.