dftbplus / dftbplus

DFTB+ general package for performing fast atomistic simulations
http://www.dftbplus.org
Other
330 stars 164 forks source link

Fails to install the Python binding into the stage directory #931

Closed yurivict closed 2 years ago

yurivict commented 2 years ago

It prints this error

error: could not create '//usr/local/lib/python3.8/site-packages/__init__.py': Permission denied

and then succeeds anyway.

The install target should respect the DESTDIR variable which contains stage directory.

Version: 21.2 OS: FreeBSD 13

awvwgk commented 2 years ago

The installation is setup here

https://github.com/dftbplus/dftbplus/blob/a1a48642e24ea1964057285ab39d3501cf1246ec/tools/dptools/CMakeLists.txt#L1-L5

While DESTDIR is referenced, I guess it is read at configure time rather than install here and therefore failing.

awvwgk commented 2 years ago

I proposed a patch in #933. Generally, I would recommend to install the Python components as separate packages rather than bundling them with DFTB+ as it provides more control over the installation (we take this approach for packaging on conda-forge as well).

yurivict commented 2 years ago

Generally, I would recommend to install the Python components as separate packages [...]

Are there instructions how to do this for dftbplus?

yurivict commented 2 years ago

In order to install the python module separately cleanly project needs to supply a top-level CMakeLists.txt for python.

Like the faiss project does here.

awvwgk commented 2 years ago

No CMake required, you can install straight via setup.py or pip install (which is what our CMake is doing anyway).

See https://github.com/conda-forge/dftbplus-tools-feedstock/blob/8382ec8/recipe/meta.yaml#L15