Change the way to add extra materials to xraydb
I had an issue with the current way to add extra materials from setup.py
: On macOS, the path is not .config/xraydb
(see https://github.com/xraypy/XrayDB/blob/c5097e88a6a42551186cf8773870eab8888297a2/python/xraydb/materials.py#L13-L27).
This PR proposes to fix this issue by moving the extra materials initialisation from setup.py
to txs.corr
where xraydb
is imported and to use xraydb.add_material
.
This would also fix the issue of missing materials when sharing a Python environment with a user that didn't performed the installation.
It also removes code execution during installation, which allows to provide Python wheels and eventually convert setup.py
to a config file (setup.cfg
or pyproject.toml
).