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

Add python38-<compiler>-ohpc and refactor Conda, Mamba, and SHPC #4

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

georgiastuart
Copy link
Owner

@georgiastuart georgiastuart commented Dec 21, 2022

Adds a Python executable and library OHPC module (default 3.8) and refactors the Conda, Mamba, and SHPC spec files to rely on this new module rather than system python3.8.

georgiastuart and others added 11 commits December 20, 2022 15:34
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
This takes advantage of the %{?_smp_mflags} macro to speed up build
times on machines with available resources.

Signed-off-by: Sol Jerome <solj@utdallas.edu>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
solj and others added 4 commits December 22, 2022 12:30
This disables the fetching of expected dependencies via git. The
dependency consists of a single file so we just include the file
instead.

Signed-off-by: Sol Jerome <solj@utdallas.edu>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>
@georgiastuart georgiastuart changed the title Add python38-<compiler>-ohpc and refactor Conda and Mamba Add python38-<compiler>-ohpc and refactor Conda, Mamba, and SHPC Dec 22, 2022
Signed-off-by: Georgia Stuart <georgia.stuart@gmail.com>

# Install conda
python3.8 setup.py install --prefix=%{buildroot}%{install_path} --install-scripts=%{buildroot}%{install_path}/bin
python3.8 -m pip install . --no-deps --no-build-isolation --prefix="%{buildroot}%{install_path}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python3.8 -m pip install . --no-deps --no-build-isolation --prefix="%{buildroot}%{install_path}"
python3.8 -m pip install . --no-deps --no-build-isolation --prefix="%{buildroot}%{install_path}"

%{__cp} -r conda_package_handling/lib/python%{python3_version}/site-packages/conda_package_handling %{buildroot}/%{install_path}/lib/python%{python3_version}/site-packages/

# Set up source files
# TODO: FIX csh FILE
%{__mkdir_p} %{buildroot}/%{install_path}/etc/profile.d
install -m 0644 -Dt %{buildroot}/%{install_path}/etc/profile.d/ conda/shell/etc/profile.d/conda.{sh,csh}
sed -i '1s|^|export CONDA_EXE="%{install_path}/bin/conda"\nexport _CE_M=""\nexport _CE_CONDA=""\nexport CONDA_PYTHON_EXE="/usr/bin/python%{python3_version}"\n\n|' %{buildroot}/%{install_path}/etc/profile.d/conda.sh
sed -i '1s|^|export CONDA_EXE="%{install_path}/bin/conda"\nexport _CE_M=""\nexport _CE_CONDA=""\nexport CONDA_PYTHON_EXE="/opt/ohpc/pub/apps/gnu9/python38/3.8.15/bin/python3.8"\n\n|' %{buildroot}/%{install_path}/etc/profile.d/conda.sh
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we should use the python version variables here to make upgrading python more seamless?

@@ -157,6 +167,8 @@ source_sh("bash", "%{install_path}/etc/profile.d/conda.sh")
-- source_sh("csh", "%{install_path}/etc/profile.d/conda.csh")
-- source_sh("tcsh", "%{install_path}/etc/profile.d/conda.csh")

depends_on('python38')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a python module variable?

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