[DEV] Rename maestro as island to be compatible with a free slot in pip
This commit is contained in:
parent
9973c3b4d6
commit
d3a542a957
24
README.rst
24
README.rst
@ -1,25 +1,25 @@
|
|||||||
Lutin
|
Lutin
|
||||||
=====
|
=====
|
||||||
|
|
||||||
`maestro` is a generic source downloader and syncronizer is a FREE software tool.
|
`island` is a generic source downloader and syncronizer is a FREE software tool.
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://badge.fury.io/py/maestro.png
|
.. image:: https://badge.fury.io/py/island.png
|
||||||
:target: https://pypi.python.org/pypi/maestro
|
:target: https://pypi.python.org/pypi/island
|
||||||
|
|
||||||
Release (master)
|
Release (master)
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/HeeroYui/maestro.svg?branch=master
|
.. image:: https://travis-ci.org/HeeroYui/island.svg?branch=master
|
||||||
:target: https://travis-ci.org/HeeroYui/maestro
|
:target: https://travis-ci.org/HeeroYui/island
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Developement (dev)
|
Developement (dev)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/HeeroYui/maestro.svg?branch=dev
|
.. image:: https://travis-ci.org/HeeroYui/island.svg?branch=dev
|
||||||
:target: https://travis-ci.org/HeeroYui/maestro
|
:target: https://travis-ci.org/HeeroYui/island
|
||||||
|
|
||||||
|
|
||||||
Instructions
|
Instructions
|
||||||
@ -27,18 +27,18 @@ Instructions
|
|||||||
|
|
||||||
This is a tool to download ```git``` source repositiry in a versatile worktree
|
This is a tool to download ```git``` source repositiry in a versatile worktree
|
||||||
|
|
||||||
Maestro is under a FREE license that can be found in the LICENSE file.
|
island is under a FREE license that can be found in the LICENSE file.
|
||||||
Any contribution is more than welcome ;)
|
Any contribution is more than welcome ;)
|
||||||
|
|
||||||
git repository
|
git repository
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
http://github.com/HeeroYui/maestro/
|
http://github.com/HeeroYui/island/
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
http://HeeroYui.github.io/maestro/
|
http://HeeroYui.github.io/island/
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
@ -47,7 +47,7 @@ Requirements: ``Python >= 2.7`` and ``pip``
|
|||||||
|
|
||||||
Just run:
|
Just run:
|
||||||
|
|
||||||
pip install maestro
|
pip install island
|
||||||
|
|
||||||
Install pip on debian/ubuntu:
|
Install pip on debian/ubuntu:
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Install pip on MacOs:
|
|||||||
License (MPL v2.0)
|
License (MPL v2.0)
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Copyright maestro Edouard DUPIN
|
Copyright island Edouard DUPIN
|
||||||
|
|
||||||
Licensed under the Mozilla Public License, Version 2.0 (the "License");
|
Licensed under the Mozilla Public License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
## @license MPL v2.0 (see license file)
|
## @license MPL v2.0 (see license file)
|
||||||
##
|
##
|
||||||
|
|
||||||
import maestro
|
import island
|
@ -32,13 +32,13 @@ def filter_name_and_file(root, list_files, filter):
|
|||||||
|
|
||||||
def import_path_local(path):
|
def import_path_local(path):
|
||||||
out = []
|
out = []
|
||||||
debug.verbose("maestro files: " + str(path) + " [START]")
|
debug.verbose("island files: " + str(path) + " [START]")
|
||||||
list_files = os.listdir(path)
|
list_files = os.listdir(path)
|
||||||
# filter elements:
|
# filter elements:
|
||||||
tmp_list_maestro_file = filter_name_and_file(path, list_files, env.get_system_base_name() + "*.py")
|
tmp_list_island_file = filter_name_and_file(path, list_files, env.get_system_base_name() + "*.py")
|
||||||
debug.verbose("maestro files: " + str(path) + " : " + str(tmp_list_maestro_file))
|
debug.verbose("island files: " + str(path) + " : " + str(tmp_list_island_file))
|
||||||
# Import the module:
|
# Import the module:
|
||||||
for filename in tmp_list_maestro_file:
|
for filename in tmp_list_island_file:
|
||||||
out.append(os.path.join(path, filename))
|
out.append(os.path.join(path, filename))
|
||||||
debug.verbose(" Find a file : '" + str(out[-1]) + "'")
|
debug.verbose(" Find a file : '" + str(out[-1]) + "'")
|
||||||
return out
|
return out
|
||||||
@ -48,14 +48,14 @@ def init():
|
|||||||
global is_init;
|
global is_init;
|
||||||
if is_init == True:
|
if is_init == True:
|
||||||
return
|
return
|
||||||
list_of_maestro_files = import_path_local(os.path.join(tools.get_current_path(__file__), 'actions'))
|
list_of_island_files = import_path_local(os.path.join(tools.get_current_path(__file__), 'actions'))
|
||||||
|
|
||||||
actions.init(list_of_maestro_files)
|
actions.init(list_of_island_files)
|
||||||
|
|
||||||
is_init = True
|
is_init = True
|
||||||
|
|
||||||
|
|
||||||
myArgs = arguments.maestroArg()
|
myArgs = arguments.islandArg()
|
||||||
myArgs.add_section("option", "Can be set one time in all case")
|
myArgs.add_section("option", "Can be set one time in all case")
|
||||||
myArgs.add("h", "help", desc="Display this help")
|
myArgs.add("h", "help", desc="Display this help")
|
||||||
myArgs.add("v", "verbose", list=[["0","None"],["1","error"],["2","warning"],["3","info"],["4","debug"],["5","verbose"],["6","extreme_verbose"]], desc="display debug level (verbose) default =2")
|
myArgs.add("v", "verbose", list=[["0","None"],["1","error"],["2","warning"],["3","info"],["4","debug"],["5","verbose"],["6","extreme_verbose"]], desc="display debug level (verbose) default =2")
|
||||||
@ -85,7 +85,7 @@ def usage():
|
|||||||
print(" " + color['green'] + elem + color['default'])
|
print(" " + color['green'] + elem + color['default'])
|
||||||
"""
|
"""
|
||||||
print(" " + color['green'] + "init" + color['default'])
|
print(" " + color['green'] + "init" + color['default'])
|
||||||
print(" initialize a 'maestro' interface with a manifest in a git ")
|
print(" initialize a 'island' interface with a manifest in a git ")
|
||||||
print(" " + color['green'] + "sync" + color['default'])
|
print(" " + color['green'] + "sync" + color['default'])
|
||||||
print(" Syncronise the currect environement")
|
print(" Syncronise the currect environement")
|
||||||
print(" " + color['green'] + "status" + color['default'])
|
print(" " + color['green'] + "status" + color['default'])
|
||||||
@ -134,8 +134,8 @@ def parseGenericArg(argument, active):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# open configuration of maestro:
|
# open configuration of island:
|
||||||
config_file_name = "maestroConfig.py"
|
config_file_name = "islandConfig.py"
|
||||||
config_file = os.path.join(tools.get_run_path(), config_file_name)
|
config_file = os.path.join(tools.get_run_path(), config_file_name)
|
||||||
if os.path.isfile(config_file) == True:
|
if os.path.isfile(config_file) == True:
|
||||||
sys.path.append(os.path.dirname(config_file))
|
sys.path.append(os.path.dirname(config_file))
|
||||||
@ -221,7 +221,7 @@ if action_to_do not in list_actions:
|
|||||||
# todo : Remove this
|
# todo : Remove this
|
||||||
if action_to_do != "init" \
|
if action_to_do != "init" \
|
||||||
and os.path.exists("." + env.get_system_base_name()) == False:
|
and os.path.exists("." + env.get_system_base_name()) == False:
|
||||||
debug.error("Can not execute a maestro cmd if we have not initialize a config: '" + str("." + env.get_system_base_name()) + "'")
|
debug.error("Can not execute a island cmd if we have not initialize a config: '" + str("." + env.get_system_base_name()) + "'")
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ __base_action_name = env.get_system_base_name() + "Action_"
|
|||||||
|
|
||||||
def init(files):
|
def init(files):
|
||||||
global list_actions;
|
global list_actions;
|
||||||
debug.debug("List of action for maestro: ")
|
debug.debug("List of action for island: ")
|
||||||
for elem_path in files :
|
for elem_path in files :
|
||||||
base_name = os.path.basename(elem_path)
|
base_name = os.path.basename(elem_path)
|
||||||
if len(base_name) <= 3 + len(__base_action_name):
|
if len(base_name) <= 3 + len(__base_action_name):
|
@ -8,10 +8,10 @@
|
|||||||
## @license MPL v2.0 (see license file)
|
## @license MPL v2.0 (see license file)
|
||||||
##
|
##
|
||||||
|
|
||||||
from maestro import debug
|
from island import debug
|
||||||
from maestro import tools
|
from island import tools
|
||||||
from maestro import env
|
from island import env
|
||||||
from maestro import multiprocess
|
from island import multiprocess
|
||||||
import os
|
import os
|
||||||
|
|
||||||
def help():
|
def help():
|
||||||
@ -49,19 +49,19 @@ def execute(arguments):
|
|||||||
|
|
||||||
|
|
||||||
# check if .XXX exist (create it if needed)
|
# check if .XXX exist (create it if needed)
|
||||||
if os.path.exists(env.get_maestro_path()) == True \
|
if os.path.exists(env.get_island_path()) == True \
|
||||||
and os.path.exists(env.get_maestro_path_config()) == True \
|
and os.path.exists(env.get_island_path_config()) == True \
|
||||||
and os.path.exists(env.get_maestro_path_manifest()) == True:
|
and os.path.exists(env.get_island_path_manifest()) == True:
|
||||||
debug.error("System already init: path already exist: '" + str(env.get_maestro_path()) + "'")
|
debug.error("System already init: path already exist: '" + str(env.get_island_path()) + "'")
|
||||||
tools.create_directory(env.get_maestro_path())
|
tools.create_directory(env.get_island_path())
|
||||||
# check if the git of the manifest if availlable
|
# check if the git of the manifest if availlable
|
||||||
|
|
||||||
# create the file configuration:
|
# create the file configuration:
|
||||||
data = "repo=" + address_manifest + "\nbranch=" + branch + "\nfile=" + manifest_name
|
data = "repo=" + address_manifest + "\nbranch=" + branch + "\nfile=" + manifest_name
|
||||||
tools.file_write_data(env.get_maestro_path_config(), data)
|
tools.file_write_data(env.get_island_path_config(), data)
|
||||||
|
|
||||||
#clone the manifest repository
|
#clone the manifest repository
|
||||||
cmd = "git clone " + address_manifest + " --branch " + branch + " " + env.get_maestro_path_manifest()
|
cmd = "git clone " + address_manifest + " --branch " + branch + " " + env.get_island_path_manifest()
|
||||||
|
|
||||||
debug.info("clone the manifest")
|
debug.info("clone the manifest")
|
||||||
ret = multiprocess.run_command_direct(cmd)
|
ret = multiprocess.run_command_direct(cmd)
|
@ -8,11 +8,11 @@
|
|||||||
## @license MPL v2.0 (see license file)
|
## @license MPL v2.0 (see license file)
|
||||||
##
|
##
|
||||||
|
|
||||||
from maestro import debug
|
from island import debug
|
||||||
from maestro import tools
|
from island import tools
|
||||||
from maestro import env
|
from island import env
|
||||||
from maestro import multiprocess
|
from island import multiprocess
|
||||||
from maestro import manifest
|
from island import manifest
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
@ -31,20 +31,20 @@ def execute(arguments):
|
|||||||
debug.error("Sync have not parameter")
|
debug.error("Sync have not parameter")
|
||||||
|
|
||||||
# check if .XXX exist (create it if needed)
|
# check if .XXX exist (create it if needed)
|
||||||
if os.path.exists(env.get_maestro_path()) == False \
|
if os.path.exists(env.get_island_path()) == False \
|
||||||
or os.path.exists(env.get_maestro_path_config()) == False \
|
or os.path.exists(env.get_island_path_config()) == False \
|
||||||
or os.path.exists(env.get_maestro_path_manifest()) == False:
|
or os.path.exists(env.get_island_path_manifest()) == False:
|
||||||
debug.error("System already init have an error: missing data: '" + str(env.get_maestro_path()) + "'")
|
debug.error("System already init have an error: missing data: '" + str(env.get_island_path()) + "'")
|
||||||
|
|
||||||
|
|
||||||
configuration = manifest.load_config()
|
configuration = manifest.load_config()
|
||||||
|
|
||||||
debug.info("update manifest : '" + str(env.get_maestro_path_manifest()) + "'")
|
debug.info("update manifest : '" + str(env.get_island_path_manifest()) + "'")
|
||||||
# update manifest
|
# update manifest
|
||||||
cmd = "git fetch --all"
|
cmd = "git fetch --all"
|
||||||
multiprocess.run_command_direct(cmd, cwd=env.get_maestro_path_manifest())
|
multiprocess.run_command_direct(cmd, cwd=env.get_island_path_manifest())
|
||||||
|
|
||||||
file_source_manifest = os.path.join(env.get_maestro_path_manifest(), configuration["file"])
|
file_source_manifest = os.path.join(env.get_island_path_manifest(), configuration["file"])
|
||||||
if os.path.exists(file_source_manifest) == False:
|
if os.path.exists(file_source_manifest) == False:
|
||||||
debug.error("Missing manifest file : '" + str(file_source_manifest) + "'")
|
debug.error("Missing manifest file : '" + str(file_source_manifest) + "'")
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ def execute(arguments):
|
|||||||
id_element += 1
|
id_element += 1
|
||||||
debug.info("sync : " + str(id_element) + "/" + str(len(all_project)) + " : " + str(elem.name))
|
debug.info("sync : " + str(id_element) + "/" + str(len(all_project)) + " : " + str(elem.name))
|
||||||
#debug.debug("elem : " + str(elem))
|
#debug.debug("elem : " + str(elem))
|
||||||
git_repo_path = os.path.join(env.get_maestro_root_path(), elem.path)
|
git_repo_path = os.path.join(env.get_island_root_path(), elem.path)
|
||||||
if os.path.exists(git_repo_path) == False:
|
if os.path.exists(git_repo_path) == False:
|
||||||
# this is a new clone ==> this is easy ...
|
# this is a new clone ==> this is easy ...
|
||||||
#clone the manifest repository
|
#clone the manifest repository
|
@ -218,7 +218,7 @@ class ArgSection:
|
|||||||
##
|
##
|
||||||
## @brief Class to define the agmument list availlable for a program
|
## @brief Class to define the agmument list availlable for a program
|
||||||
##
|
##
|
||||||
class maestroArg:
|
class islandArg:
|
||||||
##
|
##
|
||||||
## @brief Constructor.
|
## @brief Constructor.
|
||||||
## @param[in] self Class handle
|
## @param[in] self Class handle
|
55
island/env.py
Normal file
55
island/env.py
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##
|
||||||
|
## @author Edouard DUPIN
|
||||||
|
##
|
||||||
|
## @copyright 2012, Edouard DUPIN, all right reserved
|
||||||
|
##
|
||||||
|
## @license MPL v2.0 (see license file)
|
||||||
|
##
|
||||||
|
|
||||||
|
# Local import
|
||||||
|
from . import debug
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
system_base_name = "island"
|
||||||
|
|
||||||
|
def set_system_base_name(val):
|
||||||
|
global system_base_name
|
||||||
|
system_base_name = val
|
||||||
|
debug.debug("Set basename: '" + str(system_base_name) + "'")
|
||||||
|
|
||||||
|
def get_system_base_name():
|
||||||
|
global system_base_name
|
||||||
|
return system_base_name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
island_root_path = os.path.join(os.getcwd())
|
||||||
|
island_path = os.path.join(island_root_path, "." + get_system_base_name())
|
||||||
|
island_path_config = os.path.join(island_path, "config.txt")
|
||||||
|
island_path_manifest = os.path.join(island_path, "manifest")
|
||||||
|
|
||||||
|
##
|
||||||
|
## @brief to use later to know where the ".island" parent path is ...
|
||||||
|
## @return the parent path of the ".island"
|
||||||
|
##
|
||||||
|
def get_island_root_path():
|
||||||
|
global island_root_path
|
||||||
|
return island_root_path
|
||||||
|
|
||||||
|
def get_island_path():
|
||||||
|
global island_path
|
||||||
|
return island_path
|
||||||
|
|
||||||
|
def get_island_path_config():
|
||||||
|
global island_path_config
|
||||||
|
return island_path_config
|
||||||
|
|
||||||
|
def get_island_path_manifest():
|
||||||
|
global island_path_manifest
|
||||||
|
return island_path_manifest
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ from lxml import etree
|
|||||||
|
|
||||||
|
|
||||||
def load_config():
|
def load_config():
|
||||||
config_property = tools.file_read_data(env.get_maestro_path_config())
|
config_property = tools.file_read_data(env.get_island_path_config())
|
||||||
element_config = config_property.split("\n")
|
element_config = config_property.split("\n")
|
||||||
if len(element_config) != 3:
|
if len(element_config) != 3:
|
||||||
debug.error("error in configuration property")
|
debug.error("error in configuration property")
|
@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
##
|
|
||||||
## @author Edouard DUPIN
|
|
||||||
##
|
|
||||||
## @copyright 2012, Edouard DUPIN, all right reserved
|
|
||||||
##
|
|
||||||
## @license MPL v2.0 (see license file)
|
|
||||||
##
|
|
||||||
|
|
||||||
# Local import
|
|
||||||
from . import debug
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
system_base_name = "maestro"
|
|
||||||
|
|
||||||
def set_system_base_name(val):
|
|
||||||
global system_base_name
|
|
||||||
system_base_name = val
|
|
||||||
debug.debug("Set basename: '" + str(system_base_name) + "'")
|
|
||||||
|
|
||||||
def get_system_base_name():
|
|
||||||
global system_base_name
|
|
||||||
return system_base_name
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
maestro_root_path = os.path.join(os.getcwd())
|
|
||||||
maestro_path = os.path.join(maestro_root_path, "." + get_system_base_name())
|
|
||||||
maestro_path_config = os.path.join(maestro_path, "config.txt")
|
|
||||||
maestro_path_manifest = os.path.join(maestro_path, "manifest")
|
|
||||||
|
|
||||||
##
|
|
||||||
## @brief to use later to know where the ".maestro" parent path is ...
|
|
||||||
## @return the parent path of the ".maestro"
|
|
||||||
##
|
|
||||||
def get_maestro_root_path():
|
|
||||||
global maestro_root_path
|
|
||||||
return maestro_root_path
|
|
||||||
|
|
||||||
def get_maestro_path():
|
|
||||||
global maestro_path
|
|
||||||
return maestro_path
|
|
||||||
|
|
||||||
def get_maestro_path_config():
|
|
||||||
global maestro_path_config
|
|
||||||
return maestro_path_config
|
|
||||||
|
|
||||||
def get_maestro_path_manifest():
|
|
||||||
global maestro_path_manifest
|
|
||||||
return maestro_path_manifest
|
|
||||||
|
|
||||||
|
|
12
setup.py
12
setup.py
@ -15,16 +15,16 @@ def readme():
|
|||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
setup(name='maestro',
|
setup(name='island',
|
||||||
version='0.1.0',
|
version='0.1.0',
|
||||||
description='Maestro generic source manager (like repo in simple mode)',
|
description='island generic source manager (like repo in simple mode)',
|
||||||
long_description=readme(),
|
long_description=readme(),
|
||||||
url='http://github.com/HeeroYui/maestro',
|
url='http://github.com/HeeroYui/island',
|
||||||
author='Edouard DUPIN',
|
author='Edouard DUPIN',
|
||||||
author_email='yui.heero@gmail.com',
|
author_email='yui.heero@gmail.com',
|
||||||
license='MPL-2',
|
license='MPL-2',
|
||||||
packages=['maestro',
|
packages=['island',
|
||||||
'maestro/actions'],
|
'island/actions'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
'Development Status :: 2 - Pre-Alpha',
|
||||||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
||||||
@ -32,7 +32,7 @@ setup(name='maestro',
|
|||||||
'Topic :: Software Development :: Build Tools'
|
'Topic :: Software Development :: Build Tools'
|
||||||
],
|
],
|
||||||
keywords='source manager repo qisrc lutin',
|
keywords='source manager repo qisrc lutin',
|
||||||
scripts=['bin/maestro'],
|
scripts=['bin/island'],
|
||||||
# Does not work on MacOs
|
# Does not work on MacOs
|
||||||
#data_file=[
|
#data_file=[
|
||||||
# ('/etc/bash_completion.d', ['bash-autocompletion/lutin']),
|
# ('/etc/bash_completion.d', ['bash-autocompletion/lutin']),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user