-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
68 lines (62 loc) · 2.1 KB
/
setup.py
File metadata and controls
68 lines (62 loc) · 2.1 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import os
import time
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
ORANGE = "\033[38;5;208m"
WHITE = "\033[1;37m"
RESET = "\033[0m"
BOLD = "\033[1m"
def show_premium_ui():
"""The logic for your Orange installer UI"""
os.system('cls' if os.name == 'nt' else 'clear')
logo = r"""
{ORANGE} _ _ _
(_) (_) |
_ _ __ _| |_ ______ __ _ _ __ _ __
| | '_ \| | __|______|/ _` | '_ \| '_ \
| | | | | | |_ | (_| | |_) | |_) |
|_|_| |_|_|\__| \__,_| .__/| .__/
| | | |
|_| |_| {RESET}
"""
print(logo.format(ORANGE=ORANGE, RESET=RESET))
print(f" {WHITE}{BOLD}LINKING PROJECT IN EDITABLE MODE...{RESET}")
print(f" {ORANGE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{RESET}")
steps = [
" ▹ Mapping source trees...",
" ▹ Syncing orange-theme assets...",
" ▹ Injecting CLI entry-points...",
" ▹ Verifying dependencies (Jinja2, Dotenv)..."
]
for step in steps:
print(step)
time.sleep(0.4)
print(f"\n {ORANGE}{BOLD}✔ EDITABLE INSTALL COMPLETE{RESET}\n")
class PremiumInstall(install):
def run(self):
show_premium_ui()
install.run(self)
class PremiumDevelop(develop):
def run(self):
show_premium_ui()
develop.run(self)
setup(
name="init-app",
version="1.0.0", # Updated to match pyproject.toml
packages=find_packages(),
include_package_data=True,
install_requires=[
'colorama>=0.4.6',
'readchar>=4.2.1',
'pyfiglet>=1.0.4',
'python-dotenv>=1.2.1',
'jinja2>=3.1.0' # Added to fix your error
],
entry_points={'console_scripts': ['init-app=create_app.engine.cli:main']},
cmdclass={
'install': PremiumInstall,
'develop': PremiumDevelop,
},
)