sysetup 1.3.5__tar.gz → 1.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sysetup-1.3.5/src/sysetup.egg-info → sysetup-1.3.6}/PKG-INFO +4 -4
- {sysetup-1.3.5 → sysetup-1.3.6}/README.md +2 -2
- {sysetup-1.3.5 → sysetup-1.3.6}/pyproject.toml +4 -5
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/context/context.py +3 -9
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/installations.py +7 -18
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/packages.py +5 -11
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/models/path.py +0 -6
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/utils/__init__.py +1 -0
- sysetup-1.3.6/src/sysetup/utils/installations.py +5 -0
- {sysetup-1.3.5 → sysetup-1.3.6/src/sysetup.egg-info}/PKG-INFO +4 -4
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup.egg-info/SOURCES.txt +1 -1
- sysetup-1.3.5/tests/test_installer.py +0 -15
- {sysetup-1.3.5 → sysetup-1.3.6}/LICENSE +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/bin/pw +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/bin/pw-askpass +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/setup.cfg +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/cli/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/cli/entry_point.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/context/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/environment.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/files/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/files/assets.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/files/permissions.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/files/settings.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/files/setup.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/main/main.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/models/__init__.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/models/action.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/models/options.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/py.typed +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup/utils/download.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup.egg-info/dependency_links.txt +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup.egg-info/entry_points.txt +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup.egg-info/requires.txt +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/src/sysetup.egg-info/top_level.txt +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/tests/test_background.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/tests/test_cli_entry_point.py +0 -0
- {sysetup-1.3.5 → sysetup-1.3.6}/tests/test_main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: sysetup
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Personal system setup
|
|
5
5
|
Author-email: Quinten Roets <qdr2104@columbia.edu>
|
|
6
6
|
License: MIT
|
|
@@ -25,14 +25,14 @@ Requires-Dist: package-dev-utils<1,>=0.1.6; extra == "dev"
|
|
|
25
25
|

|
|
26
26
|

|
|
27
27
|

