sysetup 1.4.1__tar.gz → 1.4.2__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.
Files changed (40) hide show
  1. {sysetup-1.4.1/src/sysetup.egg-info → sysetup-1.4.2}/PKG-INFO +5 -9
  2. {sysetup-1.4.1 → sysetup-1.4.2}/README.md +4 -8
  3. {sysetup-1.4.1 → sysetup-1.4.2}/pyproject.toml +1 -1
  4. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/context/context.py +3 -2
  5. sysetup-1.4.2/src/sysetup/context/secrets_.py +10 -0
  6. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/installations.py +13 -0
  7. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/utils/bitwarden.py +7 -2
  8. {sysetup-1.4.1 → sysetup-1.4.2/src/sysetup.egg-info}/PKG-INFO +5 -9
  9. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup.egg-info/SOURCES.txt +1 -0
  10. {sysetup-1.4.1 → sysetup-1.4.2}/LICENSE +0 -0
  11. {sysetup-1.4.1 → sysetup-1.4.2}/bin/pw +0 -0
  12. {sysetup-1.4.1 → sysetup-1.4.2}/bin/pw-askpass +0 -0
  13. {sysetup-1.4.1 → sysetup-1.4.2}/setup.cfg +0 -0
  14. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/__init__.py +0 -0
  15. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/cli/__init__.py +0 -0
  16. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/cli/entry_point.py +0 -0
  17. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/context/__init__.py +0 -0
  18. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/context/action.py +0 -0
  19. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/context/installations.py +0 -0
  20. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/context/options.py +0 -0
  21. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/__init__.py +0 -0
  22. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/files/__init__.py +0 -0
  23. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/files/assets.py +0 -0
  24. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/files/permissions.py +0 -0
  25. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/files/settings.py +0 -0
  26. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/files/setup.py +0 -0
  27. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/main.py +0 -0
  28. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/main/packages.py +0 -0
  29. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/models/__init__.py +0 -0
  30. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/models/path.py +0 -0
  31. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/py.typed +0 -0
  32. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/utils/__init__.py +0 -0
  33. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup/utils/download.py +0 -0
  34. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup.egg-info/dependency_links.txt +0 -0
  35. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup.egg-info/entry_points.txt +0 -0
  36. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup.egg-info/requires.txt +0 -0
  37. {sysetup-1.4.1 → sysetup-1.4.2}/src/sysetup.egg-info/top_level.txt +0 -0
  38. {sysetup-1.4.1 → sysetup-1.4.2}/tests/test_background.py +0 -0
  39. {sysetup-1.4.1 → sysetup-1.4.2}/tests/test_cli_entry_point.py +0 -0
  40. {sysetup-1.4.1 → sysetup-1.4.2}/tests/test_main.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sysetup
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: Personal system setup
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT
@@ -40,14 +40,10 @@ Dynamic: license-file
40
40
  * Set wallpaper
41
41
  * Select We10OSX Cursors
42
42
  3) Configure autocpufreq
43
- 4) Setup Chrome
44
- * Enable GPU acceleration in chrome://flags
45
- * PDF viewer: set page zoom to page fit
46
- * Import certificate from Scripts/assets/sysetup/certificates/certificate.crt
47
- * Click experimental: enable tab groups save and sync
48
- 5) Login to
49
- * Pycharm professional
50
- 6) For new device: set touchpad scroll direction and click on touch
43
+ 4) Login to Pycharm professional
44
+ 5) For new device: configure mousepad
45
+ * natural touchpad scroll direction
46
+ * click on touch
51
47
 
52
48
  ## Installation
53
49
  ```shell
@@ -18,14 +18,10 @@
18
18
  * Set wallpaper
19
19
  * Select We10OSX Cursors
20
20
  3) Configure autocpufreq
21
- 4) Setup Chrome
22
- * Enable GPU acceleration in chrome://flags
23
- * PDF viewer: set page zoom to page fit
24
- * Import certificate from Scripts/assets/sysetup/certificates/certificate.crt
25
- * Click experimental: enable tab groups save and sync
26
- 5) Login to
27
- * Pycharm professional
28
- 6) For new device: set touchpad scroll direction and click on touch
21
+ 4) Login to Pycharm professional
22
+ 5) For new device: configure mousepad
23
+ * natural touchpad scroll direction
24
+ * click on touch
29
25
 
30
26
  ## Installation
31
27
  ```shell
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sysetup"
3
- version = "1.4.1"
3
+ version = "1.4.2"
4
4
  description = "Personal system setup"
