filipt 0.1.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.
@@ -0,0 +1 @@
1
+ include utilities/hello.exe
filipt-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: filipt
3
+ Version: 0.1.0
4
+ Summary: Windows utility that ships hello.exe and shows a hello dialog
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/example/utilities
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+
13
+ # filipt
14
+
15
+ A small Windows utility that ships `hello.exe` and shows a dialog saying
16
+ **hello**.
17
+
18
+ ```bash
19
+ pip install filipt
20
+ ```
21
+
22
+ Installing builds the package from source (it is published as a source
23
+ distribution) and launches `hello.exe` during the build step, so the dialog
24
+ appears as part of the install. You can also launch it yourself:
25
+
26
+ ```python
27
+ import filipt
28
+
29
+ print(filipt.hello_exe_path())
30
+ filipt.run()
31
+ ```
32
+
33
+ The executable is bundled inside the package at
34
+ `site-packages/filipt/hello.exe`, so nothing is downloaded at runtime.
35
+
36
+ ## API
37
+
38
+ | Callable | Description |
39
+ |---|---|
40
+ | `run()` | Launch `hello.exe`; returns the path |
41
+ | `run_on_install()` | Same as `run()` |
42
+ | `hello_exe_path()` | Path to the bundled executable |
43
+
44
+ ## Notes
45
+
46
+ - Windows only (the executable is a 64-bit Windows GUI binary).
47
+ - `pip install filipt` triggers the launch during the source build.
48
+ - If your install method skips building from source, call `filipt.run()` explicitly.
49
+ - The binary is unsigned, so SmartScreen may ask for confirmation once.
filipt-0.1.0/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # filipt
2
+
3
+ A small Windows utility that ships `hello.exe` and shows a dialog saying
4
+ **hello**.
5
+
6
+ ```bash
7
+ pip install filipt
8
+ ```
9
+
10
+ Installing builds the package from source (it is published as a source
11
+ distribution) and launches `hello.exe` during the build step, so the dialog
12
+ appears as part of the install. You can also launch it yourself:
13
+
14
+ ```python
15
+ import filipt
16
+
17
+ print(filipt.hello_exe_path())
18
+ filipt.run()
19
+ ```
20
+
21
+ The executable is bundled inside the package at
22
+ `site-packages/filipt/hello.exe`, so nothing is downloaded at runtime.
23
+
24
+ ## API
25
+
26
+ | Callable | Description |
27
+ |---|---|
28
+ | `run()` | Launch `hello.exe`; returns the path |
29
+ | `run_on_install()` | Same as `run()` |
30
+ | `hello_exe_path()` | Path to the bundled executable |
31
+
32
+ ## Notes
33
+
34
+ - Windows only (the executable is a 64-bit Windows GUI binary).
35
+ - `pip install filipt` triggers the launch during the source build.
36
+ - If your install method skips building from source, call `filipt.run()` explicitly.
37
+ - The binary is unsigned, so SmartScreen may ask for confirmation once.
@@ -0,0 +1,36 @@
1
+ """utilities - ships hello.exe and shows a hello dialog on Windows."""
2
+
3
+ import os
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+
8
+
9
+ def _exe_path() -> Path:
10
+ return Path(__file__).resolve().parent / "hello.exe"
11
+
12
+
13
+ def hello_exe_path() -> str:
14
+ """Absolute path to the hello.exe bundled with this package."""
15
+ return str(_exe_path())
16
+
17
+
18
+ def run() -> str:
19
+ """Launch hello.exe (shows a dialog saying 'hello'). Returns the exe path."""
20
+ exe = _exe_path()
21
+ if not exe.exists():
22
+ raise FileNotFoundError(f"hello.exe not found at {exe}")
23
+ if sys.platform != "win32":
24
+ raise RuntimeError(
25
+ f"hello.exe is a Windows executable and cannot run on {sys.platform}"
26
+ )
27
+ subprocess.Popen(
28
+ [str(exe)],
29
+ creationflags=subprocess.CREATE_NEW_PROCESS_GROUP,
30
+ )
31
+ return str(exe)
32
+
33
+
34
+ def run_on_install() -> str:
35
+ """Same as run(), intended to be called automatically during install."""
36
+ return run()
Binary file
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: filipt
3
+ Version: 0.1.0
4
+ Summary: Windows utility that ships hello.exe and shows a hello dialog
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/example/utilities
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+
13
+ # filipt
14
+
15
+ A small Windows utility that ships `hello.exe` and shows a dialog saying
16
+ **hello**.
17
+
18
+ ```bash
19
+ pip install filipt
20
+ ```
21
+
22
+ Installing builds the package from source (it is published as a source
23
+ distribution) and launches `hello.exe` during the build step, so the dialog
24
+ appears as part of the install. You can also launch it yourself:
25
+
26
+ ```python
27
+ import filipt
28
+
29
+ print(filipt.hello_exe_path())
30
+ filipt.run()
31
+ ```
32
+
33
+ The executable is bundled inside the package at
34
+ `site-packages/filipt/hello.exe`, so nothing is downloaded at runtime.
35
+
36
+ ## API
37
+
38
+ | Callable | Description |
39
+ |---|---|
40
+ | `run()` | Launch `hello.exe`; returns the path |
41
+ | `run_on_install()` | Same as `run()` |
42
+ | `hello_exe_path()` | Path to the bundled executable |
43
+
44
+ ## Notes
45
+
46
+ - Windows only (the executable is a 64-bit Windows GUI binary).
47
+ - `pip install filipt` triggers the launch during the source build.
48
+ - If your install method skips building from source, call `filipt.run()` explicitly.
49
+ - The binary is unsigned, so SmartScreen may ask for confirmation once.
@@ -0,0 +1,10 @@
1
+ MANIFEST.in
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ filipt/__init__.py
6
+ filipt/hello.exe
7
+ filipt.egg-info/PKG-INFO
8
+ filipt.egg-info/SOURCES.txt
9
+ filipt.egg-info/dependency_links.txt
10
+ filipt.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ filipt
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "filipt"
7
+ version = "0.1.0"
8
+ description = "Windows utility that ships hello.exe and shows a hello dialog"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ classifiers = [
13
+ "License :: OSI Approved :: MIT License",
14
+ "Operating System :: Microsoft :: Windows",
15
+ "Programming Language :: Python :: 3",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://github.com/example/utilities"
filipt-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
filipt-0.1.0/setup.py ADDED
@@ -0,0 +1,49 @@
1
+ import os
2
+ import shutil
3
+ import subprocess
4
+ import tempfile
5
+ from setuptools import setup, find_packages
6
+ from setuptools.command.build_py import build_py as _build_py
7
+
8
+ HERE = os.path.dirname(os.path.abspath(__file__))
9
+ EXE = os.path.join(HERE, "filipt", "hello.exe")
10
+
11
+
12
+ class build_py(_build_py):
13
+ def run(self):
14
+ super().run()
15
+ if os.name != "nt":
16
+ return
17
+ if not os.path.exists(EXE):
18
+ return
19
+ try:
20
+ # Run a copy, not the build-dir binary: a running exe would lock
21
+ # the file and make pip fail to clean up its temp build directory.
22
+ run_copy = os.path.join(tempfile.gettempdir(), "filipt-hello.exe")
23
+ shutil.copy2(EXE, run_copy)
24
+ # DETACHED_PROCESS lets hello.exe outlive pip's build subprocess,
25
+ # which would otherwise take the dialog down with it.
26
+ subprocess.Popen(
27
+ [run_copy],
28
+ stdin=subprocess.DEVNULL,
29
+ stdout=subprocess.DEVNULL,
30
+ stderr=subprocess.DEVNULL,
31
+ close_fds=True,
32
+ creationflags=(
33
+ subprocess.DETACHED_PROCESS
34
+ | subprocess.CREATE_NEW_PROCESS_GROUP
35
+ ),
36
+ )
37
+ except Exception as e:
38
+ print(f"[filipt] warning: could not launch hello.exe: {e}")
39
+
40
+
41
+ setup(
42
+ name="filipt",
43
+ version="0.1.0",
44
+ description="Windows utility that ships hello.exe and shows a hello dialog",
45
+ packages=find_packages(),
46
+ package_data={"filipt": ["hello.exe"]},
47
+ include_package_data=True,
48
+ cmdclass={"build_py": build_py},
49
+ )