File tree 4 files changed +20
-15
lines changed
4 files changed +20
-15
lines changed Original file line number Diff line number Diff line change 1
1
# Imports
2
- from eggdriver .resources .console import get , clearConsole
2
+ from eggdriver .resources .console import get , clearConsole , pg
3
3
from eggdriver .resources .constants import *
4
4
from eggdriver .resources .modules import installFromRequests , upgrade , Repo
5
5
from eggdriver .resources .help import help
@@ -43,21 +43,16 @@ def eggConsole(condition: bool = True):
43
43
elif i == "$register" :
44
44
register ()
45
45
elif i == "$install" :
46
- print (white + "Package:" )
47
- name = get ("egg" )
46
+ name = pg ("Package:" )
48
47
installFromRequests ([name ], False )
49
48
elif i == "$upgrade" :
50
- print (white + "Package:" )
51
- name = get ("egg" )
49
+ name = pg ("Package:" )
52
50
upgrade (name )
53
51
elif i == "$pull" :
54
- print (white + "Repo:" )
55
- name = get ("egg" )
56
- repo = Repo (name )
57
- print (white + "Package:" )
58
- package = get ("egg" )
59
- last = repo .pull (package )
60
- # *comming soon*
52
+ org = pg ("User or Organization:" )
53
+ name = pg ("Repository:" )
54
+ repo = Repo (org , name )
55
+ repo .pull ()
61
56
elif i == "$help" :
62
57
help ()
63
58
elif i == "$clear" :
Original file line number Diff line number Diff line change 14
14
>>> Requirement already satisfied: pip in <root> (21.2.4)
15
15
"""
16
16
def init ():
17
+ """Upgrade pip and install all the packages in requests file"""
17
18
install_option_1 ("$upgrade" ) # Upgrade pip
18
19
sleep (10 ) # Waits 10 ms
19
20
installFromRequests () # Install all the packages in requests file
Original file line number Diff line number Diff line change 2
2
3
3
"""
4
4
FUNCTION build()
5
+ Build and upload a pypi package release
5
6
7
+ In Windows is equal to type in the console the following lines:
6
8
py -m build --sdist
7
9
py -m build --wheel
8
10
py -m twine check dist/*
9
11
py -m twine upload dist/*
10
12
"""
11
13
def build ():
14
+ """Build and upload a pypi package release"""
12
15
installFromRequests (["setuptools" , "twine" , "build" ], False )
13
16
sysCommand ("-m build --sdist" )
14
17
sysCommand ("-m build --wheel" )
Original file line number Diff line number Diff line change 2
2
from eggdriver .resources .console .progress import *
3
3
4
4
def get (tag : str ):
5
- i = input (blue + "$" + tag + "> " + green )
5
+ i = input (blue + "$" + tag + "> " + green )
6
6
return i
7
7
8
- def put (content , colour = white ):
9
- print (colour + content , end = "" )
8
+ def put (content , colour = white , ending = "" ):
9
+ print (colour + content , end = ending )
10
+
11
+ def pg (content : str , tag :str = "egg" ):
12
+ """Print content and get an input"""
13
+ print (white + content )
14
+ g = get (tag )
15
+ return g
You can’t perform that action at this time.
0 commit comments