Building Python for Munki issues

621 views
Skip to first unread message

Gregory Neagle

unread,
May 5, 2021, 5:19:17 PM5/5/21
to munki-dev, 'Gregory Neagle' via munki-discuss
As more and more of the Python framework used by Munki is required to be compiled from source (to generate Universal2 libraries, since sadly many of the pre-complied wheels available from PyPi are x86_64 only), other Munki admins are running into problems getting a successful build of the Python framework.

These problems have gotten much worse with Munki 5.4 since now we have to build all of PyObjC from source.

It pretty much always consistently works for me, and I'm not experienced enough in the use of pip install to know why it might be failing for others.

If anyone on this list has experience with this sort of issue, your help would be appreciated.

The most common need for people to build their own installation packages is to make them compatible with DEP/ADE deployment, which means some slightly different components and a signed package.

We could side-step this problem entirely by providing:

- A pre-built DEP-ready package that simply needs to be signed
- Pre-built component packages and a tool to build a variety of distribution packages from the components
- A pre-built Python framework, removing the need to build one

Any/all of these are possible, they're just more work for me to generate and upload for each Munki release.

Any thoughts/ideas here?

-Greg

Brandon Friess

unread,
May 5, 2021, 5:53:46 PM5/5/21
to munki-dev
I've been able to reliably build Munki 5.4 as long as the following is true on a vanilla 11.3 machine:
Having a pre-built Python framework sounds interesting. Perhaps including that as an extra asset with each release?

-Brandon

miikkali

unread,
May 7, 2021, 9:19:24 AM5/7/21
to munki-dev
Hello, I'm not a developer, but as an admin I've been dealing with these build issues lately.

A separate pre-built DEP-ready package would be nice. I could easily work with that.

Pre-built component packages and a tool to handle combining them sounds complicated at first thought, but it's still much better than spending hours trying different versions of Xcode on different versions of macOS, and finally getting Python to build properly on an Intel Mac, and it still won't build on Apple Silicon, banging my head on the keyboard, so, yeah, it would be easier working with separate component packages and one more tool, if that's more reliable. How complicated it then is to manage depends on the tool.

What would "providing a pre-built Python framework" mean? Would it be an extra asset that we'd bake into the munkitools package ourselves with some tool? I feel I'm not understanding the proposition. What would be the method for building a munkitools package for DEP/MDM first-boot install? The MDM command `InstallEnterpriseApplication` still seems to support installing no more than one package, and for us that package is munkitools, so we need it to "work by itself" on first boot ie. include all its dependencies in a single pkg. As long as I can bake all that conveniently and reliably in a single pkg, sign it and deploy it, I'm happy.

So, I would be ok with any of the suggested approaches. At this moment, a separate pre-built DEP/MDM-ready package sounds the most tempting, as that's the only reason I build Munki packages myself.

Currently I've been able to build Munki v5.4.0 succesfully only with Xcode 12.4 on an Intel Mac running macOS 11.3.1. Building with Xcode 12.5 has failed miserably. (Thanks, Brandon. I tried with 12.4 after seeing your post and eventually got things working.)

-
Miikkali

Gregory Neagle

unread,
May 7, 2021, 4:05:32 PM5/7/21
to munki-dev
"What would "providing a pre-built Python framework" mean?"

It would mean that instead of having to build one -- which is the source of 99.99% of the issues, you'd already have one.

Building a relocatable Python framework is one of the tasks done by the make_munki_mpkg_* scripts, and it is the most complex and most fragile. If that step can be replaced by just downloading a pre-built framework, your odds of success go up dramatically.

-Greg

--
Find related discussion groups here:
https://github.com/munki/munki/wiki/Discussion-Group
---
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-dev/5f5b7d91-b14b-4d81-a611-5ac292319d54n%40googlegroups.com.

miikkali

unread,
May 8, 2021, 8:28:18 AM5/8/21
to munki-dev
Thanks, Greg, I think I get it now. Yes, a pre-built Python framework would be sweet. Then, I guess, no changes to the scripts we currently run in our workflows would need to be introduced. That's probably the nicest option from the three. I don't know how much of a burden it is to you to pre-build Python repeatedly for this purpose, but it would be a very welcome change. I trust you (or any Munki developer) much more than `pip` to be able to build a reliable Python framework for Munki.

