mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
riverbankcomputing.com/sip (#2759)
* riverbankcomputing.com/sip * gcc * deps
This commit is contained in:
parent
74730a1eba
commit
fc4cf57990
3 changed files with 62 additions and 0 deletions
24
projects/riverbankcomputing.com/sip/fib.sip
Normal file
24
projects/riverbankcomputing.com/sip/fib.sip
Normal file
|
@ -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
projects/riverbankcomputing.com/sip/package.yml
Normal file
30
projects/riverbankcomputing.com/sip/package.yml
Normal file
|
@ -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
projects/riverbankcomputing.com/sip/pyproject.toml
Normal file
8
projects/riverbankcomputing.com/sip/pyproject.toml
Normal file
|
@ -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"
|
Loading…
Reference in a new issue