Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Add installation instructions for Windows users using pipx #5

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FENV_VERSION = "0.0.11.9"
FENV_VERSION = "0.0.12.0"
16 changes: 7 additions & 9 deletions fenv/fenv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: str = "0.0.11.9"
version: str = "0.0.12.0"
""" Module fenv main """
from fenv.customizes.colors import Colors
from fenv.assets.commands import Commands
Expand Down Expand Up @@ -74,7 +74,7 @@ def setup_parse():

onlyenv_cmd = subparsers.add_parser(
"onlyenv",
help=f"Create only virtualenv and no create base file",
help="Create only virtualenv and no create base file",
usage=f"{colors.HOT_PINK}fenv onlyenv{colors.ENDC}",
)

Expand All @@ -97,9 +97,7 @@ def setup_parse():
"-v", "--version", action="store_true", help="check version fenv"
)

args = parser.parse_args()

return args
return parser.parse_args()


def check_command(args):
Expand Down Expand Up @@ -140,17 +138,17 @@ def check_command(args):
CreateFileBaseAndUpdate(
root_directory, "update"
).process_create_base_file_and_update()
print(notice + "Updated tree path to readme.md")
print(f"{notice}Updated tree path to readme.md")
os.system("pip freeze > requirements.txt")
print(notice + "Updated module all to requirements.txt")
print(f"{notice}Updated module all to requirements.txt")
elif args.__dict__["command"] == "onlyenv":
OnlyVirtualEnv().run_process()

elif args.__dict__["command"] == "clean":
question = input(
"Do you want to delete all packages in requirements.txt out? (y/n) "
).lower()
if question == "y" or question == "":
if question in ["y", ""]:
Cleanup().remove_lib_not_default_in_env()
elif args.__dict__["command"] == "activate":
StateEnv().activate()
Expand All @@ -172,5 +170,5 @@ def main():
f"⏩ {colors.LIGHTMAGENTA_EX}Hello,Fenv {colors.POWDER_BLUE}[{colors.MINT_GREEN}v{version}{colors.POWDER_BLUE}]{colors.ENDC}🫡\n".center(
40, "-"
)
) if args.__dict__["command"] == None else None
) if args.__dict__["command"] is None else None
check_command(args)
31 changes: 29 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<h1 align="center">Fenv</h1>


<p align="center"><img src="https://img.shields.io/github/languages/top/watchakorn-18k/Fenv?color=green&logo=python&logoColor=white">
<img src="https://img.shields.io/github/repo-size/watchakorn-18k/Fenv">
<img src="https://img.shields.io/pypi/dm/Fenv?logo=pypi&logoColor=white">
Expand Down Expand Up @@ -32,7 +31,9 @@ Fenv is a simple and efficient tool to help you manage your virtual environments

[Volta/Fenv](https://volta.net/watchakorn-18k/Fenv)

## Installer
## Install

### Linux and macOS

```
pip install fenv
Expand All @@ -44,6 +45,32 @@ or
pip install --upgrade fenv
```

### Windows

If you are using Windows, you can install Fenv using pipx, which is a tool that allows you to install and run Python applications in isolated environments. This is a great way to install Fenv, as it will not interfere with any other Python applications you may have installed on your system.

**Note:** pipx only works with Python 3.6+.

First, install pipx using the following command:

```sh
py -m pip install --user pipx
```

```
py -m pipx ensurepath
```

Then, install Fenv using pipx:

```sh
pipx install fenv
```

**Note:** ensurepath ensures that the application directory is on your $PATH. You may need to restart your terminal for this update to take effect.

You may need to restart your terminal for this update to take effect.

## PyPi

```
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os

new_version = os.getenv("FENV_VERSION")
file_path = os.path.abspath(os.path.dirname(__file__)) + "/fenv/fenv.py"
file_path = f"{os.path.abspath(os.path.dirname(__file__))}/fenv/fenv.py"

# Read the original content of the file
with open(file_path, "r", encoding="utf-8") as file:
Expand Down