Split setup.py in two file to redirect logs
This commit is contained in:
38
setup.py
38
setup.py
@@ -1,10 +1,8 @@
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
import os
|
||||
import glob
|
||||
import configparser
|
||||
import re
|
||||
import shutil
|
||||
import os
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
conf = []
|
||||
templates = []
|
||||
@@ -26,36 +24,6 @@ if not os.path.exists('/var/log/wo/'):
|
||||
if not os.path.exists('/var/lib/wo/'):
|
||||
os.makedirs('/var/lib/wo/')
|
||||
|
||||
# WordOps git configuration management
|
||||
config = configparser.ConfigParser()
|
||||
config.read(os.path.expanduser("~")+'/.gitconfig')
|
||||
try:
|
||||
wo_user = config['user']['name']
|
||||
wo_email = config['user']['email']
|
||||
except Exception:
|
||||
print("WordOps (wo) require an username & and an email "
|
||||
"address to configure Git (used to save server configurations)")
|
||||
print("Your informations will ONLY be stored locally")
|
||||
|
||||
wo_user = input("Enter your name: ")
|
||||
while wo_user == "":
|
||||
print("Unfortunately, this can't be left blank")
|
||||
wo_user = input("Enter your name: ")
|
||||
|
||||
wo_email = input("Enter your email: ")
|
||||
|
||||
while not re.match(r"^[A-Za-z0-9\.\+_-]+@[A-Za-z0-9\._-]+\.[a-zA-Z]*$",
|
||||
wo_email):
|
||||
print("Whoops, seems like you made a typo - "
|
||||
"the e-mailaddress is invalid...")
|
||||
wo_email = input("Enter your email: ")
|
||||
|
||||
os.system("git config --global user.name {0}".format(wo_user))
|
||||
os.system("git config --global user.email {0}".format(wo_email))
|
||||
|
||||
if not os.path.isfile('/root/.gitconfig'):
|
||||
shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
|
||||
|
||||
setup(name='wo',
|
||||
version='3.9.8.11',
|
||||
description=long_description,
|
||||
|
||||
Reference in New Issue
Block a user