Skip to content
Merged
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
24 changes: 24 additions & 0 deletions projects/riverbankcomputing.com/sip/fib.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Define the SIP wrapper to the (theoretical) fib library.

%Module(name=fib, language="C")

int fib_n(int n);
%MethodCode
if (a0 <= 0)
{
sipRes = 0;
}
else
{
int a = 0, b = 1, c, i;

for (i = 2; i <= a0; i++)
{
c = a + b;
a = b;
b = c;
}

sipRes = b;
}
%End
30 changes: 30 additions & 0 deletions projects/riverbankcomputing.com/sip/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
distributable:
url: https://www.riverbankcomputing.com/hg/sip/archive/{{version}}.tar.gz
strip-components: 1
versions:
url: https://www.riverbankcomputing.com/hg/sip/tags
match: /rev\/\d+\.\d+\.\d+/
strip:
- /^rev\//
dependencies:
python.org: ^3.11
linux:
tea.xyz/gx/cc: c99
build:
script:
- python-venv.sh {{prefix}}/bin/sip-install
- python-venv.sh {{prefix}}/bin/sip-build
- python-venv.sh {{prefix}}/bin/sip-distinfo
- python-venv.sh {{prefix}}/bin/sip-module
- python-venv.sh {{prefix}}/bin/sip-sdist
- python-venv.sh {{prefix}}/bin/sip-wheel
provides:
- bin/sip-install
- bin/sip-build
- bin/sip-distinfo
- bin/sip-module
- bin/sip-sdist
- bin/sip-wheel
test:
script:
- sip-install --target-dir .
8 changes: 8 additions & 0 deletions projects/riverbankcomputing.com/sip/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Specify sip v6 as the build system for the package.
[build-system]
requires = ["sip >=6, <7"]
build-backend = "sipbuild.api"

# Specify the PEP 566 metadata for the project.
[tool.sip.metadata]
name = "fib"