Skip to content
Open
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
28 changes: 14 additions & 14 deletions .github/workflows/integtests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ on:

jobs:

# Single source of truth: the oldest supported Python is whatever setup.py
# declares in `python_requires`. Every job below derives its cross-version
# Single source of truth: the oldest supported Python is whatever pyproject.toml
# declares in `requires-python`. Every job below derives its cross-version
# target from this output instead of hardcoding a version.
min-python:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.minpy.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read minimum supported Python from setup.py
- name: Read minimum supported Python from pyproject.toml
id: minpy
run: |
version=$(grep python_requires setup.py | grep -oE '[0-9]+\.[0-9]+' | head -1)
version=$(grep requires-python pyproject.toml | grep -oE '[0-9]+\.[0-9]+' | head -1)
echo "Minimum supported Python: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"

Expand All @@ -45,15 +45,15 @@ jobs:
- name: Simple fades run (newest Python)
run: |
cd /fades
bin/fades -v -d pytest -x pytest --version
python3 -m fades -v -d pytest -x pytest --version
- name: Using the oldest supported Python
env:
OLDEST: ${{ needs.min-python.outputs.version }}
run: |
cd /fades
uv python install "$OLDEST"
OLD=$(uv python find "$OLDEST")
python bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py
python -m fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py

fedora:
needs: min-python
Expand All @@ -73,23 +73,23 @@ jobs:
- name: Simple fades run
run: |
cd /fades
bin/fades -v -d pytest -x pytest --version
python3 -m fades -v -d pytest -x pytest --version
- name: Using the oldest supported Python
env:
OLDEST: ${{ needs.min-python.outputs.version }}
run: |
cd /fades
uv python install "$OLDEST"
OLD=$(uv python find "$OLDEST")
python3 bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py
python3 -m fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py

native-windows:
needs: min-python
strategy:
matrix:
# just a selection otherwise it's too much
# - latest OS (left here even if it's only one to simplify upgrading later)
# - oldest (from setup.py) and newest Python
# - oldest (from pyproject.toml) and newest Python
os: [windows-2025]
python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]

Expand All @@ -114,19 +114,19 @@ jobs:
${{ steps.matrixpy.outputs.python-path }} -m pip install -U packaging
- name: Simple fades run
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v -d pytest -x pytest --version
${{ steps.matrixpy.outputs.python-path }} -m fades -v -d pytest -x pytest --version

- name: Using a different Python
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py
${{ steps.matrixpy.outputs.python-path }} -m fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py

native-generic:
needs: min-python
strategy:
matrix:
# just a selection otherwise it's too much
# - latest OSes
# - oldest (from setup.py) and newest Python
# - oldest (from pyproject.toml) and newest Python
os: [ubuntu-24.04, macos-15]
python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]

Expand All @@ -151,8 +151,8 @@ jobs:
${{ steps.matrixpy.outputs.python-path }} -m pip install -U packaging
- name: Simple fades run
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v -d pytest -x pytest --version
${{ steps.matrixpy.outputs.python-path }} -m fades -v -d pytest -x pytest --version

- name: Using a different Python
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py
${{ steps.matrixpy.outputs.python-path }} -m fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py
13 changes: 6 additions & 7 deletions HOWTO_RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Steps before a release is done
------------------------------

Check all is crispy
Check all is crispy (building needs the 'build' package: pip install build)

rm -rf build dist
./setup.py clean build
./setup.py clean sdist
python3 -m fades -d build -m build


Edit the ``fades/_version.py`` file properly, then tag and commit/push
Expand All @@ -21,7 +20,7 @@ How to release it to PyPI
Dead simple:

rm -rf build dist
./setup.py clean sdist
python3 -m fades -d build -m build
fades -d twine -x twine upload dist/fades-*


Expand All @@ -31,7 +30,7 @@ How to create a .deb
Create the tarball:

rm -rf build dist
./setup.py clean sdist
python3 -m fades -d build -m build --sdist


Copy this tarball to a clean dir, renaming as "orig"
Expand Down Expand Up @@ -155,9 +154,9 @@ Read the Docs
- go and login there, go to "fades" project
- in "Versions" tab, activate the new version (corresponding to the release in github)
- in "Administrator" tab, go to option "Advanced configuration" at the left, choose latest release as "default version"
- verify all latest is seen in
- verify all latest is seen in

http://fades.rtfd.org/
http://fades.rtfd.org/


How to sign the files
Expand Down
45 changes: 0 additions & 45 deletions bin/fades

This file was deleted.

20 changes: 0 additions & 20 deletions bin/fades.cmd

This file was deleted.

3 changes: 1 addition & 2 deletions build_readme
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
FADES='./bin/fades -r requirements.txt'
python3 setup.py --long-description | $FADES -x rst2html5 > README.html
python3 -m fades -r requirements.txt -x rst2html5 < README.rst > README.html
11 changes: 2 additions & 9 deletions fades/__main__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
"""Init file to allow execution of fades as a module."""

import sys
from fades.main import console_entry_point

from fades import main, FadesError

try:
rc = main.go()
except FadesError:
sys.exit(-1)

sys.exit(rc)
console_entry_point()
13 changes: 13 additions & 0 deletions fades/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,16 @@ def _signal_handler(signum, _):
if rc:
logger.debug("Child process not finished correctly: returncode=%d", rc)
return rc


def console_entry_point():
"""Run fades as a command line program, handling its own errors.

This is the target of the 'fades' console script declared in
pyproject.toml and is also used to run fades as a module.
"""
try:
rc = go()
except FadesError:
sys.exit(-1)
sys.exit(rc)
90 changes: 90 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Copyright 2014-2026 Facundo Batista, Nicolás Demarchi
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# For further info, check https://github.com/PyAr/fades

[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "fades"
dynamic = ["version"]
description = "A system that automatically handles the virtualenvs in the cases normally found when writing scripts and simple programs, and even helps to administer big projects."
readme = "README.rst"
license = {text = "GPL-3"}
authors = [
{name = "Facundo Batista", email = "facundo@taniquetil.com.ar"},
{name = "Nicolás Demarchi", email = "mail@gilgamezh.me"},
]
requires-python = ">=3.10"
keywords = ["virtualenv", "utils", "utility", "scripts"]
dependencies = ["packaging"]
classifiers = [
"Development Status :: 5 - Production/Stable",

"Environment :: Console",

"Intended Audience :: Developers",
"Intended Audience :: System Administrators",

"License :: OSI Approved :: GNU General Public License (GPL)",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",

"Natural Language :: English",
"Natural Language :: Spanish",

"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",

"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",

"Topic :: Software Development",
"Topic :: Utilities",
]

[project.optional-dependencies]
pyxdg = ["pyxdg"]

[project.urls]
Homepage = "https://github.com/PyAr/fades"
Documentation = "https://fades.readthedocs.io/"
Download = "https://github.com/PyAr/fades/releases"

[project.scripts]
fades = "fades.main:console_entry_point"

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

[tool.setuptools.dynamic]
version = {attr = "fades._version.__version__"}

# NOTE: the man page is installed under <prefix>/share/man/man1 via data_files
# declared in setup.py -- PEP 621 / pyproject.toml has no equivalent for it, and
# modern setuptools no longer accepts data_files in this file. That tiny setup.py
# is the only remaining piece of the legacy build; everything else lives here.
Loading
Loading