[DEV] correct version selection

This commit is contained in:
Edouard DUPIN 2024-01-29 00:12:52 +01:00
parent 15a537455c
commit f83cad03ed
23 changed files with 44 additions and 44 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cSpell.words": ["realog"]
}

View File

@ -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

View File

@ -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 .

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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")

View File

@ -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())

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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())

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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)

View File

@ -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"