From: alex Date: Sun, 9 Jun 2024 14:01:48 +0000 (+0200) Subject: Manage using rye X-Git-Tag: 20241020-emacs~156 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=183c60cb7694febba9006aef95e1ba083ffe84f0;p=alex.git Manage using rye --- diff --git a/personal_infra/.python-version b/personal_infra/.python-version new file mode 100644 index 0000000..871f80a --- /dev/null +++ b/personal_infra/.python-version @@ -0,0 +1 @@ +3.12.3 diff --git a/personal_infra/HACKING.md b/personal_infra/HACKING.md index b20baba..23ba811 100644 --- a/personal_infra/HACKING.md +++ b/personal_infra/HACKING.md @@ -13,15 +13,13 @@ Symlink everything in this directory into your root infrastructure directory. Create an `inventory` file. -Use the [quay.io/alexpdp7/workstation:latest](https://quay.io/repository/alexpdp7/workstation) image to run Ansible, using a tool such as [Toolbox](https://containertoolbx.org/) or [Distrobox](https://distrobox.it/). - Create `vault_password` with a vault password. -### Usage +Use `rye sync` to set up Python. -Run `. .venv/bin/activate` to activate the virtual environment. +### Usage -Run Ansible commands normally. +Run Ansible commands with `rye run`. ## Ansible/Puppet integration diff --git a/personal_infra/pyproject.toml b/personal_infra/pyproject.toml new file mode 100644 index 0000000..ea08781 --- /dev/null +++ b/personal_infra/pyproject.toml @@ -0,0 +1,23 @@ +[project] +name = "sys2" +version = "0.1.0" +description = "Add your description here" +dependencies = [ + "ansible>=10.0.1", + "jmespath>=1.0.1", + "botocore>=1.34.122", + "boto3>=1.34.122", +] +requires-python = ">= 3.8" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.rye] +managed = true +dev-dependencies = [] +virtual = true + +[tool.hatch.metadata] +allow-direct-references = true diff --git a/personal_infra/requirements-dev.lock b/personal_infra/requirements-dev.lock new file mode 100644 index 0000000..d30a3e6 --- /dev/null +++ b/personal_infra/requirements-dev.lock @@ -0,0 +1,44 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false + +ansible==10.0.1 +ansible-core==2.17.0 + # via ansible +boto3==1.34.122 +botocore==1.34.122 + # via boto3 + # via s3transfer +cffi==1.16.0 + # via cryptography +cryptography==42.0.8 + # via ansible-core +jinja2==3.1.4 + # via ansible-core +jmespath==1.0.1 + # via boto3 + # via botocore +markupsafe==2.1.5 + # via jinja2 +packaging==24.0 + # via ansible-core +pycparser==2.22 + # via cffi +python-dateutil==2.9.0.post0 + # via botocore +pyyaml==6.0.1 + # via ansible-core +resolvelib==1.0.1 + # via ansible-core +s3transfer==0.10.1 + # via boto3 +six==1.16.0 + # via python-dateutil +urllib3==2.2.1 + # via botocore diff --git a/personal_infra/requirements.lock b/personal_infra/requirements.lock new file mode 100644 index 0000000..d30a3e6 --- /dev/null +++ b/personal_infra/requirements.lock @@ -0,0 +1,44 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false + +ansible==10.0.1 +ansible-core==2.17.0 + # via ansible +boto3==1.34.122 +botocore==1.34.122 + # via boto3 + # via s3transfer +cffi==1.16.0 + # via cryptography +cryptography==42.0.8 + # via ansible-core +jinja2==3.1.4 + # via ansible-core +jmespath==1.0.1 + # via boto3 + # via botocore +markupsafe==2.1.5 + # via jinja2 +packaging==24.0 + # via ansible-core +pycparser==2.22 + # via cffi +python-dateutil==2.9.0.post0 + # via botocore +pyyaml==6.0.1 + # via ansible-core +resolvelib==1.0.1 + # via ansible-core +s3transfer==0.10.1 + # via boto3 +six==1.16.0 + # via python-dateutil +urllib3==2.2.1 + # via botocore