RBVI / ChimeraX

Source code for molecular graphics program UCSF ChimeraX
https://www.rbvi.ucsf.edu/chimerax/
Other
163 stars 32 forks source link

core: Build with pyproject.toml using python -m build #16

Closed zjp closed 2 years ago

zjp commented 2 years ago

This commit builds the core using pyproject.toml and python -m build with the minimum amount of changes to Makefiles, etc.

Doesn't break the build system; ChimeraX appears to initialize fine. Moves some busywork out of the core Makefile and into setup.py -- we hardcoded some compilations we just did not need to.

Is src/common-libs a good place for the unused libraries in src/core? They all get synchronized to the build directory, so for now where it should go is an aesthetic preference.

gregcouch commented 2 years ago

Can you minimize the changes and not alter the directory structure? setup.py should not be in the commit, especially not with hard-coded paths in it. The packaging module should not have moved in requirements.txt, it is always needed, not just during builds.

zjp commented 2 years ago

setup.py needs to be committed. It's responsible for building C extensions and it doesn't contain dynamic data anymore. I removed those hardcoded lines and the Windows logic from the file, it didn't affect builds.

I took those directories out to preempt warnings such as this one:

Screen Shot 2022-05-23 at 11 09 50

where the solution to silence the warning was to put mac_util_cpp in src/core and move source files to src/core/src -- the same structure as any other bundle. But they don't seem to bring the warning up, so I wouldn't necessarily be opposed to putting them back in src/core/src, but src/core/src should stay.

Lastly it's fine to move packaging back under that header, but if it's installed in ChimeraX I'm not sure how -- it's not in app_requirements.txt -- and if it should be then let's put it there.

zjp commented 2 years ago

Implemented in https://github.com/RBVI/ChimeraX/commit/0a947c9a98f727b29e0be7cd16fc4b035c12eb22