[DEV] correct version selection
This commit is contained in:
parent
15a537455c
commit
f83cad03ed
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"cSpell.words": ["realog"]
|
||||
}
|
11
README.md
11
README.md
@ -73,9 +73,16 @@ Show the status of the workspace
|
||||
Develop in local (with virtual env):
|
||||
====================================
|
||||
|
||||
see: https://setuptools.pypa.io/en/latest/userguide/development_mode.html
|
||||
|
||||
Create your development environment:
|
||||
```bash
|
||||
source ./develop.env
|
||||
# Create a virtual environment
|
||||
python -m venv .venv
|
||||
# Activate the python virtual environment
|
||||
source .venv/bin/activate
|
||||
# Install the package in editable mode (dynamic use of files)
|
||||
pip install --editable .
|
||||
```
|
||||
|
||||
Run the application . ```island --help```
|
||||
@ -92,7 +99,7 @@ Create the new version:
|
||||
|
||||
```bash
|
||||
# Clean previous packages
|
||||
rm -rf dist/
|
||||
\rm -rf dist/
|
||||
# Compile the package
|
||||
python3 -m build
|
||||
# Upload the package
|
||||
|
14
develop.env
14
develop.env
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#use with source ./develop.env
|
||||
|
||||
# see: https://setuptools.pypa.io/en/latest/userguide/development_mode.html
|
||||
|
||||
set -e
|
||||
|
||||
# Create a virtual environment
|
||||
python -m venv .venv
|
||||
# Activate the python virtual environment
|
||||
source .venv/bin/activate
|
||||
# Install the package in editable mode (dynamic use of files)
|
||||
pip install --editable .
|
@ -63,7 +63,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -52,7 +52,7 @@ def execute(_arguments):
|
||||
cmd += elem.get_arg() + " "
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -64,7 +64,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -57,7 +57,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -62,7 +62,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -56,7 +56,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
debug.info("fetch manifest : '" + str(env.get_island_path_manifest()) + "'")
|
||||
commands.fetch(env.get_island_path_manifest(), "origin")
|
||||
|
@ -75,7 +75,7 @@ def execute(_arguments):
|
||||
debug.info("Init with: '" + address_manifest + "' branch='" + branch + "' name of manifest='" + manifest_name + "'")
|
||||
|
||||
# check if .XXX exist (create it if needed)
|
||||
if manifest.is_lutin_init() is True:
|
||||
if manifest.is_island_init() is True:
|
||||
debug.error("System already init: path already exist: '" + str(env.get_island_path()) + "'")
|
||||
|
||||
tools.create_directory(env.get_island_path())
|
||||
|
@ -65,7 +65,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -52,7 +52,7 @@ def execute(_arguments):
|
||||
debug.error("pull Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -56,7 +56,7 @@ def execute(_arguments):
|
||||
debug.error("pull Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -62,7 +62,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
elem = configuration.get_manifest_config()
|
||||
|
@ -51,7 +51,7 @@ def execute(_arguments):
|
||||
debug.error("pull Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -56,7 +56,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -66,7 +66,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
file_source_manifest = os.path.join(env.get_island_path_manifest(), configuration.get_manifest_name())
|
||||
|
@ -67,7 +67,7 @@ def execute(_arguments):
|
||||
)
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -70,7 +70,7 @@ def execute(_arguments):
|
||||
debug.error("SYNC Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
configuration = config.get_unique_config()
|
||||
|
||||
|
@ -81,7 +81,7 @@ def execute(_arguments):
|
||||
debug.info("Add 'volatile' repository: '" + address_git + "' path='" + path + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
# Update the current configuration:
|
||||
conf = config.get_unique_config()
|
||||
|
@ -44,7 +44,7 @@ def execute(_arguments):
|
||||
debug.error("Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check system is OK
|
||||
manifest.check_lutin_is_init()
|
||||
manifest.check_island_is_init()
|
||||
|
||||
conf = config.get_unique_config()
|
||||
volatiles = conf.get_volatile()
|
||||
|
@ -29,22 +29,22 @@ from . import (
|
||||
)
|
||||
|
||||
|
||||
def is_lutin_init():
|
||||
if os.path.exists(env.get_island_path()) is False:
|
||||
def is_island_init():
|
||||
if not os.path.exists(env.get_island_path()):
|
||||
debug.verbose(f"Island is not init: path does not exist: '{env.get_island_path()}'")
|
||||
return False
|
||||
if os.path.exists(env.get_island_path_config()) is False and os.path.exists(env.get_island_path_config_old()) is False:
|
||||
debug.verbose(f"Island is not init: config does not exist: '{env.get_island_path_config()}' or '{env.get_island_path_config_old()}'")
|
||||
if not os.path.exists(env.get_island_path_config()):
|
||||
debug.verbose(f"Island is not init: config does not exist: '{env.get_island_path_config()}'")
|
||||
return False
|
||||
if os.path.exists(env.get_island_path_manifest()) is False:
|
||||
if not os.path.exists(env.get_island_path_manifest()):
|
||||
debug.verbose(f"Island is not init: Manifest does not exist: '{env.get_island_path_manifest()}'")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def check_lutin_is_init():
|
||||
def check_island_is_init():
|
||||
# check if .XXX exist (create it if needed)
|
||||
if not is_lutin_init():
|
||||
if not is_island_init():
|
||||
debug.error(f"System not init: missing config: '{env.get_island_path()}'. Call <island init> first")
|
||||
exit(-1)
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
[project]
|
||||
name = "island"
|
||||
version = "1.1.0"
|
||||
requires-python = ">=3.7"
|
||||
dependencies = ["lxml", "realog", "death", "PyYAML"]
|
||||
description = "island generic source manager (like repo in simple mode)"
|
||||
@ -20,14 +19,19 @@
|
||||
"Topic :: Software Development :: Build Tools"
|
||||
]
|
||||
keywords = ["source", "manager", "repo", "qisrc", "lutin"]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.scripts]
|
||||
island = "island.bin_island:main"
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "http://github.com/HeeroYui/island"
|
||||
"Bug Reports" = "http://github.com/HeeroYui/island/issues"
|
||||
"Source" = "http://github.com/HeeroYui/island"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {file = "version.txt"}
|
||||
|
||||
[tool.black]
|
||||
line-length = 150
|
||||
|
||||
[project.scripts]
|
||||
island = "island.bin_island:main"
|
||||
|
Loading…
Reference in New Issue
Block a user