Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Requirements #

[QuickFIX] uses [Automake] to compile. Standard requirements for different platforms:

#### Linux ####

TODO

#### macOS ####

Use [HomeBrew] to install the necessary utilities:
* Install [HomeBrew]: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
* Install brew packages: `brew install automake libtool`

#### Windows ####

TODO

# Compilation #

* Build [QuickFIX]: `bash package.sh [quick_fix_version]`
* Build Python wrappers: `bash package-python.sh [-d]`
* Build Ruby wrappers: `bash package-ruby.sh`

[Autotools]: http://www.gnu.org/software/automake/manual/html_node/index.html
[HomeBrew]: http://brew.sh/
[QuickFIX]: http://www.quickfixengine.org/
[QuickFIX package index]: https://pypi.python.org/pypi/quickfix

28 changes: 27 additions & 1 deletion package-python.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
#!/usr/bin/env bash
#
# Compile and install Python QuickFIX package. Default behavior uploads to PyPI.
# Use -d optional argument for local installation only
#
# Usage:
# bash package-python.sh [-d]

PRODUCTION=0

while getopts "d" opt; do
case $opt in
d)
PRODUCTION=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done

rm -rf quickfix-python/C++
rm -rf quickfix-python/spec
rm -rf quickfix-python/quickfix*.py
Expand All @@ -24,4 +46,8 @@ rm -f quickfix-python/C++/stdafx.*

pushd quickfix-python

python setup.py sdist upload -r pypi
if [ "$PRODUCTION" -eq "0" ]; then
python setup.py sdist upload -r pypi
else
python setup.py install
fi
54 changes: 34 additions & 20 deletions quickfix-python/setup.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,51 @@
from __future__ import print_function

from distutils.core import setup
from distutils.core import Extension
from distutils.command.install import install
from distutils.command.build import build
from distutils.command.build_ext import build_ext

import subprocess
import shutil
import glob
import os


class build_ext_subclass( build_ext ):
def build_extensions(self):
print "Testing for std::tr1::shared_ptr..."
print("Testing for std::tr1::shared_ptr...")
try:
self.compiler.compile(['test_std_tr1_shared_ptr.cpp'])
self.compiler.define_macro("HAVE_STD_TR1_SHARED_PTR")
print "...found"
print("...found")
except:
print " ...not found"
print(" ...not found")

print "Testing for std::shared_ptr..."
print("Testing for std::shared_ptr...")
try:
self.compiler.compile(['test_std_shared_ptr.cpp'], extra_preargs=['-std=c++0x']),
self.compiler.compile(['test_std_shared_ptr.cpp'],
extra_preargs=['-std=c++0x']),
self.compiler.define_macro("HAVE_STD_SHARED_PTR")
print "...found"
print("...found")
except:
print "...not found"
print("...not found")

build_ext.build_extensions(self)

long_description=''
with open('LICENSE') as file:
license = file.read();
long_description = ''
with open('LICENSE') as fp:
quickfix_license = fp.read()

setup(name='quickfix',
version='1.14.3',
py_modules=['quickfix', 'quickfixt11', 'quickfix40', 'quickfix41', 'quickfix42', 'quickfix43', 'quickfix44', 'quickfix50', 'quickfix50sp1', 'quickfix50sp2'],
py_modules=[
'quickfix',
'quickfixt11',
'quickfix40',
'quickfix41',
'quickfix42',
'quickfix43',
'quickfix44',
'quickfix50',
'quickfix50sp1',
'quickfix50sp2'
],
data_files=[('share/quickfix', glob.glob('spec/FIX*.xml'))],
author='Oren Miller',
author_email='[email protected]',
Expand All @@ -44,8 +54,12 @@ def build_extensions(self):
description="FIX (Financial Information eXchange) protocol implementation",
url='http://www.quickfixengine.org',
download_url='http://www.quickfixengine.org',
license=license,
license=quickfix_license,
include_dirs=['C++'],
cmdclass = {'build_ext': build_ext_subclass },
ext_modules=[Extension('_quickfix', glob.glob('C++/*.cpp'), extra_compile_args=['-std=c++0x'])],
)
cmdclass={'build_ext': build_ext_subclass},
ext_modules=[
Extension('_quickfix',
glob.glob('C++/*.cpp'),
extra_compile_args=['-std=c++0x'])
],
)