python3-cyberfusion-common 2.10.11.3.2__tar.gz → 2.11__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-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/PKG-INFO +6 -11
  2. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/README.md +0 -6
  3. python3_cyberfusion_common-2.11/pyproject.toml +20 -0
  4. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/cyberfusion/Common/Filesystem.py +1 -3
  5. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/cyberfusion/Common/__init__.py +10 -6
  6. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/python3_cyberfusion_common.egg-info/PKG-INFO +6 -11
  7. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/python3_cyberfusion_common.egg-info/SOURCES.txt +0 -1
  8. python3-cyberfusion-common-2.10.11.3.2/pyproject.toml +0 -21
  9. python3-cyberfusion-common-2.10.11.3.2/setup.py +0 -26
  10. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/setup.cfg +0 -0
  11. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/cyberfusion/Common/Config.py +0 -0
  12. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/cyberfusion/Common/FilesystemComparison.py +0 -0
  13. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/cyberfusion/Common/exceptions/__init__.py +0 -0
  14. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/python3_cyberfusion_common.egg-info/dependency_links.txt +0 -0
  15. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/python3_cyberfusion_common.egg-info/requires.txt +0 -0
  16. {python3-cyberfusion-common-2.10.11.3.2 → python3_cyberfusion_common-2.11}/src/python3_cyberfusion_common.egg-info/top_level.txt +0 -0
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-cyberfusion-common
3
- Version: 2.10.11.3.2
3
+ Version: 2.11
4
4
  Summary: Common utilities.
5
- Home-page: https://github.com/CyberfusionIO/python3-cyberfusion-common
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-common
9
7
  Description-Content-Type: text/markdown
8
+ Requires-Dist: cached_property==1.5.2
9
+ Requires-Dist: psutil==5.9.4
10
+ Requires-Dist: requests==2.28.1
10
11
 
11
12
  # python3-cyberfusion-common
12
13
 
@@ -22,12 +23,6 @@ Run the following command to install the package from PyPI:
22
23
 
23
24
  pip3 install python3-cyberfusion-common
24
25
 
25
- ## Generic
26
-
27
- Run the following command to create a source distribution:
28
-
29
- python3 setup.py sdist
30
-
31
26
  ## Debian
32
27
 
33
28
  Run the following commands to build a Debian package:
@@ -12,12 +12,6 @@ Run the following command to install the package from PyPI:
12
12
 
13
13
  pip3 install python3-cyberfusion-common
14
14
 
15
- ## Generic
16
-
17
- Run the following command to create a source distribution:
18
-
19
- python3 setup.py sdist
20
-
21
15
  ## Debian
22
16
 
23
17
  Run the following commands to build a Debian package:
@@ -0,0 +1,20 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "python3-cyberfusion-common"
7
+ version = "2.11"
8
+ description = "Common utilities."
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "Cyberfusion", email = "support@cyberfusion.io" },
12
+ ]
13
+ dependencies = [
14
+ "cached_property==1.5.2",
15
+ "psutil==5.9.4",
16
+ "requests==2.28.1",
17
+ ]
18
+
19
+ [project.urls]
20
+ "Source" = "https://github.com/CyberfusionIO/python3-cyberfusion-common"
@@ -57,9 +57,7 @@ def get_filesystem_type(path: str) -> FilesystemType:
57
57
  # If this yields no results (i.e. the path is missing), next() raises StopIteration
58
58
 
59
59
  partition = next(
60
- filter(
61
- lambda x: x.mountpoint == path, psutil.disk_partitions(all=True)
62
- )
60
+ filter(lambda x: x.mountpoint == path, psutil.disk_partitions(all=True))
63
61
  )
64
62
 
65
63
  return FilesystemType(partition.fstype)
@@ -23,9 +23,7 @@ class EmailAddresses:
23
23
  """Cyberfusion email addresses."""
24
24
 
25
25
  SYSTEM_MESSAGES_CORE = "system-messages.core@cyberfusion.io"
26
- SYSTEM_MESSAGES_INFRASTRUCTURE = (
27
- "system-messages.infrastructure@cyberfusion.io"
28
- )
26
+ SYSTEM_MESSAGES_INFRASTRUCTURE = "system-messages.infrastructure@cyberfusion.io"
29
27
  SUPPORT = "support@cyberfusion.io"
30
28
 
31
29
 
@@ -52,9 +50,7 @@ def try_find_executable(name: str) -> Optional[str]:
52
50
  return shutil.which(name)
53
51
 
54
52
 
55
- def download_from_url(
56
- url: str, *, root_directory: Optional[str] = None
57
- ) -> str:
53
+ def download_from_url(url: str, *, root_directory: Optional[str] = None) -> str:
58
54
  """Download from URL.
59
55
 
60
56
  Large files are supported due to use of chunking and streaming.
@@ -158,3 +154,11 @@ def get_md5_hash(path: str) -> str:
158
154
  hash_.update(chunk)
159
155
 
160
156
  return base64.b64encode(hash_.digest()).decode()
157
+
158
+
159
+ def ensure_trailing_newline(text: str) -> str:
160
+ """Add trailing newline to text if missing."""
161
+ if not text.endswith("\n"):
162
+ return text + "\n"
163
+
164
+ return text
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-cyberfusion-common
3
- Version: 2.10.11.3.2
3
+ Version: 2.11
4
4
  Summary: Common utilities.
5
- Home-page: https://github.com/CyberfusionIO/python3-cyberfusion-common
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-common
9
7
  Description-Content-Type: text/markdown
8
+ Requires-Dist: cached_property==1.5.2
9
+ Requires-Dist: psutil==5.9.4
10
+ Requires-Dist: requests==2.28.1
10
11
 
11
12
  # python3-cyberfusion-common
12
13
 
@@ -22,12 +23,6 @@ Run the following command to install the package from PyPI:
22
23
 
23
24
  pip3 install python3-cyberfusion-common
24
25
 
25
- ## Generic
26
-
27
- Run the following command to create a source distribution:
28
-
29
- python3 setup.py sdist
30
-
31
26
  ## Debian
32
27
 
33
28
  Run the following commands to build a Debian package:
@@ -1,7 +1,6 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  setup.cfg
4
- setup.py
5
4
  src/cyberfusion/Common/Config.py
6
5
  src/cyberfusion/Common/Filesystem.py
7
6
  src/cyberfusion/Common/FilesystemComparison.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-common",
10
- version="2.10.11.3.2",
11
- description="Common utilities.",
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-common",
17
- platforms=["linux"],
18
- packages=["cyberfusion.Common", "cyberfusion.Common.exceptions"],
19
- package_dir={"": "src"},
20
- data_files=[],
21
- install_requires=[
22
- "cached_property==1.5.2",
23
- "psutil==5.9.4",
24
- "requests==2.28.1",
25
- ],
26
- )