|
|
28
|
-
## [Plasma](https://kde.org/plasma-desktop/)
|
|
28
|
+
## [Plasma](https://kde.org/plasma-desktop/) 6 required
|
|
29
29
|
|
|
30
30
|
[Setup info](docs/setup-plasma.md)
|
|
31
31
|
|
|
32
32
|
## Setup steps
|
|
33
33
|
1) Run
|
|
34
34
|
```shell
|
|
35
|
-
wget -O -
|
|
35
|
+
wget -O - sysetup.quintenroets.com | bash
|
|
36
36
|
```
|
|
37
37
|
give rclone password when prompted
|
|
38
38
|
2) Appearance
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
7
|
-
## [Plasma](https://kde.org/plasma-desktop/)
|
|
7
|
+
## [Plasma](https://kde.org/plasma-desktop/) 6 required
|
|
8
8
|
|
|
9
9
|
[Setup info](docs/setup-plasma.md)
|
|
10
10
|
|
|
11
11
|
## Setup steps
|
|
12
12
|
1) Run
|
|
13
13
|
```shell
|
|
14
|
-
wget -O -
|
|
14
|
+
wget -O - sysetup.quintenroets.com | bash
|
|
15
15
|
```
|
|
16
16
|
give rclone password when prompted
|
|
17
17
|
2) Appearance
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sysetup"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.6"
|
|
4
4
|
description = "Personal system setup"
|
|
5
5
|
authors = [{name = "Quinten Roets", email = "qdr2104@columbia.edu"}]
|
|
6
6
|
license = {text = "MIT"}
|
|
@@ -55,11 +55,10 @@ fix = true
|
|
|
55
55
|
[tool.ruff.lint]
|
|
56
56
|
select = ["ALL"]
|
|
57
57
|
ignore = [
|
|
58
|
-
"ANN101", # annotate self
|
|
59
|
-
"ANN102", # annotate cls
|
|
60
58
|
"ANN401", # annotated with Any
|
|
61
|
-
"D",
|
|
62
|
-
"
|
|
59
|
+
"D", # docstrings
|
|
60
|
+
"G004", # logging f-string
|
|
61
|
+
"S101", # assert used
|
|
63
62
|
]
|
|
64
63
|
|
|
65
64
|
[tool.ruff.lint.per-file-ignores]
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from collections.abc import Iterator
|
|
3
2
|
from functools import cached_property
|
|
4
3
|
|
|
5
|
-
import cli
|
|
6
4
|
from package_utils.context import Context as Context_
|
|
7
5
|
|
|
8
6
|
from sysetup.models import Options
|
|
7
|
+
from sysetup.utils import is_installed
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class Context(Context_[Options, None, None]):
|
|
12
11
|
@cached_property
|
|
13
12
|
def package_manager(self) -> str:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for package_manager in package_managers:
|
|
17
|
-
if cli.completes_successfully("which", package_manager):
|
|
18
|
-
yield package_manager
|
|
19
|
-
|
|
20
|
-
return next(generate_package_manager())
|
|
13
|
+
options = "apt-get", "pacman"
|
|
14
|
+
return next(option for option in options if is_installed(option))
|
|
21
15
|
|
|
22
16
|
@cached_property
|
|
23
17
|
def apt_is_installed(self) -> bool:
|
|
@@ -4,7 +4,7 @@ import cli
|
|
|
4
4
|
|
|
5
5
|
from sysetup.context import context
|
|
6
6
|
from sysetup.models import Path
|
|
7
|
-
from sysetup.utils import download_file
|
|
7
|
+
from sysetup.utils import download_file, is_installed
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def setup() -> None:
|
|
@@ -14,7 +14,6 @@ def setup() -> None:
|
|
|
14
14
|
enable_service("ydotoold")
|
|
15
15
|
enable_service("ssh")
|
|
16
16
|
install_language_support()
|
|
17
|
-
install_linter_env()
|
|
18
17
|
install_personal_git_repositories()
|
|
19
18
|
|
|
20
19
|
|
|
@@ -26,7 +25,7 @@ def install_personal_git_repositories() -> None:
|
|
|
26
25
|
if not Path.extensions.exists():
|
|
27
26
|
command = f"git clone {base_url}/extensions.git"
|
|
28
27
|
cli.run(command, Path.extensions)
|
|
29
|
-
cli.run(f"pip install git+{base_url}/system.git")
|
|
28
|
+
cli.run(f"uv pip install git+{base_url}/system.git")
|
|
30
29
|
|
|
31
30
|
|
|
32
31
|
def install_language_support() -> None:
|
|
@@ -40,7 +39,7 @@ def install_language_support() -> None:
|
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
def install_chromium() -> None:
|
|
43
|
-
if not
|
|
42
|
+
if not is_installed("chromium-browser"):
|
|
44
43
|
_install_chromium()
|
|
45
44
|
|
|
46
45
|
|
|
@@ -57,15 +56,8 @@ def _install_chromium() -> None:
|
|
|
57
56
|
cli.run_commands(*commands, shell=True, root=True, check=check) # noqa: S604
|
|
58
57
|
|
|
59
58
|
|
|
60
|
-
def install_linter_env() -> None:
|
|
61
|
-
if not Path.linter_env.exists():
|
|
62
|
-
cli.run("python -m venv", Path.linter_env.name, cwd=Path.linter_env.parent)
|
|
63
|
-
python_path = Path.linter_env / "bin" / "python"
|
|
64
|
-
cli.run(f"{python_path} -m pip install autoimport powertrace-hooks")
|
|
65
|
-
|
|
66
|
-
|
|
67
59
|
def install_keyd() -> None:
|
|
68
|
-
install_repository("keyd", "
|
|
60
|
+
install_repository("keyd", "rvaiya/keyd")
|
|
69
61
|
enable_service("keyd")
|
|
70
62
|
|
|
71
63
|
|
|
@@ -75,12 +67,9 @@ def enable_service(name: str) -> None:
|
|
|
75
67
|
cli.run(command, root=True)
|
|
76
68
|
|
|
77
69
|
|
|
78
|
-
def install_repository(name: str, repository: str
|
|
79
|
-
if not
|
|
70
|
+
def install_repository(name: str, repository: str) -> None:
|
|
71
|
+
if not is_installed(name):
|
|
80
72
|
url = f"https://github.com/{repository}"
|
|
81
|
-
command: tuple[str, ...] = "git clone", url
|
|
82
|
-
if branch is not None:
|
|
83
|
-
command = (*command, "-b", branch)
|
|
84
73
|
with Path.tempdir() as directory:
|
|
85
|
-
cli.run(
|
|
74
|
+
cli.run("git clone", url, directory)
|
|
86
75
|
cli.run_commands("make", "sudo make install", cwd=directory)
|
|
@@ -2,7 +2,7 @@ import cli
|
|
|
2
2
|
|
|
3
3
|
from sysetup.context import context
|
|
4
4
|
from sysetup.models import Path
|
|
5
|
-
from sysetup.utils import download_directory
|
|
5
|
+
from sysetup.utils import download_directory, is_installed
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def setup() -> None:
|
|
@@ -20,10 +20,7 @@ def install_packages() -> None:
|
|
|
20
20
|
cli.install(*packages, install_command=command)
|
|
21
21
|
|
|
22
22
|
if not context.apt_is_installed:
|
|
23
|
-
commands =
|
|
24
|
-
"sudo pacman -S --noconfirm python-pip base-devel",
|
|
25
|
-
"pip install wheel",
|
|
26
|
-
)
|
|
23
|
+
commands = "sudo pacman -S --noconfirm base-devel", "uv pip install wheel"
|
|
27
24
|
cli.run_commands(*commands)
|
|
28
25
|
|
|
29
26
|
|
|
@@ -39,7 +36,7 @@ def update_apt() -> None:
|
|
|
39
36
|
"ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true"
|
|
40
37
|
)
|
|
41
38
|
agree_eula_command = f'echo "{value}" | sudo debconf-set-selections'
|
|
42
|
-
commands =
|
|
39
|
+
commands = "sudo apt-get update", agree_eula_command
|
|
43
40
|
cli.run_commands_in_shell(*commands)
|
|
44
41
|
if not Path("/snap").exists():
|
|
45
42
|
cli.run("ln -s /var/lib/snapd/snap /snap", root=True)
|
|
@@ -49,11 +46,8 @@ def cleanup_after_install() -> None:
|
|
|
49
46
|
if context.apt_is_installed:
|
|
50
47
|
cli.run("sudo apt-get autoremove -y")
|
|
51
48
|
cli.run("tlp start", root=True)
|
|
52
|
-
if
|
|
53
|
-
commands =
|
|
54
|
-
"rm /usr/bin/qdbus",
|
|
55
|
-
"ln -s /usr/lib/qt6/bin/qdbus /usr/bin/qdbus",
|
|
56
|
-
)
|
|
49
|
+
if is_installed("qdbus"):
|
|
50
|
+
commands = "rm /usr/bin/qdbus", "ln -s /usr/lib/qt6/bin/qdbus /usr/bin/qdbus"
|
|
57
51
|
cli.run_commands(*commands, root=True)
|
|
58
52
|
delete = "apt purge -y" if context.apt_is_installed else "pacman -R --noconfirm"
|
|
59
53
|
commands = (
|
|
@@ -30,12 +30,6 @@ class Path(superpathlib.Path):
|
|
|
30
30
|
path = cls.assets / "packages"
|
|
31
31
|
return cast(T, path)
|
|
32
32
|
|
|
33
|
-
@classmethod
|
|
34
|
-
@classproperty
|
|
35
|
-
def linter_env(cls: type[T]) -> T:
|
|
36
|
-
path = cls.HOME / ".local" / "share" / "envs" / "linterenv"
|
|
37
|
-
return cast(T, path)
|
|
38
|
-
|
|
39
33
|
@classmethod
|
|
40
34
|
@classproperty
|
|
41
35
|
def extensions(cls: type[T]) -> T:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: sysetup
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Personal system setup
|
|
5
5
|
Author-email: Quinten Roets <qdr2104@columbia.edu>
|
|
6
6
|
License: MIT
|
|
@@ -25,14 +25,14 @@ Requires-Dist: package-dev-utils<1,>=0.1.6; extra == "dev"
|
|
|
25
25
|

|
|
26
26
|

|
|
27
27
|

|
|
28
|
-
## [Plasma](https://kde.org/plasma-desktop/)
|
|
28
|
+
## [Plasma](https://kde.org/plasma-desktop/) 6 required
|
|
29
29
|
|
|
30
30
|
[Setup info](docs/setup-plasma.md)
|
|
31
31
|
|
|
32
32
|
## Setup steps
|
|
33
33
|
1) Run
|
|
34
34
|
```shell
|
|
35
|
-
wget -O -
|
|
35
|
+
wget -O - sysetup.quintenroets.com | bash
|
|
36
36
|
```
|
|
37
37
|
give rclone password when prompted
|
|
38
38
|
2) Appearance
|
|
@@ -31,7 +31,7 @@ src/sysetup/models/options.py
|
|
|
31
31
|
src/sysetup/models/path.py
|
|
32
32
|
src/sysetup/utils/__init__.py
|
|
33
33
|
src/sysetup/utils/download.py
|
|
34
|
+
src/sysetup/utils/installations.py
|
|
34
35
|
tests/test_background.py
|
|
35
36
|
tests/test_cli_entry_point.py
|
|
36
|
-
tests/test_installer.py
|
|
37
37
|
tests/test_main.py
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from unittest.mock import PropertyMock, patch
|
|
2
|
-
|
|
3
|
-
import cli
|
|
4
|
-
|
|
5
|
-
from sysetup.main.installations import install_linter_env
|
|
6
|
-
from sysetup.models import Path
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def test_linter_env() -> None:
|
|
10
|
-
with Path.tempfile(create=False) as path:
|
|
11
|
-
mocked_path = PropertyMock(return_value=path)
|
|
12
|
-
with patch.object(Path, "linter_env", new_callable=mocked_path):
|
|
13
|
-
install_linter_env()
|
|
14
|
-
python_path = Path.linter_env / "bin" / "python"
|
|
15
|
-
cli.run(f"{python_path} -m pip show autoimport")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|