indygreg / indygreg/PyOxidizer

cryptography modules not built due to PEP 517

Open
#170 6 comments 0 reactions 0 assignees View on GitHub
compatibility
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

`cryptography` includes three built libraries `_constant_time.abi3.so`, `_openssl.abi3.so` and `_padding.abi3.so`.

They are not being built by default.

I suspect it is because of the following in the logs
```console
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): finished with status 'done'
```

I guess the distutils hackery doesnt work with PEP 517 packages. I notice bcrypt also has the same in the logs and its `bcrypt/_bcrypt` is missing, not even at top level `_bcrypt`.

```console
Building wheel for bcrypt (PEP 517): started
Building wheel for bcrypt (PEP 517): finished with status 'done'
```

Worth noting that this means likely `requests[security]` is currently not secure, and I am seeing a few related errors in the requests test suite, at least one I recognise as indicative of insecure `requests` (`TestRequests.test_https_warnings`), but not sure if the two are linked.

Using `PIP_USE_PEP517=false` globally isnt a magic solution , as with crypography and bcrypt it causes:

> ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta in pyproject.toml

```toml
extra_args = "--no-user-cfg"
```
Doesnt do anything (c.f. its setup.py)

requirement `-e git+https://github.com/pyca/cryptography#egg=cryptography` didnt work:
error: option --home not recognized

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the PEP 517 builds for cryptography and bcrypt and inspect the packaging behavior around setup.py and pyproject.toml. Compare the produced artifacts with the expected native libraries, then run the related Requests tests, including TestRequests.test_https_warnings. Done means the native modules are built and included without disabling PEP 517.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.