-
Miikkali

gregn...@mac.com

unread,
May 26, 2021, 12:17:46 PM5/26/21
to munki-dev
My main concern here is that if we don't really understand the issues around building the Python framework, at some point my  luck will run out and I won't be able to build the Python framework, either!

Seb

unread,
May 27, 2021, 11:24:03 AM5/27/21
to munki-dev
I'm experiencing the same issues, tried some of the tips above to no avail. One issue I face is that I currently need to add pyopenssl to munki's `py3_requirements.txt` as I also inject the gcs_auth middleware files to the munki install.

If moving to a pre-built framework what would be the better solution for a requirement like this?

Thanks! 

Paul Galow

unread,
Jun 15, 2021, 8:32:41 AM6/15/21
to munki-dev
I was just about to post an issue on GitHub when I saw this. We are using the excellent CloudFront Middleware to host and serve our Munki repo via AWS S3 and CloudFront. With every new Munki release I have been following their build instructions to build a custom Python framework since the middleware needs the "rsa" package. 

Up until now this has been working flawlessly but now I am running into issues running the current version of Munki's build_python_framework.sh. Just like mentioned earlier, it seems like there is an issue compiling pyobjc. The specific error message that seems most relevant to me: "Running setup.py install for pyobjc-core ... error". Perhaps this is an issue with my specific local workstation setup? Happy to post more details.

It could be worth a try to create a CI workflow using GitHub Actions. I haven't used their Mac runner but perhaps this could be used as an isolated, predictable environment to consistently build and distribute custom Python frameworks? Their Big Sur runner is currently in private preview only though. So for now only a Catalina version is publicly available.

Thanks,
Paul

miikkali

unread,
Jun 17, 2021, 4:51:14 AM6/17/21
to munki-dev
If anyone's going to contribute solutions in code, I'll be very happy to help with testing. I have hardware for testing, both M1 and Intel, so it doesn't hinder my day job at all to nuke & pave & install whatever & try again with another configuration. So, while I can't offer code, I can donate my time and my testing resources.

Cheers,
Miikkali

Gregory Neagle

unread,
Jun 17, 2021, 2:30:18 PM6/17/21
to munki-dev

On May 27, 2021, at 12:58 AM, Seb <sebas...@gmail.com> wrote:

I'm experiencing the same issues, tried some of the tips above to no avail. One issue I face is that I currently need to add pyopenssl to munki's `py3_requirements.txt` as I also inject the gcs_auth middleware files to the munki install.

If moving to a pre-built framework what would be the better solution for a requirement like this?

One approach would be to install your needed extras into the pre-built framework before building the package.
Another approach would be to build a separate package that installed your needed extras.

Matthias Choules

unread,
Jun 17, 2021, 2:53:40 PM6/17/21
to munki-dev
We do not need any special extras for Python but are always in need for properly signed installers. Building these has become very unstable for us, with issues like those mentioned before. I would welcome a pre-built Python very much.

Would a signed Munki installer be another option?

All the best and thanks for your work, Greg!

Gregory Neagle

unread,
Jun 17, 2021, 2:55:51 PM6/17/21
to munki-dev
Since the main issue here is building the Python framework, let me show you an alternate way to build variant packages that does not involve building the Python framework from scratch. Start by downloading the "official" release package for the Munki version you want from GitHub. Then make yourself a place to work:

bash-3.2$ cd /Users/Shared
bash-3.2$ mkdir munki_playground
bash-3.2$ cd munki_playground/

git clone the Munki source:

Cloning into 'munki'...
remote: Enumerating objects: 28097, done.
remote: Counting objects: 100% (184/184), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 28097 (delta 106), reused 97 (delta 56), pack-reused 27913
Receiving objects: 100% (28097/28097), 18.66 MiB | 4.75 MiB/s, done.
Resolving deltas: 100% (20865/20865), done.

Change into the cloned directory and checkout the version you want:

