Skip to main content

Python3 bindings for libxcrypt

Project description

pyxcrypt

Simple python3 bindings to libxrcypt[1].

Build and Install

You can build and install pyxcrypt as a wheel package using pip[2] or by using meson. For both cases you will need theese build requirements:

  1. C-compiler (gcc, for example)
  2. libxcrypt
  3. Python3 standart library

If you build pyxcrypt using meson you will also need meson[3]. And if you want to use pip, you will need pip[2]:).

ATTENTION MacOS users have to specify path to libxcrypt since they install it using brew:

export PKG_CONFIG_PATH=/opt/homebrew/opt/libxcrypt/lib/pkgconfig

Build and install using pip

The simpliest way is to install pyxcrypt from pypi[4]:

python3 -m venv /tmp/env
source /tmp/env/bin/activate
pip3 install pyxcrypt

But if you want to test development version of pyxcrypt, you can build it from source using pip:

python3 -m venv /tmp/env
source /tmp/env/bin/activate
git -C clone /tmp https://github.com/altlinux/pyxcrypt.git
pip install /tmp/pyxcrypt

Build and install using meson

git -C /tmp clone https://github.com/altlinux/pyxcrypt.git
cd /tmp/pyxcrypt && meson BUILD_DIR
meson compile -C BUILD_DIR

After these steps you can just install it using:

meson install -C BUILD_DIR

But it is better to specify DESTDIR and than set PYTHONPATH so you can install it as user.

Running tests

Also you can run tests by calling meson:

meson BUILD_DIR
meson test -C BUILD_DIR

Or after install it using pip:

python3 -m unittest discover -s tests -v

Docs

Since pyxcrypt just uses libxcrypt[1] API all main pyxcrypt functions are equal to libxcrypt. For API doc import pyxcrypt from python3 and run help(pyxcrypt) or visit this link[5]

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxcrypt-0.1.1.tar.gz (163.0 kB view details)

Uploaded Source

File details

Details for the file pyxcrypt-0.1.1.tar.gz.

File metadata

  • Download URL: pyxcrypt-0.1.1.tar.gz
  • Upload date:
  • Size: 163.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pyxcrypt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 621210af6dec881fad649e74648a13857934198554572799234cfe3069fbb809
MD5 0a706f0e1f5be59a073494b6f63b3f78
BLAKE2b-256 59758bdb46ed0e6d1da95efd6295674e3c1b7f7edff54ccfe326da4efdefd844

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page