fpm-cli 0.2.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.
- fpm_cli-0.2.0/PKG-INFO +70 -0
- fpm_cli-0.2.0/README.md +47 -0
- fpm_cli-0.2.0/fpm_cli.egg-info/PKG-INFO +70 -0
- fpm_cli-0.2.0/fpm_cli.egg-info/SOURCES.txt +8 -0
- fpm_cli-0.2.0/fpm_cli.egg-info/dependency_links.txt +1 -0
- fpm_cli-0.2.0/fpm_cli.egg-info/entry_points.txt +2 -0
- fpm_cli-0.2.0/fpm_cli.egg-info/top_level.txt +1 -0
- fpm_cli-0.2.0/fpm_pkg/__init__.py +129 -0
- fpm_cli-0.2.0/pyproject.toml +36 -0
- fpm_cli-0.2.0/setup.cfg +4 -0
fpm_cli-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fpm-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Fast Package Manager for Python — binary distribution
|
|
5
|
+
Author: Kartikey Yadav
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Kartikey2011yadav/fpm
|
|
8
|
+
Project-URL: Repository, https://github.com/Kartikey2011yadav/fpm
|
|
9
|
+
Project-URL: Issues, https://github.com/Kartikey2011yadav/fpm/issues
|
|
10
|
+
Keywords: package-manager,python,pip,fast,install
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# fpm-cli
|
|
25
|
+
|
|
26
|
+
**Fast Package Manager for Python** — binary distribution via pip.
|
|
27
|
+
|
|
28
|
+
This package provides the `fpm` command by downloading the pre-built binary for
|
|
29
|
+
your platform (macOS, Linux, Windows — Intel and ARM).
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install fpm-cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
After installation, `fpm` is available:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
fpm --help
|
|
43
|
+
fpm init myproject
|
|
44
|
+
fpm install requests
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## What this package does
|
|
48
|
+
|
|
49
|
+
This is a thin Python wrapper that:
|
|
50
|
+
|
|
51
|
+
1. Downloads the correct `fpm` binary for your OS/architecture
|
|
52
|
+
2. Places it alongside your Python scripts
|
|
53
|
+
3. Proxies all commands to the native binary
|
|
54
|
+
|
|
55
|
+
The actual `fpm` tool is written in Go for maximum performance.
|
|
56
|
+
|
|
57
|
+
## Platforms
|
|
58
|
+
|
|
59
|
+
| OS | Architecture | Supported |
|
|
60
|
+
| ------- | ------------ | --------- |
|
|
61
|
+
| Linux | x86_64 | ✓ |
|
|
62
|
+
| Linux | arm64 | ✓ |
|
|
63
|
+
| macOS | x86_64 | ✓ |
|
|
64
|
+
| macOS | arm64 (M1+) | ✓ |
|
|
65
|
+
| Windows | x86_64 | ✓ |
|
|
66
|
+
|
|
67
|
+
## More information
|
|
68
|
+
|
|
69
|
+
- [GitHub](https://github.com/Kartikey2011yadav/fpm)
|
|
70
|
+
- [Documentation](https://github.com/Kartikey2011yadav/fpm/tree/main/docs)
|
fpm_cli-0.2.0/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# fpm-cli
|
|
2
|
+
|
|
3
|
+
**Fast Package Manager for Python** — binary distribution via pip.
|
|
4
|
+
|
|
5
|
+
This package provides the `fpm` command by downloading the pre-built binary for
|
|
6
|
+
your platform (macOS, Linux, Windows — Intel and ARM).
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install fpm-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
After installation, `fpm` is available:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
fpm --help
|
|
20
|
+
fpm init myproject
|
|
21
|
+
fpm install requests
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## What this package does
|
|
25
|
+
|
|
26
|
+
This is a thin Python wrapper that:
|
|
27
|
+
|
|
28
|
+
1. Downloads the correct `fpm` binary for your OS/architecture
|
|
29
|
+
2. Places it alongside your Python scripts
|
|
30
|
+
3. Proxies all commands to the native binary
|
|
31
|
+
|
|
32
|
+
The actual `fpm` tool is written in Go for maximum performance.
|
|
33
|
+
|
|
34
|
+
## Platforms
|
|
35
|
+
|
|
36
|
+
| OS | Architecture | Supported |
|
|
37
|
+
| ------- | ------------ | --------- |
|
|
38
|
+
| Linux | x86_64 | ✓ |
|
|
39
|
+
| Linux | arm64 | ✓ |
|
|
40
|
+
| macOS | x86_64 | ✓ |
|
|
41
|
+
| macOS | arm64 (M1+) | ✓ |
|
|
42
|
+
| Windows | x86_64 | ✓ |
|
|
43
|
+
|
|
44
|
+
## More information
|
|
45
|
+
|
|
46
|
+
- [GitHub](https://github.com/Kartikey2011yadav/fpm)
|
|
47
|
+
- [Documentation](https://github.com/Kartikey2011yadav/fpm/tree/main/docs)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fpm-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Fast Package Manager for Python — binary distribution
|
|
5
|
+
Author: Kartikey Yadav
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Kartikey2011yadav/fpm
|
|
8
|
+
Project-URL: Repository, https://github.com/Kartikey2011yadav/fpm
|
|
9
|
+
Project-URL: Issues, https://github.com/Kartikey2011yadav/fpm/issues
|
|
10
|
+
Keywords: package-manager,python,pip,fast,install
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# fpm-cli
|
|
25
|
+
|
|
26
|
+
**Fast Package Manager for Python** — binary distribution via pip.
|
|
27
|
+
|
|
28
|
+
This package provides the `fpm` command by downloading the pre-built binary for
|
|
29
|
+
your platform (macOS, Linux, Windows — Intel and ARM).
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install fpm-cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
After installation, `fpm` is available:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
fpm --help
|
|
43
|
+
fpm init myproject
|
|
44
|
+
fpm install requests
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## What this package does
|
|
48
|
+
|
|
49
|
+
This is a thin Python wrapper that:
|
|
50
|
+
|
|
51
|
+
1. Downloads the correct `fpm` binary for your OS/architecture
|
|
52
|
+
2. Places it alongside your Python scripts
|
|
53
|
+
3. Proxies all commands to the native binary
|
|
54
|
+
|
|
55
|
+
The actual `fpm` tool is written in Go for maximum performance.
|
|
56
|
+
|
|
57
|
+
## Platforms
|
|
58
|
+
|
|
59
|
+
| OS | Architecture | Supported |
|
|
60
|
+
| ------- | ------------ | --------- |
|
|
61
|
+
| Linux | x86_64 | ✓ |
|
|
62
|
+
| Linux | arm64 | ✓ |
|
|
63
|
+
| macOS | x86_64 | ✓ |
|
|
64
|
+
| macOS | arm64 (M1+) | ✓ |
|
|
65
|
+
| Windows | x86_64 | ✓ |
|
|
66
|
+
|
|
67
|
+
## More information
|
|
68
|
+
|
|
69
|
+
- [GitHub](https://github.com/Kartikey2011yadav/fpm)
|
|
70
|
+
- [Documentation](https://github.com/Kartikey2011yadav/fpm/tree/main/docs)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fpm_pkg
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""fpm-cli: Fast Package Manager for Python — binary wrapper.
|
|
2
|
+
|
|
3
|
+
This package downloads and installs the fpm binary for your platform.
|
|
4
|
+
After installation, the `fpm` command is available in your PATH.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import platform
|
|
9
|
+
import shutil
|
|
10
|
+
import stat
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
import tempfile
|
|
14
|
+
import urllib.request
|
|
15
|
+
|
|
16
|
+
__version__ = "0.2.0"
|
|
17
|
+
|
|
18
|
+
REPO = "Kartikey2011yadav/fpm"
|
|
19
|
+
GITHUB_API = f"https://api.github.com/repos/{REPO}/releases/latest"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def get_platform():
|
|
23
|
+
"""Detect OS and architecture."""
|
|
24
|
+
system = platform.system().lower()
|
|
25
|
+
machine = platform.machine().lower()
|
|
26
|
+
|
|
27
|
+
if system == "darwin":
|
|
28
|
+
os_name = "darwin"
|
|
29
|
+
elif system == "linux":
|
|
30
|
+
os_name = "linux"
|
|
31
|
+
elif system == "windows":
|
|
32
|
+
os_name = "windows"
|
|
33
|
+
else:
|
|
34
|
+
raise RuntimeError(f"Unsupported OS: {system}")
|
|
35
|
+
|
|
36
|
+
if machine in ("x86_64", "amd64"):
|
|
37
|
+
arch = "amd64"
|
|
38
|
+
elif machine in ("aarch64", "arm64"):
|
|
39
|
+
arch = "arm64"
|
|
40
|
+
else:
|
|
41
|
+
raise RuntimeError(f"Unsupported architecture: {machine}")
|
|
42
|
+
|
|
43
|
+
return os_name, arch
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def get_binary_path():
|
|
47
|
+
"""Get the path where the fpm binary should be installed."""
|
|
48
|
+
# Install next to this Python package's scripts
|
|
49
|
+
scripts_dir = os.path.dirname(sys.executable)
|
|
50
|
+
|
|
51
|
+
# On Unix, use the bin dir alongside python
|
|
52
|
+
if platform.system() != "Windows":
|
|
53
|
+
return os.path.join(scripts_dir, "fpm")
|
|
54
|
+
else:
|
|
55
|
+
return os.path.join(scripts_dir, "fpm.exe")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def get_download_url(version=None):
|
|
59
|
+
"""Construct the download URL for the platform binary."""
|
|
60
|
+
os_name, arch = get_platform()
|
|
61
|
+
|
|
62
|
+
if version is None:
|
|
63
|
+
# Try to get latest from GitHub API
|
|
64
|
+
try:
|
|
65
|
+
import json
|
|
66
|
+
with urllib.request.urlopen(GITHUB_API, timeout=10) as resp:
|
|
67
|
+
data = json.loads(resp.read())
|
|
68
|
+
version = data["tag_name"].lstrip("v")
|
|
69
|
+
except Exception:
|
|
70
|
+
version = __version__
|
|
71
|
+
|
|
72
|
+
ext = ".exe" if os_name == "windows" else ""
|
|
73
|
+
filename = f"fpm-{version}-{os_name}-{arch}{ext}"
|
|
74
|
+
url = f"https://github.com/{REPO}/releases/download/v{version}/{filename}"
|
|
75
|
+
return url, filename
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def download_binary():
|
|
79
|
+
"""Download the fpm binary for this platform."""
|
|
80
|
+
url, filename = get_download_url()
|
|
81
|
+
binary_path = get_binary_path()
|
|
82
|
+
|
|
83
|
+
print(f"Downloading fpm from {url}...")
|
|
84
|
+
|
|
85
|
+
try:
|
|
86
|
+
tmp = tempfile.NamedTemporaryFile(delete=False, suffix=filename)
|
|
87
|
+
urllib.request.urlretrieve(url, tmp.name)
|
|
88
|
+
|
|
89
|
+
# Make executable
|
|
90
|
+
os.chmod(tmp.name, os.stat(tmp.name).st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
|
|
91
|
+
|
|
92
|
+
# Move to final location
|
|
93
|
+
os.makedirs(os.path.dirname(binary_path), exist_ok=True)
|
|
94
|
+
shutil.move(tmp.name, binary_path)
|
|
95
|
+
|
|
96
|
+
print(f"Installed fpm to {binary_path}")
|
|
97
|
+
return binary_path
|
|
98
|
+
|
|
99
|
+
except Exception as e:
|
|
100
|
+
print(f"Failed to download fpm: {e}", file=sys.stderr)
|
|
101
|
+
print("Try installing manually: https://github.com/Kartikey2011yadav/fpm#installation", file=sys.stderr)
|
|
102
|
+
sys.exit(1)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def find_binary():
|
|
106
|
+
"""Find the fpm binary, downloading if necessary."""
|
|
107
|
+
# Check if already installed alongside this package
|
|
108
|
+
binary_path = get_binary_path()
|
|
109
|
+
if os.path.isfile(binary_path) and os.access(binary_path, os.X_OK):
|
|
110
|
+
return binary_path
|
|
111
|
+
|
|
112
|
+
# Check PATH
|
|
113
|
+
which = shutil.which("fpm")
|
|
114
|
+
if which:
|
|
115
|
+
return which
|
|
116
|
+
|
|
117
|
+
# Download it
|
|
118
|
+
return download_binary()
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def main():
|
|
122
|
+
"""Entry point: proxy all arguments to the fpm binary."""
|
|
123
|
+
binary = find_binary()
|
|
124
|
+
result = subprocess.run([binary] + sys.argv[1:])
|
|
125
|
+
sys.exit(result.returncode)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
if __name__ == "__main__":
|
|
129
|
+
main()
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fpm-cli"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Fast Package Manager for Python — binary distribution"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [{name = "Kartikey Yadav"}]
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Operating System :: POSIX :: Linux",
|
|
20
|
+
"Operating System :: Microsoft :: Windows",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Topic :: Software Development :: Build Tools",
|
|
23
|
+
"Topic :: System :: Installation/Setup",
|
|
24
|
+
]
|
|
25
|
+
keywords = ["package-manager", "python", "pip", "fast", "install"]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://github.com/Kartikey2011yadav/fpm"
|
|
29
|
+
Repository = "https://github.com/Kartikey2011yadav/fpm"
|
|
30
|
+
Issues = "https://github.com/Kartikey2011yadav/fpm/issues"
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
fpm = "fpm_pkg:main"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
include = ["fpm_pkg*"]
|
fpm_cli-0.2.0/setup.cfg
ADDED