Skip to content

Fix setuptools configuration and CLI entry point in pyproject.toml#3

Merged
Faragoz merged 3 commits intomainfrom
copilot/fix-pyproject-toml-issues
Jan 29, 2026
Merged

Fix setuptools configuration and CLI entry point in pyproject.toml#3
Faragoz merged 3 commits intomainfrom
copilot/fix-pyproject-toml-issues

Conversation

Copy link

Copilot AI commented Jan 29, 2026

The package could not be installed due to missing setuptools package discovery configuration, and the CLI entry point referenced a non-existent module af_server_client instead of af_client.

Changes

  • Added setuptools package discovery: Configured [tool.setuptools.packages.find] to locate af_client and its subpackages (core, _mock)
  • Fixed CLI entry point: Changed af_server_client.cli:mainaf_client.cli:main
 [project.scripts]
-af-tcp-client = "af_server_client.cli:main"
+af-tcp-client = "af_client.cli:main"

 [build-system]
 requires = ["setuptools>=68.0.0", "wheel"]
 build-backend = "setuptools.build_meta"

+[tool.setuptools.packages.find]
+where = ["."]
+include = ["af_client*"]

This enables successful installation via pip install -e . and proper registration of the af-tcp-client command.

Original prompt

Problem

The project cannot be installed correctly because pyproject.toml is missing critical setuptools configuration and has an incorrect CLI entry point path.

Current Issues

  1. Missing setuptools package configuration: The pyproject.toml uses setuptools as the build backend but doesn't specify where the package code is located, causing Poetry to fail with:

    Error: The current project could not be installed: No file/folder found for package af-tcp-client
    
  2. Incorrect CLI entry point: The [project.scripts] section references af_server_client.cli:main, but the actual module is named af_client.

Solution

Update pyproject.toml with the following changes:

  1. Add [tool.setuptools] section with explicit package configuration:

    [tool.setuptools]
    packages = ["af_client"]
  2. Fix the CLI entry point from af_server_client.cli:main to af_client.cli:main

Updated pyproject.toml

[project]
name = "af-tcp-client"
version = "0.1.0"
description = "Low-latency TCP client for LabVIEW server communication with AF-Serializer"
readme = "README.md"
requires-python = ">=3.10"
authors = [{name = "Faragoz", email = "aragon.froylan@gmail.com"}]
license = {text = "MIT"}

dependencies = [
    "af-serializer @ git+https://github.com/Faragoz/AF-Serializer.git",
    "uvloop>=0.19.0; sys_platform != 'win32'",
    "tomli>=2.0.1; python_version < '3.11'",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.23.0",
    "pytest-cov>=4.1.0",
    "mypy>=1.8.0",
    "ruff>=0.2.0",
]

[project.scripts]
af-tcp-client = "af_client.cli:main"

[build-system]
requires = ["setuptools>=68.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["af_client"]

[tool.ruff]
line-length = 100
target-version = "py310"

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]

Testing

After these changes, users should be able to install the project successfully:

poetry install --no-cache

This will properly install both the af_client package and make the af-tcp-client CLI command available.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Faragoz Faragoz marked this pull request as ready for review January 29, 2026 16:36
Copilot AI review requested due to automatic review settings January 29, 2026 16:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 2 commits January 29, 2026 16:38
Co-authored-by: Faragoz <62692906+Faragoz@users.noreply.github.com>
Co-authored-by: Faragoz <62692906+Faragoz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing setuptools configuration and CLI entry point Fix setuptools configuration and CLI entry point in pyproject.toml Jan 29, 2026
Copilot AI requested a review from Faragoz January 29, 2026 16:44
@Faragoz Faragoz merged commit 3b4cb69 into main Jan 29, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants