Hello Simon,
Am 27.01.25 um 12:11 schrieb Simon Josefsson:
Hi
Could someone help me and upstream how to get python setuptools to get
all files installed for this package?
Please see this thread and upstream bug report:
https://github.com/wolverdude/GenSON/issues/80
I work around the problem in the debian packaging like this:
export PYBUILD_BEFORE_TEST = \
cp -rv {dir}/genson/schema {build_dir}/$(PYBUILD_NAME)
However installing these files should be done by upstream setuptools
magic somehow. Some hint or ideally an upstream merge request to fix
this would be appreciated...
I'm also not a specialist with setuptools or any other Python build tool.
I've tried this small modifications and at least the wheel and the sdist
tarball is then including all data from the genson/ folder.
$ git diff
diff --git a/setup.cfg b/setup.cfg
index 3c9e75f..244f310 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -32,10 +32,12 @@ classifiers =
Topic :: Utilities
[options]
-packages = genson
zip_safe = True
include_package_data = True
+[options.packages.find]
+where=genson
+
[options.entry_points]
console_scripts = genson = genson.__main__:main
A build log (in the upstream source tree) looks then this:
$ python3 -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- setuptools>=44
- wheel
* Getting build dependencies for sdist...
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['genson', 'genson.schema', 'genson.schema.strategies']
* Building sdist...
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['genson', 'genson.schema', 'genson.schema.strategies']
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- setuptools>=44
- wheel
* Getting build dependencies for wheel...
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['genson', 'genson.schema', 'genson.schema.strategies']
* Building wheel...
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['genson', 'genson.schema', 'genson.schema.strategies']
--
Regards
Carsten