wackywendell / tess

Python bindings to the voro++ library.
Other
36 stars 10 forks source link

Add configuration for building wheels #10

Open eleftherioszisis opened 2 years ago

eleftherioszisis commented 2 years ago

@wackywendell , I would like to first thank you for this package, which helped me a lot through my studies. In return, I would like to contribute to the building of wheels so that this tool can be easily used in different systems without compilation, which many times could prove tedious.

Summary of changes:

These changes maintained the current functionality of using cython to compile the pyx file whenever cython is available, otherwise compiling the cpp source, which is bundled with the package. However, imho it would be cleaner and more robust if the project strictly used cython, allowing to add a pyproject.toml config with the cython dependency as a build requirement. Then if needed to be built from source, cython would be required and no intermediate files would need to be used, otherwise one could install the wheels and easily use the package.

To enable the wheel publishing to pypi step, a new release with its respective tag vX.X.X needs to be made.

Closes #9

dimateos commented 1 year ago

Just to let you know that I succesfully installed it for python 3.10.8. I had to install wheel and setuptools manually tho. Anyway thanks!

itsmegughan commented 1 year ago

Just to let you know that I succesfully installed it for python 3.10.8. I had to install wheel and setuptools manually tho. Anyway thanks!

Could you please describe how you did it? I'm having trouble installing in wsl2.

dimateos commented 1 year ago

Basically:

pip install wheel
pip install setuptools-scm
pip install setuptools
...
pip uninstall tess --yes
... 
REM potentially delete binaries
pip install --editable %path_root_of_tess%

Note that in my case I install a local version of the library. Sometimes to force the recompilarion I had to delete /build and /tess/_voro.*.pyd

You can check out the scripts I use: https://github.com/dimateos/UPC-MIRI-TFM/blob/main/scripts/install_deps.bat https://github.com/dimateos/UPC-MIRI-TFM/blob/main/scripts/update.bat