Skip to content

Commit

Permalink
Specify the ABI version on the command line
Browse files Browse the repository at this point in the history
The `--abi-version` command line option has been added to `sip-build`,
`sip-install` and `sip-wheel` to specify the ABI version of the `sip`
module to generate code for.

Resolves #64
  • Loading branch information
philthompson10 committed Dec 28, 2024
1 parent 997a5f0 commit bb0a77f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
21 changes: 21 additions & 0 deletions docs/command_line_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ The full set of command line options is:

Verbose progress messages are enabled.

.. option:: --abi-version M[.N]

The version number of the ABI of the :mod:`sip` module to generate code for
is ``M.N``. By default the latest major version is used. If the minor
version is not specified then the latest minor version of the major version
is used.

.. option:: --api-dir DIR

A QScintilla :file:`.api` file is created in ``DIR``.
Expand Down Expand Up @@ -258,6 +265,13 @@ The full set of command line options is:

Verbose progress messages are enabled.

.. option:: --abi-version M[.N]

The version number of the ABI of the :mod:`sip` module to generate code for
is ``M.N``. By default the latest major version is used. If the minor
version is not specified then the latest minor version of the major version
is used.

.. option:: --api-dir DIR

A QScintilla :file:`.api` file is created in ``DIR``.
Expand Down Expand Up @@ -497,6 +511,13 @@ The full set of command line options is:

Verbose progress messages are enabled.

.. option:: --abi-version M[.N]

The version number of the ABI of the :mod:`sip` module to generate code for
is ``M.N``. By default the latest major version is used. If the minor
version is not specified then the latest minor version of the major version
is used.

.. option:: --api-dir DIR

A QScintilla :file:`.api` file is created in ``DIR``. This must be a name
Expand Down
6 changes: 3 additions & 3 deletions docs/pyproject_toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ list options may contain environment markers as defined in `PEP 508

**abi-version**
The version number of the ABI of the :mod:`sip` module to generate code
for. By the default the latest major version is used. If the minor
version is not specified then the latest minor version of the major version
is used.
for. By default the latest major version is used. If the minor version is
not specified then the latest minor version of the major version is used.
There is also a corresponding command line option.

**api-dir**
The value is the name of a the directory in which a QScintilla :file:`.api`
Expand Down
5 changes: 2 additions & 3 deletions sipbuild/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ class Project(AbstractProject, Configurable):

# The configurable options.
_options = (
# The minimum required ABI version of the sip module.
Option('abi_version'),

# The callable that will return an Bindings instance. This is used for
# bindings implicitly defined in the .toml file.
Option('bindings_factory'),
Expand Down Expand Up @@ -106,6 +103,8 @@ class Project(AbstractProject, Configurable):
help="enable verbose progress messages"),
Option('name', help="the name used in sdist and wheel file names",
metavar="NAME", tools=['sdist', 'wheel']),
Option('abi_version', help="The ABI to generate code for",
metavar="M[.N]"),
Option('build_dir', help="the build directory", metavar="DIR"),
Option('build_tag', help="the build tag to be used in the wheel name",
metavar="TAG", tools=['wheel']),
Expand Down

0 comments on commit bb0a77f

Please sign in to comment.