Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,14 @@ jobs:
run: |
. ./env/bin/activate
pip install tox==${{ env.TOX_VERSION }}
- name: Prevent 0.0.0 releases I
run: |
. ./env/bin/activate
tox -e version.py
cat px/version.py
! grep '0.0.0' px/version.py
- name: Run tox to create the dist wheel
run: |
. ./env/bin/activate
tox
- name: Prevent 0.0.0 releases II
- name: Prevent 0.0.0 releases
run: |
cat px/version.py
! grep '0.0.0' px/version.py
ls dist/
! ls dist/ | grep '0.0.0'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
# The point is to run as little as possible on macOS because macOS runs are
# slow and expensive, look for "multiplier" on this page:
# https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions
tox -e version.py,installtest,pytest,package,test-package,test-wheel
tox -e installtest,pytest,package,test-package,test-wheel
4 changes: 0 additions & 4 deletions .pylintrc

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Development
Prerequisites
-------------

* A Python 3.6+ version
* A Python 3.9+ version
* `tox`_

Building and Running
Expand Down
2 changes: 1 addition & 1 deletion devbin/ptop-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

DOCKERFILE="
FROM python:3.6-alpine
FROM python:3.9-alpine

RUN apk add sudo py3-tox shellcheck bash git unzip lsof gcc python3-dev procps acct musl-dev zip
RUN echo 'root ALL=(ALL:ALL) ALL' > /etc/sudoers
Expand Down
5 changes: 1 addition & 4 deletions devbin/test_clone_and_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""

import os
import sys
import shutil
import subprocess
import sys
import tempfile

# Copy everything to a temporary directory
Expand Down Expand Up @@ -38,9 +38,6 @@
)

# Build the clone
print("Building sources using setup.py...")
subprocess.run(["python3", "setup.py", "build"], check=True)

print("Building sources using python -m build...")
FAKE_VERSION = "99.99.99"
subprocess.run(["git", "config", "user.email", "you@example.com"], check=True)
Expand Down
2 changes: 1 addition & 1 deletion devbin/tox-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

DOCKERFILE="
FROM python:3.6-alpine
FROM python:3.9-alpine

RUN apk add sudo py3-tox shellcheck bash git zip unzip lsof gcc python3-dev procps acct musl-dev
RUN echo 'root ALL=(ALL:ALL) ALL' > /etc/sudoers
Expand Down
14 changes: 0 additions & 14 deletions mypy.ini

This file was deleted.

8 changes: 4 additions & 4 deletions px/px.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def handleLogMessages(messages: Optional[str]) -> None:
# even if we don't use it. And this will make test avoidance fail to avoid
# px.py tests every time you make a new commit (because committing recreates
# version.py).
from . import version
from .version import __version__

sys.stderr.write("px version: " + version.VERSION + "\n")
sys.stderr.write("px version: " + __version__ + "\n")

sys.stderr.write("\n")
sys.stderr.write("Python version: " + sys.version + "\n")
Expand All @@ -168,9 +168,9 @@ def _main(argv: List[str]) -> None:
# NOTE: If we "import version" at the top of this file, we will depend on it even if
# we don't use it. And this will make test avoidance fail to avoid px.py tests every
# time you make a new commit (because committing recreates version.py).
from . import version
from .version import __version__

print(version.VERSION)
print(__version__)
return

with_pager: Optional[bool] = None
Expand Down
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[project]
name = "pxpx"
description = "ps and top for Human Beings"
readme = "README.rst"

Copy link
Copy Markdown
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
Copy Markdown
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/

license = "MIT"
authors = [{ name = "Johan Walles", email = "johan.walles@gmail.com" }]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: System Administrators",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Topic :: System :: Monitoring",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/walles/px"

[project.scripts]
px = "px.px:main"
ptop = "px.px:main"
pxtree = "px.px:main"

[tool.setuptools.data-files]
"share/man/man1" = ["doc/*.1"]

[tool.setuptools.packages.find]
include = ["px*"]

[tool.setuptools_scm]
version_file = "px/version.py"
fallback_version = "0.0.0+unknown"

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_ignores = true

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["-v"]

[build-system]
requires = ["setuptools>=77", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
9 changes: 0 additions & 9 deletions setup.cfg

This file was deleted.

124 changes: 0 additions & 124 deletions setup.py

This file was deleted.

Loading
Loading