Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compile always runs even with no changes #1113

Closed
tahorst opened this issue Jul 15, 2021 · 1 comment
Closed

make compile always runs even with no changes #1113

tahorst opened this issue Jul 15, 2021 · 1 comment
Assignees

Comments

@tahorst
Copy link
Member

tahorst commented Jul 15, 2021

With #1109, make compile will compile code even if changes haven't been made while this was previously skipped. This can make switching between branches time consuming with our git hook to run wcm-env-check.sh. It looks like the offending line is from distutils.core import setup -> from setuptools import setup. @1fish2, do you know what the difference here would be and why we needed to have this change?

@1fish2 1fish2 self-assigned this Jul 15, 2021
@1fish2
Copy link
Contributor

1fish2 commented Jul 15, 2021

Good catch.

Apparently distutils has on the way out for years [PEP 632], to be deprecated in Python 3.10 and removed in Python 3.12. (The next few Python releases are planned to have nice performance improvements including a JIT compiler.) setuptools monkey-patches distutils, which presumably explains why some of our setup.py files (like in arrow and vivarium-core) import setuptools without directly using it.

Maybe adjusting how it uses setuptools would fix this? Or maybe we should switch to something like Bento. I didn't want a big investigation. (Flit is recommended as the easiest way to build Python-only packages, but that doesn't apply here.)

Meanwhile, I can revert this change.

1fish2 added a commit that referenced this issue Jul 15, 2021
Python 3.10 will deprecate distutils. By then we should figure out whether to use setuptools, Bento, or something else, and still get fast `make compile` when it needn't recompile.
1fish2 added a commit that referenced this issue Jul 15, 2021
Python 3.10 will deprecate distutils. By then we should figure out whether to use setuptools, Bento, or something else, and still get fast `make compile` when it needn't recompile.
@1fish2 1fish2 closed this as completed in cb0f082 Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants