Skip to content

Conversation

@branchv
Copy link
Contributor

@branchv branchv commented Aug 26, 2025

I noticed the manpage was intentionally omitted from setup.py since bf6eb98, however manpages are now recognized by installers like pipx and homebrew (with uv to hopefully follow soon). So this installs them at the standard share/man/man1 path

Also, I took the opportunity to migrate to pyproject.toml(the modern replacement for setup.py favoring static metadata). Things should generally be the same, but note I:

  • Replaced the custom version detection with setuptools_scm (which is generally more familiar to packagers and allows easily overriding the version when building from a source tarball)
  • Removed unused .pylintrc and merge mypy.ini and setup.cfg into pyproject.toml
  • Added an explicit requires-python = ">=3.9" (which is the currently supported pythons, lmk if this should be something else)

[project]
name = "pxpx"
description = "ps and top for Human Beings"
readme = "README.rst"
Copy link
Owner

Choose a reason for hiding this comment

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

The old setup.py used the README.rst as long_description.

Does setting readme here have the same effect?

For clarity, I don't know what the effect was of setting that...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup they both map to the core metadata field Description which for example PyPI displays: https://pypi.org/project/pxpx/

@walles walles requested a review from Copilot August 26, 2025 19:48
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.

Pull Request Overview

This PR modernizes the Python packaging setup by migrating from setup.py to pyproject.toml and adds manpage installation support for package managers like pipx and homebrew.

  • Migrates from setup.py to pyproject.toml with static metadata configuration
  • Replaces custom version detection with setuptools_scm for standardized version management
  • Consolidates configuration files (mypy.ini, setup.cfg) into pyproject.toml

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
setup.py Removed entire custom setup script with version detection logic
pyproject.toml Added modern Python packaging configuration with metadata and tool settings
tox.ini Updated test environment to remove version.py dependency and cleanup commands
px/px.py Updated version imports to use __version__ from setuptools_scm
setup.cfg Removed file, configuration moved to pyproject.toml
mypy.ini Removed file, configuration moved to pyproject.toml
.pylintrc Removed unused pylint configuration
devbin/test_clone_and_build.py Removed setup.py build step and fixed import ordering
.github/workflows/macos-ci.yml Removed version.py tox environment from CI
.github/workflows/deployment.yml Updated deployment workflow to check version after build

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@walles walles merged commit 9803f95 into walles:python Aug 27, 2025
3 checks passed
@walles
Copy link
Owner

walles commented Aug 27, 2025

Beautiful, thanks Vincent! :)

@branchv branchv deleted the pyproject branch August 27, 2025 05:04
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.

2 participants