Go to file
Tomáš Hrnčiar 43a0c07ccd Convert from Fedora for the Python 3.14 stack in RHEL
Fedora contributions by:
    Alfredo Moralejo <amoralej@redhat.com>
    Benjamin A. Beasley <code@musicinmybrain.net>
    Charalampos Stratakis <cstratak@redhat.com>
    Christian Heimes <christian@python.org>
    Colin Walters <walters@verbum.org>
    Dennis Gilmore <dennis@ausil.us>
    Fabio Valentini <decathorpe@gmail.com>
    Felix Schwarz <felix.schwarz@oss.schwarz.eu>
    Francisco Trivino <ftrivino@redhat.com>
    Haikel Guemar <hguemar@fedoraproject.org>
    Igor Gnatenko <ignatenkobrain@fedoraproject.org>
    Iryna Shcherbina <shcherbina.iryna@gmail.com>
    Jeremy Cline <jeremy@jcline.org>
    Lumir Balhar <lbalhar@redhat.com>
    Matěj Cepl <mcepl@cepl.eu>
    Miro Hrončok <miro@hroncok.cz>
    Nathaniel McCallum <npmccallum@redhat.com>
    Peter Robinson <pbrobinson@gmail.com>
    Randy Barlow <randy@electronsweatshop.com>
    Robert Kuska <rkuska@redhat.com>
    Sahana Prasad <sahana@redhat.com>
    Stephen Gallagher <sgallagh@redhat.com>
    Troy Dawson <tdawson@redhat.com>
    Yaakov Selkowitz <yselkowi@redhat.com>
2025-11-28 12:37:07 +01:00
.gitignore RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00
changelog RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00
conftest-skipper.py RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00
python3.14-cryptography.spec Convert from Fedora for the Python 3.14 stack in RHEL 2025-11-28 12:37:07 +01:00
README.md RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00
Replace-maturin-build-backend-with-setuptools-rust.patch Convert from Fedora for the Python 3.14 stack in RHEL 2025-11-28 12:37:07 +01:00
sources RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00
vendor_rust.py RHEL: Import from Fedora 2025-11-28 12:37:07 +01:00

PyCA cryptography

https://cryptography.io/en/latest/

Packaging python-cryptography

The example assumes

  • Fedora Rawhide (f34)
  • PyCA cryptography release 3.4
  • Update Bugzilla issue is RHBZ#00000001

Build new python-cryptography

Switch and update branch

fedpkg switch-branch rawhide
fedpkg pull

Bump version and get sources

rpmdev-bumpspec -c "Update to 3.4 (#00000001)" -n 3.4 python-cryptography.spec
spectool -gf python-cryptography.spec

Upload new source

fedpkg new-sources cryptography-3.4.tar.gz

Commit changes

fedpkg commit --clog
fedpkg push

Build

fedpkg build

RHEL/CentOS builds

RHEL and CentOS use a different approach for Rust crates packaging than Fedora. On Fedora Rust dependencies are packaged as RPMs, e.g. rust-pyo3+default-devel RPM. These packages don't exist on RHEL and CentOS. Instead python-cryptography uses a tar ball with vendored crates. The tar ball is created by a script:

./vendor_rust.py
rhpkg upload cryptography-3.4-vendor.tar.bz2