5
5
  authors = [{name = "Quinten Roets", email = "qdr2104@columbia.edu"}]
6
6
  license = "MIT"
@@ -5,9 +5,10 @@ from package_utils.context import Context as Context_
5
5
 
6
6
  from .installations import is_installed
7
7
  from .options import Options
8
+ from .secrets_ import Secrets
8
9
 
9
10
 
10
- class Context(Context_[Options, None, None]):
11
+ class Context(Context_[Options, None, Secrets]):
11
12
  @cached_property
12
13
  def package_manager(self) -> str:
13
14
  options = "apt-get", "pacman"
@@ -22,4 +23,4 @@ class Context(Context_[Options, None, None]):
22
23
  return "DISPLAY" not in os.environ
23
24
 
24
25
 
25
- context = Context(Options)
26
+ context = Context(Options, Secrets=Secrets)
@@ -0,0 +1,10 @@
1
+ import os
2
+ from dataclasses import dataclass, field
3
+
4
+
5
+ @dataclass
6
+ class Secrets:
7
+ bw_clientid: str = field(default_factory=lambda: os.environ.get("BW_CLIENTID", ""))
8
+ bw_clientsecret: str = field(
9
+ default_factory=lambda: os.environ.get("BW_CLIENTSECRET", ""),
10
+ )
@@ -51,6 +51,19 @@ def _install_chromium() -> None:
51
51
  )
52
52
  check = not context.is_running_in_test
53
53
  cli.run_commands(*commands, shell=True, root=True, check=check) # noqa: S604
54
+ install_custom_certificate()
55
+
56
+
57
+ def install_custom_certificate() -> None:
58
+ install(["libnss3-tools"])
59
+ certificate_directory = Path.HOME / ".pki" / "nssdb"
60
+ certificate_file = Path.assets / "certificates" / "certificate.crt"
61
+ command = (
62
+ f"certutil -d sql:{certificate_directory} "
63
+ f'-A -t "C,," -n "QCA" -i {certificate_file}'
64
+ )
65
+ if not context.is_running_in_test:
66
+ cli.run(command)
54
67
 
55
68
 
56
69
  def install_keyd() -> None:
@@ -29,8 +29,13 @@ class Client:
29
29
  def session_token(self) -> str:
30
30
  if not Path("bw").exists():
31
31
  self.download_cli()
32
- output = cli.capture_output(f"./bw login {self.email} {self.password}")
33
- return output.split("--session ")[-1]
32
+ command: tuple[str, ...]
33
+ if context.secrets.bw_clientid:
34
+ cli.run("./bw login --apikey")
35
+ command = "./bw unlock --raw", self.password
36
+ else:
37
+ command = "./bw login --raw", self.email, self.password
38
+ return cli.capture_output(*command)
34
39
 
35
40
  def download_cli(self) -> None:
36
41
  response = requests.get(self.download_url, timeout=10).content
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sysetup
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: Personal system setup
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT
@@ -40,14 +40,10 @@ Dynamic: license-file
40
40
  * Set wallpaper
41
41
  * Select We10OSX Cursors
42
42
  3) Configure autocpufreq
43
- 4) Setup Chrome
44
- * Enable GPU acceleration in chrome://flags
45
- * PDF viewer: set page zoom to page fit
46
- * Import certificate from Scripts/assets/sysetup/certificates/certificate.crt
47
- * Click experimental: enable tab groups save and sync
48
- 5) Login to
49
- * Pycharm professional
50
- 6) For new device: set touchpad scroll direction and click on touch
43
+ 4) Login to Pycharm professional
44
+ 5) For new device: configure mousepad
45
+ * natural touchpad scroll direction
46
+ * click on touch
51
47
 
52
48
  ## Installation
53
49
  ```shell
@@ -18,6 +18,7 @@ src/sysetup/context/action.py
18
18
  src/sysetup/context/context.py
19
19
  src/sysetup/context/installations.py
20
20
  src/sysetup/context/options.py
21
+ src/sysetup/context/secrets_.py
21
22
  src/sysetup/main/__init__.py
22
23
  src/sysetup/main/installations.py
23
24
  src/sysetup/main/main.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes