python-startfile 0.0.2.1__tar.gz → 0.0.3__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.
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-startfile
3
- Version: 0.0.2.1
3
+ Version: 0.0.3
4
4
  Summary: Python startfile.
5
- Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-startfile
6
5
  License: MIT
6
+ License-File: LICENSE
7
7
  Keywords: startfile
8
8
  Author: ChenyangGao
9
9
  Author-email: wosiwujm@gmail.com
@@ -25,10 +25,12 @@ Classifier: Programming Language :: Python :: 3.10
25
25
  Classifier: Programming Language :: Python :: 3.11
26
26
  Classifier: Programming Language :: Python :: 3.12
27
27
  Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
28
29
  Classifier: Topic :: Software Development
29
30
  Classifier: Topic :: Software Development :: Libraries
30
31
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
31
- Project-URL: Repository, https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-startfile
32
+ Project-URL: Homepage, https://github.com/ChenyangGao/python-modules/tree/main/python-startfile
33
+ Project-URL: Repository, https://github.com/ChenyangGao/python-modules/tree/main/python-startfile
32
34
  Description-Content-Type: text/markdown
33
35
 
34
36
  # Python startfile.
@@ -1,12 +1,12 @@
1
1
  [tool.poetry]
2
2
  name = "python-startfile"
3
- version = "0.0.2.1"
3
+ version = "0.0.3"
4
4
  description = "Python startfile."
5
5
  authors = ["ChenyangGao <wosiwujm@gmail.com>"]
6
6
  license = "MIT"
7
7
  readme = "readme.md"
8
- homepage = "https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-startfile"
9
- repository = "https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-startfile"
8
+ homepage = "https://github.com/ChenyangGao/python-modules/tree/main/python-startfile"
9
+ repository = "https://github.com/ChenyangGao/python-modules/tree/main/python-startfile"
10
10
  keywords = ["startfile"]
11
11
  classifiers = [
12
12
  "License :: OSI Approved :: MIT License",
@@ -2,7 +2,7 @@
2
2
  # coding: utf-8
3
3
 
4
4
  __author__ = "ChenyangGao <https://chenyanggao.github.io>"
5
- __version__ = (0, 0, 2)
5
+ __version__ = (0, 0, 3)
6
6
  __all__ = ["startfile", "startfile_async"]
7
7
 
8
8
  try:
@@ -20,23 +20,22 @@ except ImportError:
20
20
  await process.communicate()
21
21
 
22
22
  match system():
23
- case "Linux":
24
- def startfile(path, /, *args):
25
- run(["xdg-open", path, *args])
26
- async def startfile_async(path, /, *args):
27
- await run_command(["xdg-open", path, *args])
23
+ case "Linux" | "Android":
24
+ commnd = "xdg-open"
28
25
  case "Darwin":
29
- def startfile(path, /, *args):
30
- run(["open", path, *args])
31
- async def startfile_async(path, /, *args):
32
- await run_command(["open", path, *args])
26
+ commnd = "open"
33
27
  case "Windows":
34
- def startfile(path, /, *args):
35
- run(["start", path, *args])
36
- async def startfile_async(path, /, *args):
37
- await run_command(["start", path, *args])
28
+ commnd = "start"
38
29
  case _:
39
- raise RuntimeError("can't get startfile")
30
+ from shutil import which
31
+ if which("xdg-open"):
32
+ commnd = "xdg-open"
33
+ else:
34
+ raise RuntimeError("can't get startfile")
35
+ def startfile(path, /, *args):
36
+ run([commnd, path, *args])
37
+ async def startfile_async(path, /, *args):
38
+ await run_command([commnd, path, *args])
40
39
  else:
41
40
  from asyncio import to_thread
42
41
  from functools import wraps