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

Allow installing pip dependencies from source #18926

Merged
merged 6 commits into from
Jan 7, 2022

Conversation

mppf
Copy link
Member

@mppf mppf commented Jan 6, 2022

This PR includes changes that were in the Homebrew 1.25.1 release as patches to support building the Python pip dependencies from source.

  • Work around problems building chpl-venv from source i.e. with pip arguments --no-binary :all: by first installing some chpldoc dependencies into the venv (since they are also build-time dependencies when building from source). Note that building the Python dependencies from source was suggested by Homebrew maintainers in chapel 1.25.1 Homebrew/homebrew-core#91257 (comment) . After this PR, the way to build the pip dependencies is by running e.g. make CHPL_PIP_FROM_SOURCE=1 test-venv (vs CHPL_PIP_INSTALL_PARAMS=--no-binary :all: which was used for the 1.25.1 Homebrew formula).
  • Additionally with the above, split chpldoc dependencies into 3 files, so that some can be installed before others, to work as build time dependencies. These 3 files include the version upgrades from Update packages relied upon by chpldoc for Python 3.10 compatibility #18894 (Sphinx from 4.0.2 to 4.3.2; sphinxcontrib-chapeldomain from 0.0.20 to 0.0.21; breathe from 4.30.0 to 4.31.0) as well as upgrading sphinx-rtd-theme from 0.5.2 to 1.0.0 to address problems with building from source.
  • Adjusts a test .good file for a trivial difference in output with the sphinx-rtd-theme version change.
  • Adjusts another test to avoid platform-specific errors in .good file

Future work:

  • add automated testing that make CHPL_PIP_FROM_SOURCE=1 test-venv functions

Reviewed by @lydia-duncan - thanks!

  • check test/chpldoc passes

mppf added 4 commits January 6, 2022 16:54
i.e. with

  export CHPL_PIP_INSTALL_PARAMS='--no-binary :all:'

---
Signed-off-by: Michael Ferguson <[email protected]>
When building pip dependencies from source, we seem to need to
 1) install them into the temporary venv
 2) install them into the venv a particular order with different pip invocations

Both of these are workarounds. To make the normal use case less
impacted, add CHPL_PIP_FROM_SOURCE which enables these workarounds
so that they do not need to be enabled all the time.

---
Signed-off-by: Michael Ferguson <[email protected]>
@mppf mppf force-pushed the venv-from-source branch from 847a2c4 to ab8bd03 Compare January 6, 2022 21:57
@mppf mppf requested a review from lydia-duncan January 6, 2022 22:00
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would probably be good to add a job that makes the module docs by building from source, but it's okay for that to not happen as part of this PR

mppf added 2 commits January 7, 2022 10:37
---
Signed-off-by: Michael Ferguson <[email protected]>
Seeing different errors on different systems - some Macs reporting
Read-only file system but other systems report Permission denied. Since
this depends on configuration and possibly OS, just leave it out.  The
test still checks for failure to create the directory.

---
Signed-off-by: Michael Ferguson <[email protected]>
@mppf mppf merged commit 021ad40 into chapel-lang:main Jan 7, 2022
@mppf mppf deleted the venv-from-source branch January 7, 2022 16:08
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

Successfully merging this pull request may close these issues.

2 participants