python3-cyberfusion-systemd-support 1.1.1.2__tar.gz → 2.0.0__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 (16) hide show
  1. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/PKG-INFO +4 -11
  2. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/README.md +0 -6
  3. python3_cyberfusion_systemd_support-2.0.0/pyproject.toml +18 -0
  4. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/cyberfusion/SystemdSupport/tmp_files.py +1 -3
  5. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/cyberfusion/SystemdSupport/units.py +9 -7
  6. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/python3_cyberfusion_systemd_support.egg-info/PKG-INFO +4 -11
  7. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/python3_cyberfusion_systemd_support.egg-info/SOURCES.txt +0 -1
  8. python3-cyberfusion-systemd-support-1.1.1.2/pyproject.toml +0 -21
  9. python3-cyberfusion-systemd-support-1.1.1.2/setup.py +0 -26
  10. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/setup.cfg +0 -0
  11. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/cyberfusion/SystemdSupport/__init__.py +0 -0
  12. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/cyberfusion/SystemdSupport/_constants.py +0 -0
  13. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/cyberfusion/SystemdSupport/manager.py +0 -0
  14. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/python3_cyberfusion_systemd_support.egg-info/dependency_links.txt +0 -0
  15. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/python3_cyberfusion_systemd_support.egg-info/requires.txt +0 -0
  16. {python3-cyberfusion-systemd-support-1.1.1.2 → python3_cyberfusion_systemd_support-2.0.0}/src/python3_cyberfusion_systemd_support.egg-info/top_level.txt +0 -0
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-cyberfusion-systemd-support
3
- Version: 1.1.1.2
3
+ Version: 2.0.0
4
4
  Summary: Library for systemd.
5
- Home-page: https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
6
- Author: Cyberfusion
7
- Author-email: support@cyberfusion.io
8
- Platform: linux
5
+ Author-email: Cyberfusion <support@cyberfusion.io>
6
+ Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
9
7
  Description-Content-Type: text/markdown
8
+ Requires-Dist: python3-cyberfusion-common~=2.0
10
9
 
11
10
  # python3-cyberfusion-systemd-support
12
11
 
@@ -20,12 +19,6 @@ Run the following command to install the package from PyPI:
20
19
 
21
20
  pip3 install python3-cyberfusion-systemd-support
22
21
 
23
- ## Generic
24
-
25
- Run the following command to create a source distribution:
26
-
27
- python3 setup.py sdist
28
-
29
22
  Next, ensure you are working on a system that ships systemd.
30
23
 
31
24
  ## Debian
@@ -10,12 +10,6 @@ Run the following command to install the package from PyPI:
10
10
 
11
11
  pip3 install python3-cyberfusion-systemd-support
12
12
 
13
- ## Generic
14
-
15
- Run the following command to create a source distribution:
16
-
17
- python3 setup.py sdist
18
-
19
13
  Next, ensure you are working on a system that ships systemd.
20
14
 
21
15
  ## Debian
@@ -0,0 +1,18 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "python3-cyberfusion-systemd-support"
7
+ version = "2.0.0"
8
+ description = "Library for systemd."
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "Cyberfusion", email = "support@cyberfusion.io" },
12
+ ]
13
+ dependencies = [
14
+ "python3-cyberfusion-common~=2.0",
15
+ ]
16
+
17
+ [project.urls]
18
+ "Source" = "https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support"
@@ -16,9 +16,7 @@ class TmpFileConfigurationFile:
16
16
 
17
17
  def create(self) -> None:
18
18
  """Create tmp files."""
19
- subprocess.run(
20
- [SYSTEMCTL_TMPFILES_BIN, "--create", self.path], check=True
21
- )
19
+ subprocess.run([SYSTEMCTL_TMPFILES_BIN, "--create", self.path], check=True)
22
20
 
23
21
 
24
22
  class TmpFileConfigurationLine:
@@ -12,6 +12,9 @@ from cyberfusion.SystemdSupport.manager import SystemdManager
12
12
  F = TypeVar("F", bound=Callable[..., None])
13
13
 
14
14
 
15
+ BASE_DIRECTORY_SYSTEMD_UNITS = os.path.join(os.path.sep, "etc", "systemd", "system")
16
+
17
+
15
18
  def reload_manager(f: F) -> F:
16
19
  """Reload manager configuration if needed.."""
17
20
 
@@ -34,10 +37,6 @@ class Unit:
34
37
 
35
38
  SUFFIX_SERVICE = "service"
36
39
 
37
- DIRECTORY_SYSTEMD_OVERRIDE = os.path.join(
38
- os.path.sep, "etc", "systemd", "system"
39
- )
40
-
41
40
  def __init__(self, name: str) -> None:
42
41
  """Set attributes."""
43
42
  self.name = name
@@ -59,9 +58,7 @@ class Unit:
59
58
  @property
60
59
  def drop_in_directory(self) -> str:
61
60
  """Get path to drop-in directory."""
62
- return os.path.join(
63
- os.path.sep, "etc", "systemd", "system", self.name + ".d"
64
- )
61
+ return self.get_drop_in_directory(self.name)
65
62
 
66
63
  @property
67
64
  def needs_reload(self) -> bool:
@@ -139,3 +136,8 @@ class Unit:
139
136
  return False
140
137
 
141
138
  return True
139
+
140
+ @staticmethod
141
+ def get_drop_in_directory(unit_name: str) -> str:
142
+ """Get unit override directory."""
143
+ return os.path.join(BASE_DIRECTORY_SYSTEMD_UNITS, unit_name + ".d")
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-cyberfusion-systemd-support
3
- Version: 1.1.1.2
3
+ Version: 2.0.0
4
4
  Summary: Library for systemd.
5
- Home-page: https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
6
- Author: Cyberfusion
7
- Author-email: support@cyberfusion.io
8
- Platform: linux
5
+ Author-email: Cyberfusion <support@cyberfusion.io>
6
+ Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
9
7
  Description-Content-Type: text/markdown
8
+ Requires-Dist: python3-cyberfusion-common~=2.0
10
9
 
11
10
  # python3-cyberfusion-systemd-support
12
11
 
@@ -20,12 +19,6 @@ Run the following command to install the package from PyPI:
20
19
 
21
20
  pip3 install python3-cyberfusion-systemd-support
22
21
 
23
- ## Generic
24
-
25
- Run the following command to create a source distribution:
26
-
27
- python3 setup.py sdist
28
-
29
22
  Next, ensure you are working on a system that ships systemd.
30
23
 
31
24
  ## Debian
@@ -1,7 +1,6 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  setup.cfg
4
- setup.py
5
4
  src/cyberfusion/SystemdSupport/__init__.py
6
5
  src/cyberfusion/SystemdSupport/_constants.py
7
6
  src/cyberfusion/SystemdSupport/manager.py
@@ -1,21 +0,0 @@
1
- [tool.isort]
2
- profile = "black"
3
- line_length = 79
4
- known_first_party = ["cyberfusion"]
5
- default_section = "THIRDPARTY"
6
-
7
- [tool.black]
8
- line-length = 79
9
- exclude = '''
10
- (
11
- /(
12
- \.eggs # exclude a few common directories in the
13
- | \.git # root of the project
14
- | \.hg
15
- | \.mypy_cache
16
- | \.tox
17
- | \.venv
18
- | venv
19
- )/
20
- )
21
- '''
@@ -1,26 +0,0 @@
1
- """A setuptools based setup module."""
2
-
3
- from setuptools import setup
4
-
5
- with open("README.md", "r", encoding="utf-8") as fh:
6
- long_description = fh.read()
7
-
8
- setup(
9
- name="python3-cyberfusion-systemd-support",
10
- version="1.1.1.2",
11
- description="Library for systemd.",
12
- long_description=long_description,
13
- long_description_content_type="text/markdown",
14
- author="Cyberfusion",
15
- author_email="support@cyberfusion.io",
16
- url="https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support",
17
- platforms=["linux"],
18
- packages=[
19
- "cyberfusion.SystemdSupport",
20
- ],
21
- package_dir={"": "src"},
22
- data_files=[],
23
- install_requires=[
24
- "python3-cyberfusion-common~=2.0",
25
- ],
26
- )