cnpryer / huak

My experimental Python package manager.

Home Page:https://cnpryer.github.io/huak/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during install dependencies: `huak install`

abhi3700 opened this issue · comments

I am facing an issue during huak install command.

Here is my pyproject.toml file:

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "semantic-hashing-demo"
version = "0.0.1"
description = ""
dependencies = [
    "marvin ==2.1.5",
    "numpy ==1.26.4",
    "openai ==1.12.0",
    "polars ==0.20.10",
    "pyarrow ==15.0.0",
]

[project.optional-dependencies]
dev = [
    "build ==1.0.3",
    "mypy ==1.8.0",
    "ruff ==0.2.1",
]

[tool.huak.task]
preprocess = "python3 src/semantic_hashing_demo/preprocessing.py"
detect = "python3 src/semantic_hashing_demo/detection.py"
generate = "python3 src/semantic_hashing_demo/generate_data.py"
post_generate = "python3 src/semantic_hashing_demo/process_generated_data.py"

Ideally it is supposed to install all the project dependencies in .venv. But, it's not happening, instead asking to do this:

 huak install                                                   
error: the following required arguments were not provided:
  <PACKAGE>

Usage: huak install <PACKAGE>

For more information, try '--help'.

Currently, I am managing via following this:

huak build
huak activate
pip install -r requirements.txt

All these to install the desired packages inside .venv/lib/python3.x/site-packages folder.

I got requirements.txt by manually copying the dependencies from pyproject.toml & cleaning it as per needed. I can create a script to parse this using toml python package.

Any fix for huak install?

Hi! Thanks for this! Are you building Huak from source?

I have used pip install git+https://github.com/cnpryer/huak@master#egg=huak to install in my system.

I see! That functionality is behind huak init now. See #867.

When I originally built this I was blending my experience with poetry together with my experience with cargo. I made the wrong decision at that time. I felt that I'd be able to move cargo install behind huak toolchain install eventually, but I've decided against that. So I've repurposed huak install here #872.

Note that a lot of this is still very raw (see disclaimer in README). This project isn't in a production-ready state.

Thanks for using it though!

This should be updated to include more detail about huak init's new functionality. I apologize.

/// Initialize the current project.