bash-3.2$ cd munki/
bash-3.2$ git checkout v5.5.0
Note: checking out 'v5.5.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 4940db68 Address issue on Apple silicon where MSC prompted to install non-existent Apple updates.

You'll see there's no Python framework present, so if you were to try to build a package, it would start by building a Python framework. But if we provide one, that step is skipped

bash-3.2$ ls
CONTRIBUTING.md LICENSE.md README.md code launchd

We can get an appropriate Python framework from the release package. There's a few ways to do that, but the simplest is to just install the package and then copy it.

bash-3.2$ sudo installer -pkg ~/Downloads/munkitools-5.5.0.4362.pkg -target /
installer: Package name is Munki - Software Management for macOS
installer: Upgrading at base path /
installer: The upgrade was successful.
bash-3.2$ cp -pr /usr/local/munki/Python.framework .

At this point we could then run ./code/tool/make_munki_mpkg.sh with whatever options we wanted and we could build a custom package without the difficult step of having to build the Python framework from scratch. But what if we also needed to customize the Python framework? We can use pip to install extra things.
 
bash-3.2$ ./Python.framework/Versions/Current/bin/pip install pyopenssl
Collecting pyopenssl
  Downloading pyOpenSSL-20.0.1-py2.py3-none-any.whl (54 kB)
     |████████████████████████████████| 54 kB 1.6 MB/s 
Requirement already satisfied: six>=1.5.2 in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from pyopenssl) (1.15.0)
Collecting cryptography>=3.2
  Downloading cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 2.2 MB/s 
Requirement already satisfied: cffi>=1.12 in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from cryptography>=3.2->pyopenssl) (1.14.5)
Requirement already satisfied: pycparser in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.2->pyopenssl) (2.20)
Installing collected packages: cryptography, pyopenssl
Successfully installed cryptography-3.4.7 pyopenssl-20.0.1

If either of those modules contain shared libraries I'm skeptical that they are Universal2 at this point; you might need to run pip with different options to get Universal2 libraries. Figuring that out is an exercise left for the reader.

And now, build the munkitools package:

bash-3.2$ ./code/tools/make_munki_mpkg.sh <options>

Gregory Neagle

unread,
Jun 17, 2021, 4:09:36 PM6/17/21
to munki-dev
I was right to suspect some of the libraries added by doing the pip install would not be Universal2:

bash-3.2$find Python.framework -name "*.so" -or -name "*.dylib" | xargs file | grep -v "2 architectures" | grep -v "(for architecture"
Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/bindings/_padding.abi3.so:                                  Mach-O 64-bit bundle x86_64
Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so:                                  Mach-O 64-bit bundle x86_64
Python.framework/Versions/3.9/lib/python3.9/site-packages/cryptography/hazmat/bindings/_rust.abi3.so:                                     Mach-O 64-bit dynamically linked shared library x86_64

Gregory Neagle

unread,
Jun 17, 2021, 4:17:19 PM6/17/21
to munki-dev
And sadly, telling pip to compile from source leads to a different problem. I'm advised to install a current Rust toolchain, but since I don't need this module at all, I'll leave it to others to continue the explorations.

-Greg

bash-3.2$ rm -r Python.framework
bash-3.2$ cp -pr /usr/local/munki/Python.framework .
bash-3.2$ ./Python.framework/Versions/Current/bin/pip install --no-binary :all: pyopenssl
Collecting pyopenssl
  Downloading pyOpenSSL-20.0.1.tar.gz (173 kB)
     |████████████████████████████████| 173 kB 2.7 MB/s 
Collecting cryptography>=3.2
  Downloading cryptography-3.4.7.tar.gz (546 kB)
     |████████████████████████████████| 546 kB 9.2 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: six>=1.5.2 in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from pyopenssl) (1.15.0)
