-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (41 loc) · 1.38 KB
/
setup.py
File metadata and controls
46 lines (41 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from setuptools import setup, find_packages
import subprocess
import sys
import os
def install_fip():
"""Install fip if not already available"""
try:
# Check if fip is already available
subprocess.run(["fip", "--help"], check=True, capture_output=True)
print("✅ fip already installed")
return
except (subprocess.CalledProcessError, FileNotFoundError):
pass
print("📦 Installing fip (clipboard utility)...")
# Use the official one-line installer from the fip repository
try:
subprocess.run([
"sh", "-c",
"curl -fsSL https://raw.githubusercontent.com/Blakemagne/fip/main/install.sh | sh"
], check=True)
print("✅ fip installed successfully!")
except subprocess.CalledProcessError as e:
print(f"⚠️ Could not install fip automatically: {e}")
print("💡 Manual installation:")
print(" curl -fsSL https://raw.githubusercontent.com/Blakemagne/fip/main/install.sh | sh")
# Install fip during setup
install_fip()
setup(
name="otw-cli",
version="0.1.0",
packages=find_packages(),
entry_points={
"console_scripts": [
"otw=otw.cli:main"
]
},
author="Blakemagne",
description="CLI companion for OverTheWire wargames",
python_requires=">=3.7",
# Note: fip is installed automatically during setup
)