Name: python-mpesa-client Version: 1.0.0 Release: %autorelease Summary: A Python SDK for seamless integration with the M-Pesa API. License: MIT URL: https://github.com/amlaksil/mpesa-sdk Source: %{url}/archive/v%{version}/mpesa-sdk-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(requests-unixsocket) %global _description %{expand: The M-Pesa Python SDK simplifies the integration of your Python applications with the M-Pesa API, enabling seamless access to mobile money services such as payments, payouts, and transaction management. This SDK is designed to accelerate your development by providing a robust interface for M-Pesa’s STK Push, C2B, B2C, and authentication APIs.} %description %_description %package -n python3-mpesa-client Summary: %{summary} %description -n python3-mpesa-client %_description %prep %autosetup -p1 -n mpesa-sdk-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l mpesa %check cat < .env # API Base URL and Endpoints BASE_URL=https://sandbox.safaricom.et TOKEN_GENERATE_ENDPOINT=/v1/token/generate STK_PUSH_ENDPOINT=/mpesa/stkpush/v1/processrequest C2B_REGISTER_URL_ENDPOINT=/mpesa/c2b/v1/registerurl C2B_PAYMENTS_ENDPOINT=/mpesa/c2b/v1/simulate B2C_PAYMENT_REQUEST_ENDPOINT=/mpesa/b2c/v1/paymentrequest # Authentication CLIENT_KEY=your_client_key CLIENT_SECRET=your_client_secret # Logging and Environment TIMEOUT=30 MPESA_LOG_DIR=./logs LOG_LEVEL=DEBUG ENVIRONMENT=DEV # Set to TEST to disable console logging EOF %{py3_test_envvars} %{python3} -m unittest discover %files -n python3-mpesa-client -f %{pyproject_files} %changelog %autochangelog