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 openssl an optional dependency of python3 #30560

Closed
mkoeppe opened this issue Sep 11, 2020 · 16 comments
Closed

Make openssl an optional dependency of python3 #30560

mkoeppe opened this issue Sep 11, 2020 · 16 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 11, 2020

As discussed in #30556, if openssl is enabled using --enable-openssl and neither openssl nor python3 are available as system packages, this makes sure that openssl is built before python3.

If system openssl is found via #30557, then --enable-openssl does NOT trigger building openssl. Use --enable-openssl --without-system-openssl if this is desired.

Part of #21700 Meta-ticket: Declare "optional" dependencies of packages (a package manager's suggested/recommended packages)

CC: @mwageringel @slel @dimpase @orlitzky @jhpalmieri

Component: build

Author: Matthias Koeppe

Branch/Commit: 0c394ca

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/30560

@mkoeppe mkoeppe added this to the sage-9.2 milestone Sep 11, 2020
@mkoeppe mkoeppe changed the title Build optional package openssl as part of TOOLCHAIN_DEPS Build optional package openssl as part of SAGE_TOOLCHAIN Sep 11, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 11, 2020

comment:2

Best done with a change to the SAGE_SPKG_ENABLE macro

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 13, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 13, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 13, 2020

Commit: 0c394ca

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 13, 2020

comment:6

Found a simpler solution than the previously discussed SAGE_TOOLCHAIN business. Needs review


New commits:

0c394cabuild/pkgs/python3/dependencies: Make openssl a dependency if it is enabled

@mkoeppe mkoeppe changed the title Build optional package openssl as part of SAGE_TOOLCHAIN Make openssl an optional dependency of python3 Sep 13, 2020
@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:9

This looks like it works, and the change makes sense. I couldn't completely test, though, since the ssl module for Python always seems to get built.

To test, I did make distclean. Then

$ ./configure --enable-openssl --with-system-python3=no
$ make

built openssl first and then python3, which is the point, right? Without this branch, these commands just build python3, not openssl.

Do I need to find a system on which Python's ssl module fails to build?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 14, 2020

comment:10

Replying to @jhpalmieri:

To test, I did make distclean. Then

$ ./configure --enable-openssl --with-system-python3=no
$ make

built openssl first and then python3, which is the point, right?

Right.

Without this branch, these commands just build python3, not openssl.

I think without this branch it should also have built openssl, just not necessarily before python3.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 14, 2020

comment:11

Replying to @jhpalmieri:

Do I need to find a system on which Python's ssl module fails to build?

I don't think that's necessary

@jhpalmieri
Copy link
Member

comment:12

Replying to @mkoeppe:

Replying to @jhpalmieri:

To test, I did make distclean. Then

$ ./configure --enable-openssl --with-system-python3=no
$ make

built openssl first and then python3, which is the point, right?

Right.

Without this branch, these commands just build python3, not openssl.

I think without this branch it should also have built openssl, just not necessarily before python3.

Sorry. I actually ran make python3, which is pretty convincing evidence that with this branch and with ./configure --enable-openssl, Sage believes that openssl is a dependency of python3.

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@jhpalmieri
Copy link
Member

comment:13

Good find with findstring, by the way.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 14, 2020

comment:14

Thanks!

@vbraun
Copy link
Member

vbraun commented Sep 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants