Compare commits

...

2 Commits

Author SHA1 Message Date
Ploum 8d082cb2df migration to hatchling and 2.0-beta2 release 2023-11-08 11:37:29 +01:00
Jean Abou Samra e1e25b9456 Simple packaging fix
--=-6tQG7FEKAZyWWN9kR8o8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Ploum,

I'm the author of the "d=C3=A9p=C3=AAche" you commented on here:

https://linuxfr.org/news/l-installation-et-la-distribution-de-paquets-pytho=
n-1-4#comment-1940663

I skimmed at your problem. I admit I have not read all packaging-related
threads on this mailing list. If I understand correctly, you want
to keep using the (relatively non-standard) current setup of
Offpunk, namely a bunch of scripts at the root of the source tree.

You can't do that with Flit, because it's an opinionated tool
which insists that you do it the more standard way. So here's
a simple patch that does it with hatchling instead.

You might also want to review the dependency list in pyproject.toml.
I see "timg>=3D1.3.2", but the latest version of timg on PyPI
is 1.1.6.

Best,
Jean

From 90b3b2ab3700c57f76d3ae5760a4f49048bca70d Mon Sep 17 00:00:00 2001
From: Jean Abou Samra <jean@abou-samra.fr>
Date: Tue, 7 Nov 2023 23:16:43 +0100
Subject: [PATCH] Basic fix for packaging

Flit is not suitable for this project because it insists on packaging a
single package, while Ploum insists on keeping top-level scripts that
aren't inside a package. Use hatchling instead.

To test:

$ python -m venv temp-test-venv # may require "apt install python3-venv" or such
$ source temp-test-venv/bin/activate
$ pip install .[http]
$ offpunk
$ deactivate

To check the build artifacts:

$ python -m build # may require "apt install python3-build" or such
$ cd dist
$ tar -xvf offpunk-2.0b1.tar.gz # check files, this should contain everything
$ unzip offpunk-2.0b1-py3-none-any.whl # check files, this should contain only Python modules (plus a dist-info directory)
2023-11-08 11:34:03 +01:00
2 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,8 @@
# Offpunk History
## 2.0-beta2 - unreleased
## 2.0-beta2 - November 8th 2023
Changes since beta1
- IMPORTANT: migrating from flit to hatchling (patch by Jean Abou Samra)
- "--sync" can optionnaly take some lists as arguments, in order to make for specific sync
- "view source" to view the source code of a page
- initial tentative to support podcasts in RSS/Atom feeds

View File

@ -1,6 +1,6 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "offpunk"
@ -49,5 +49,12 @@ netcache = "netcache:main"
ansicat = "ansicat:main"
opnk = "opnk:main"
[tool.flit.sdist]
include = ["doc/", "man/", "CHANGELOG"]
[tool.hatch.version]
path = "offpunk.py" # read __version__
[tool.hatch.build.targets.wheel]
only-include = [
"ansicat.py", "cache_migration.py", "netcache.py",
"offblocklist.py", "offpunk.py", "offthemes.py",
"offutils.py", "opnk.py",
]