Hello. I have been building dolfinx 0.8.x for some time, and I would like to share that my installation works better when python/pyproject.toml has this:
I do not have accounts with GitHub (Microsoft). If you want to use the code above, I don’t need attribution. If it’s not useful, that’s ok : ) . Thanks for FEniCS.
I’ll get the specific error message, but it happens during the installation with a PKGBUILD (pacman-based distro e.g. Parabola, Artix or Arch). The package is built and installed without pip, but with python build and install. In this type of distribution, that is the standard way.
Right now, I don’t have access to the code (my dog ate my Internet… can’t reach the repo). Trying to remember correctly, it may be hatchling (?) which tries to create the directory containing the target files. In this case, the file is ../COPYING. It fails, because the parent folder ../ already exists, and cannot be created again.
I agree: the user should not need to copy the file. It was mostly to show how I go around it.
It’s normal to have some patches for packaging, we have them for Debian/Ubuntu too. Some of them, like the one you propose, are not really meant to be integrated upstream.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 98, in <module>
_main(sys.argv[1:], "python -m installer")
File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 94, in _main
installer.install(source, destination, {})
File "/usr/lib/python3.11/site-packages/installer/_core.py", line 109, in install
record = destination.write_file(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 207, in write_file
return self.write_to_fs(scheme, path_, stream, is_executable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 171, in write_to_fs
os.makedirs(parent_folder)
File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: '/build-dir/dolfinx/pkg/dolfinx-git/usr/lib/python3.11/site-packages/fenics_dolfinx-0.8.0.dev0.dist-info/licenses/..'
The directories may be a little bit scrambled (they are automatically set by the building environment, and I am trying to reproduce them manually), but hopefully, this shows the logic