Requirement already satisfied: cffi>=1.12 in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from cryptography>=3.2->pyopenssl) (1.14.5)
Requirement already satisfied: pycparser in ./Python.framework/Versions/3.9/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.2->pyopenssl) (2.20)
Skipping wheel build for pyopenssl, due to binaries being disabled for it.
Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/Shared/munki_playground/munki/Python.framework/Versions/Current/bin/python3.9 /Users/Shared/munki_playground/munki/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/tc/sd4_mtvj14jdy7cg21m2gmcw000495/T/tmpbvnpfd9s
       cwd: /private/var/folders/tc/sd4_mtvj14jdy7cg21m2gmcw000495/T/pip-install-e8dl41_e/cryptography_b823f81fbdde4d3bb2e08b910ea3f2ed
  Complete output (165 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-universal2-3.9
  creating build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/__about__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/exceptions.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  copying src/cryptography/fernet.py -> build/lib.macosx-10.9-universal2-3.9/cryptography
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_der.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_types.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_oid.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/oid.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/ocsp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/extensions.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/name.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  copying src/cryptography/x509/certificate_transparency.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/x509
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/backends/openssl
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/kdf
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/twofactor
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/serialization
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/ciphers
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/primitives/asymmetric
  creating build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-10.9-universal2-3.9/cryptography/hazmat/bindings/openssl
  running egg_info
  writing src/cryptography.egg-info/PKG-INFO
  writing dependency_links to src/cryptography.egg-info/dependency_links.txt
  writing requirements to src/cryptography.egg-info/requires.txt
  writing top-level names to src/cryptography.egg-info/top_level.txt
  reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'docs/_build'
  warning: no previously-included files found matching 'vectors'
  warning: no previously-included files matching '*' found under directory 'vectors'
  warning: no previously-included files matching '*' found under directory '.github'
  warning: no previously-included files found matching 'release.py'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'dev-requirements.txt'
  warning: no previously-included files found matching 'tox.ini'
  warning: no previously-included files found matching 'mypy.ini'
  warning: no previously-included files matching '*' found under directory '.zuul.d'
  warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
  adding license file 'LICENSE'
  adding license file 'LICENSE.PSF'
  adding license file 'LICENSE.APACHE'
  adding license file 'LICENSE.BSD'
  writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
  copying src/cryptography/py.typed -> build/lib.macosx-10.9-universal2-3.9/cryptography
  running build_ext
  generating cffi module 'build/temp.macosx-10.9-universal2-3.9/_padding.c'
  creating build/temp.macosx-10.9-universal2-3.9
  generating cffi module 'build/temp.macosx-10.9-universal2-3.9/_openssl.c'
  running build_rust

  

      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         instructions for your platform.
      3) Check our frequently asked questions for more information:
      4) Ensure you have a recent Rust toolchain installed:
      5) If you are experiencing issues with Rust for *this release only* you may
         set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
      =============================DEBUG ASSISTANCE=============================

  

  error: can't find Rust compiler

  

  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

  

  To update pip, run:

  

      pip install --upgrade pip

  

  and then retry package installation.

  

  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

  

  This package requires Rust >=1.41.0.
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Seb

unread,
Jun 25, 2021, 7:48:24 AM6/25/21
to munki-dev
Thanks Greg. Yeah, creating a separate package that just injects pyopenssl into the right place, together with the gcs_auth middleware files was my likely plan. I guess I'm just not sure how to inject the python library into munki's already-installed Python. Any pointers on how to achieve this?

Gregory Neagle

unread,
Jun 25, 2021, 8:41:32 AM6/25/21
to munk...@googlegroups.com
A package just installs files to specific paths…

Sent from my iPhone

On Jun 25, 2021, at 4:48 AM, Seb <sebas...@gmail.com> wrote:

Thanks Greg. Yeah, creating a separate package that just injects pyopenssl into the right place, together with the gcs_auth middleware files was my likely plan. I guess I'm just not sure how to inject the python library into munki's already-installed Python. Any pointers on how to achieve this?

Seb

unread,
Sep 29, 2021, 7:15:55 AM9/29/21
to munki-dev
Hi Greg,

Where is the correct place/directory to install pyopenssl for munki's python?

Thanks again.

Gregory Neagle

unread,
Sep 29, 2021, 11:05:25 AM9/29/21
to munk...@googlegroups.com
I don’t know the answer to that.

Sent from my iPhone

On Sep 29, 2021, at 4:16 AM, Seb <sebas...@gmail.com> wrote:

Hi Greg,
Reply all
Reply to author
Forward
0 new messages