1

I need a script to be produced by installing the package and to be put in user PATH. I've followed the Hatch guide on entry points and my directory looks like this:

.
├── docs
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   ├── Makefile
│   ├── modules.rst
│   ├── pylb.experiments.rst
│   └── pylb.rst
├── LICENSE.txt
├── pyproject.toml
├── README.md
├── src
│   └── pylb
│       ├── __about__.py
│       ├── experiments
│       │   ├── __init__.py
│       │   └── sphinx.py
│       ├── __init__.py
│       └── scripts
│           └── __init__.py
└── tests
    └── __init__.py

my pyproject.toml looks like this:

[project.scripts]
pylbtestapp = "pylb.scripts:main"

and src/pylb/scripts/__init__.py is:

def main():
    print("Hi There! This is pylb test app.")

But when I install the package with pip, it does not put the script as it should (I guess). What am I doing wrong? For more info the full repo is here.

Luca Braglia
  • 3,133
  • 1
  • 16
  • 21
  • What exactly is not working? I cloned the repo in a venv and pip installed it, this exposed the entry point just fine on my system (Debian 11, python 3.11.2) However, the `pip install pylb` does not work. After some looking trough it, it is obvious why, as that installed a package with completely different sources than the one found in the question, which comments and a readme in mandarin. – Egeau Apr 15 '23 at 19:29
  • @Egeau somehow, i don't know how, now it's working as intended. Thank you for testing. – Luca Braglia Apr 15 '23 at 22:24
  • puzzle solved... being late evening i was using `pip install --user pylb` instead of `pip install --user ./pylb`, so installing pypi's pylb, which is a different package .. – Luca Braglia Apr 16 '23 at 06:54

0 Answers0