Python build succeeds but not added to /bin #4963
-
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Short answer, you're just missing this snippet in your [build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" All $ git clone https://github.com/bhq12/serviciser .
$ python3 -m venv .venv
$ .venv/bin/pip install .
$ cat .venv/bin/serviciser
cat: .venv/bin/serviciser: No such file or directory So really the problem is Now your diff --git a/pyproject.toml b/pyproject.toml
index 78a0447..fa1ccea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,12 +1,8 @@
-[project]
-name = 'serviciser'
-requires-python = ">=3.9"
-version = "1.0.0"
-
[tool.poetry]
-name = "cli"
+name = "serviciser"
version = "1.0.0"
description = "CLI tool for initialising new services"
+packages = [{ include = "cli" }]
authors = ["bhq12"]
license = "MIT"
readme = "README.md"
@@ -16,11 +12,9 @@ python = ">=3.10,<3.13"
inquirer = "^3.1.3"
pyinstaller = "^6.2.0"
-[tool.setuptools.packages.find]
-where = ["."] # list of folders that contain the packages (["."] by default)
-include = ["cli"] # package names should match these glob patterns (["*"] by default)
-exclude = [] # exclude packages matching these glob patterns (empty by default)
-namespaces = false # to disable scanning PEP 420 namespaces (true by default)
-
[tool.poetry.scripts]
serviciser = "cli.cli:main"
+
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api" |
Beta Was this translation helpful? Give feedback.
-
This symlinks it to Brew flat-out refuses to do anything requiring |
Beta Was this translation helpful? Give feedback.
Short answer, you're just missing this snippet in your
pyproject.toml
:All
brew
is doing is installing your package withpip
:So really the problem is
pip
doesn't currently know about your CLI script. When pip installs a package, it reads a specialbuild-system
table in yourpyproject.toml
to know how to find your package metadata (you can read more about that here). If you omit this, it defaults tosetuptools
.Now your
pyproje…