Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Aug 2, 2024
1 parent e444fff commit 9cdbd68
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions Python/README.txt → Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,25 @@ The C++ wrappers for the QuantLib-Python extension module are created
by means of SWIG (Simplified Wrapper and Interface Generator)
available from <http://www.swig.org/>; the latest version is suggested.

Building the wrappers requires the Setuptools package.
Building the wrappers requires the `setuptools` and `build` packages;
both can be installed (preferably in a virtual environment) by means
of `pip install`.

Generating the wrappers is not required if you are using a distributed
tarball. If you're building from a Git checkout, instead, use the
command:

python setup.py wrap

The commands to be issued for building and testing the
wrappers are:

python setup.py build
python setup.py test

respectively.
command `swig.cmd` on Windows or `make` on other platforms. Running
`make` also builds the wrappers as a wheel; on Windows, this requires
the explicit command `python -m build --wheel` instead.

The build step requires that the QuantLib headers and library can be
found by the compiler. On Unix-like platforms, this requires that
`quantlib-config` is in your path. On the Windows platform, instead,
it requires you to define a `QL_DIR` environment variable pointing to
your QuantLib directory (e.g., `C:\Lib\QuantLib`.)

The suggested way to install the module is to run first

python setup.py bdist_wheel
Once built, the resulting wheel can be installed with `pip`.

which requires the wheel module to be available and which will create
a QuantLib wheel in the dist folder. The resulting wheel can then
be installed with pip in the desired environment.
Finally, testing the wheel requires `tox`, also available via
`pip install`. Once available, running `tox run` will run the
test suite.

The test suite is implemented on top of the PyUnit framework, which is
included in the Python standard library.

0 comments on commit 9cdbd68

Please sign in to comment.