From 000df13f08b2369c3b96a0ccaafb8c7886120be2 Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Thu, 3 Jul 2025 07:33:18 -0400 Subject: [PATCH 1/6] Add section in README that simulates python3 -m pip install pandas --user. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index a91504ca..e2020c56 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,34 @@ For class usage refer to the [Reference]("https://github.com/voxpupuli/puppet-py bundle exec rake strings:generate\[',,,,false,true'] ``` +### Install Python package to a user's default install directory + +The following code simulates +```shell +python3 -m pip install pandas --user` +``` +where pip installs packages to a user's default install directory -- +typically ~/.local/ on Linux. + +``` +# Somewhat hackisly, install Python PIP module PANDAS for Oracle Cloud API queries. +python::pyvenv { 'user_python_venv' : + ensure => present, + version => 'system', + systempkgs => true, + venv_dir => '/home/example/.local', + owner => 'example', + group => 'example', + mode => '0750', +} + +python::pip { 'pandas': + virtualenv => '/home/example/.local', + owner => 'example', + group => 'example', +} +``` + ### hiera configuration This module supports configuration through hiera. The following example From 2a7705f6d3148569e002c65354b4843f0c9312e9 Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Mon, 7 Jul 2025 15:06:14 -0400 Subject: [PATCH 2/6] Update README.md Co-authored-by: Kenyon Ralph --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e2020c56..f7669b11 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ bundle exec rake strings:generate\[',,,,false,true'] ### Install Python package to a user's default install directory The following code simulates + ```shell -python3 -m pip install pandas --user` +python3 -m pip install pandas --user ``` where pip installs packages to a user's default install directory -- typically ~/.local/ on Linux. From 03317cf3a766a9f9492f989c341a1e81d116e70d Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Mon, 7 Jul 2025 15:06:19 -0400 Subject: [PATCH 3/6] Update README.md Co-authored-by: Kenyon Ralph --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7669b11..ce9074f3 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The following code simulates python3 -m pip install pandas --user ``` where pip installs packages to a user's default install directory -- -typically ~/.local/ on Linux. +typically `~/.local/` on Linux. ``` # Somewhat hackisly, install Python PIP module PANDAS for Oracle Cloud API queries. From c7f98251e808ed75368f6f5223e499f6c4c0a24c Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Mon, 7 Jul 2025 15:06:25 -0400 Subject: [PATCH 4/6] Update README.md Co-authored-by: Kenyon Ralph --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce9074f3..236f1e89 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ python3 -m pip install pandas --user where pip installs packages to a user's default install directory -- typically `~/.local/` on Linux. -``` -# Somewhat hackisly, install Python PIP module PANDAS for Oracle Cloud API queries. +```puppet +# Somewhat hackishly, install Python PIP module PANDAS for Oracle Cloud API queries. python::pyvenv { 'user_python_venv' : ensure => present, version => 'system', From ff0707c72b1cb9fceb3c07d969864f050f5ea182 Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Mon, 7 Jul 2025 15:06:30 -0400 Subject: [PATCH 5/6] Update README.md Co-authored-by: Kenyon Ralph --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 236f1e89..89a21ead 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ typically `~/.local/` on Linux. ```puppet # Somewhat hackishly, install Python PIP module PANDAS for Oracle Cloud API queries. -python::pyvenv { 'user_python_venv' : +python::pyvenv { 'user_python_venv': ensure => present, version => 'system', systempkgs => true, From a9cb09500d05306ebbaf2f81d72e2613ab70210e Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Mon, 7 Jul 2025 15:06:53 -0400 Subject: [PATCH 6/6] Update README.md Co-authored-by: Kenyon Ralph --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 89a21ead..59d95fd3 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,9 @@ python::pyvenv { 'user_python_venv': } python::pip { 'pandas': - virtualenv => '/home/example/.local', - owner => 'example', - group => 'example', + virtualenv => '/home/example/.local', + owner => 'example', + group => 'example', } ```