vasole / pymca

PyMca Toolkit git repository
Other
57 stars 53 forks source link

[5.9.3] problem observe during the Debian packaging #1083

Open picca opened 1 month ago

picca commented 1 month ago

Hello Armando.

here my remarks for htis version of PyMca :))

thanks a lot

building [html]: targets for 25 source files that are out of date
updating environment: [new config] 25 added, 0 changed, 0 removed
reading sources... [  4%] changelog
reading sources... [  8%] customization/index
reading sources... [ 12%] customization/plugins/index
reading sources... [ 16%] customization/plugins/plugins1d
reading sources... [ 20%] customization/plugins/stackplugins
WARNING: don't know which module to import for autodocumenting 'MENU_TEXT' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pymca5/build/PyMca5/PyMcaPlugins/AdvancedAlignmentScanPlugin.py:docstring of PyMca5.PyMcaPlugins.AdvancedAlignmentScanPlugin:32: WARNING: Inline emphasis start-string without end-string.
WARNING: don't know which module to import for autodocumenting 'MENU_TEXT' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)

it stops the compilation of the doc

# pymca-data
python3 setup.py install_data --root debian/pymca-data/
/usr/lib/python3/dist-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
PyMca X-Ray Fluorescence Toolkit 5.9.3

GUI requirements requested by environment
running install_data
/<<PKGBUILDDIR>>/setup.py:686: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  dftinstall.initialize_options(self)
********************************

No permission to write man pages

********************************

At some point getting rid of the setup.py will become mandatory

vasole commented 1 month ago

At some point getting rid of the setup.py will become mandatory

I am not using it. PyMca should build fine with python -m build

I guess Debian needs it in order to split the package into data, documentation and so on, but PyMca does not use setuptools.

picca commented 1 month ago

[build-system] requires = [ "setuptools", "wheel", "oldest-supported-numpy; python_version< '3.9'", "numpy >= 2.0.0; python_version >= '3.9'", "Cython" ] build-backend = "setuptools.build_meta"

yes you are using setuptools ;), I will try to build only from this and see what is going one.

thanks

Fred

picca commented 1 month ago

Hello after removing the setup.py, I try to build and got this.

$ python -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - Cython
  - numpy >= 2.0.0; python_version >= '3.9'
  - oldest-supported-numpy; python_version< '3.9'
  - setuptools
  - wheel
* Getting build dependencies for sdist...
error: Multiple top-level packages discovered in a flat-layout: ['icons', 'PyMca5', 'package'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
vasole commented 1 month ago

yes you are using setuptools ;), I will try to build only from this and see what is going one.

Ok. I do not think you can avoid it for the time being then. I thought i was not using setuptools because python 3.12 was explicitly preventing the call to setup.py. I do not think you can avoid using setup.py then (for the time being).

I have checked matplotlib, and they still have setuptools in pyproject.toml

https://github.com/matplotlib/matplotlib/blob/main/pyproject.toml

picca commented 1 month ago

the problem with Python3.12 is about distutils not setuptools. :)

I agreed thaht I need setup.py until the full integration is done in pyproject.toml or setup.cfg

Cheers

Fred

vasole commented 1 month ago

The doc should compile now.

I have been able to reproduce the warning and correct it in #1084 with a recent sphinx. I have used the command below to generate the documentation:

sphinx-build ./doc/source ./dist/doc