Skip to content

segfault/quickfix-py-package

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scripts to package quickfix in Python

Based on https://github.com/quickfix/quickfix-package, original author: Oren Miller (oren@quickfixengine.org)

This project is an update to run with latest changes, and compile and distribute a package in Python 3 with SSL support.

Why

The original package is not being maintained.

Build Instructions

On OSX

Install Python using pyenv

Ensure you have g++, openssl, python-dev, autoconf, etc. (run ./setup-osx.sh if needed) Ensure you are using the same Python version you would use in the application when building.

  1. Setting Environment Variables flags to enable SSL:

On MacOS:

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include -DHAVE_SSL=1"

On Linux:

export LDFLAGS="-L/usr/lib/aarch64-linux-gnu"
export CPPFLAGS="-I/usr/include/openssl -DHAVE_SSL=1"
  1. Build sources
./build.sh

This step will download quickfix source code from repository https://github.com/pablodcar/quickfix and leave C++ and compiled objects into quickfix directory.

  1. Use the C++ source code to update the Python package
./package-python.sh

Publishing

  1. Create and activate a virtual environment to install distribution dependencies:
python -m pip install --upgrade build twine
  1. Create Distribution files
python -m build

This step will leave a dist/ directory with .tar.gz file (source distribution) and a .whl file (a built distribution). Built distribution depends on the OS, architecture, Python version.

e.g.

ls -1 dist
quickfix-py-0.0.1.tar.gz
quickfix_py-0.0.1-cp311-cp311-macosx_14_0_arm64.whl
  1. Publish to PyPi (manual)

If you are going to test how the package looks like, use TestPyPi https://test.pypi.org/account/register/:

* Follow the instructions to create a token: https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives,
* Configure the token on your local environment, e.g. ~/.pypirc
python3 -m twine upload --repository testpypi dist/*

Remove the option --repository testpypi to use the production repository.

  1. Publish to PyPi (Github actions)

Before executing the action pypa/gh-action-pypi-publish, you need to register the Github Repository as a trusted publisher. see Adding a trusted publisher to an existing PyPI project

About

QuickFIX Package Creator

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 93.1%
  • C++ 6.9%