form-bin 5.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- form_bin-5.0.0/PKG-INFO +75 -0
- form_bin-5.0.0/README.md +53 -0
- form_bin-5.0.0/SConstruct +107 -0
- form_bin-5.0.0/form-packages/README.md +1 -0
- form_bin-5.0.0/form_bin/__init__.py +33 -0
- form_bin-5.0.0/form_bin/__main__.py +13 -0
- form_bin-5.0.0/form_bin/py.typed +0 -0
- form_bin-5.0.0/hepware/LICENSES_bundled.txt +37 -0
- form_bin-5.0.0/hepware/Makefile +265 -0
- form_bin-5.0.0/pyproject.toml +65 -0
form_bin-5.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: form-bin
|
|
3
|
+
Version: 5.0.0
|
|
4
|
+
Summary: The FORM project for symbolic manipulation of very big expressions
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
License: GPL-3.0-or-later
|
|
7
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
14
|
+
Project-URL: discussions, https://github.com/form-dev/form/discussions
|
|
15
|
+
Project-URL: documentation, https://form-dev.github.io/form-docs/stable/manual/
|
|
16
|
+
Project-URL: homepage, https://www.nikhef.nl/~form
|
|
17
|
+
Project-URL: issues, https://github.com/form-dev/form/issues
|
|
18
|
+
Project-URL: source, https://github.com/form-dev/form
|
|
19
|
+
Project-URL: wiki, https://github.com/form-dev/form/wiki
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
FORM
|
|
24
|
+
====
|
|
25
|
+
|
|
26
|
+
FORM is a Symbolic Manipulation System. It reads symbolic expressions from files and executes symbolic/algebraic transformations upon them. The answers are returned in a textual mathematical representation. As its landmark feature, the size of the considered expressions in FORM is only limited by the available disk space and not by the available RAM. FORM has been essential for many state-of-the-art computations in High Energy Physics.
|
|
27
|
+
|
|
28
|
+
FORM's original author is Jos Vermaseren of NIKHEF, the Dutch institute for subatomic physics. Other people that have made contributions can be found in the file "[AUTHORS](https://github.com/form-dev/form/blob/master/AUTHORS)".
|
|
29
|
+
|
|
30
|
+
Quick examples
|
|
31
|
+
--------------
|
|
32
|
+
|
|
33
|
+
The following FORM program repeatedly matches the power of a variable `x` in the expression `E`, as long as the power is more than 1 and creates two new terms with lower power:
|
|
34
|
+
|
|
35
|
+
```form
|
|
36
|
+
Symbol x,n;
|
|
37
|
+
Local E = x^10;
|
|
38
|
+
|
|
39
|
+
repeat id x^n?{>1} = x^(n-1) + x^(n-2);
|
|
40
|
+
|
|
41
|
+
Print;
|
|
42
|
+
.end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
and yields `E = 34 + 55*x`.
|
|
46
|
+
|
|
47
|
+
The following FORM program matches the function `f` that has any arguments before encountering an `x` and any arguments after, and switches them around:
|
|
48
|
+
|
|
49
|
+
```form
|
|
50
|
+
CFunction f;
|
|
51
|
+
Symbol x;
|
|
52
|
+
Local E = f(1,2,x,3,4);
|
|
53
|
+
|
|
54
|
+
id f(?a,x,?b) = f(?b,?a);
|
|
55
|
+
|
|
56
|
+
Print;
|
|
57
|
+
.end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
and yields `E = f(3,4,1,2)`.
|
|
61
|
+
|
|
62
|
+
FORM can match many more complicated patterns and has many more features, as documented in the [additional information](#additional-information).
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
Additional information
|
|
66
|
+
----------------------
|
|
67
|
+
|
|
68
|
+
The latest release notes are available on the [Wiki](https://github.com/form-dev/form/wiki/Release-Notes-FORM-5.0); the latest reference manual can be found [here](https://form-dev.github.io/form-docs/stable/manual/), and the Form Cookbook can be found [here](https://github.com/form-dev/form/wiki/FORM-Cookbook).
|
|
69
|
+
|
|
70
|
+
More background information, a collection of FORM programs, and a number of courses can be found on the official [FORM website](http://www.nikhef.nl/~form) and on the [Wiki](https://github.com/form-dev/form/wiki).
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
Bugs and remarks
|
|
74
|
+
----------------
|
|
75
|
+
For reporting bugs, asking questions, giving remarks and suggestions, we welcome you to use the [Issue Tracker](https://github.com/form-dev/form/issues) or [Discussion Forum](https://github.com/form-dev/form/discussions).
|
form_bin-5.0.0/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
FORM
|
|
2
|
+
====
|
|
3
|
+
|
|
4
|
+
FORM is a Symbolic Manipulation System. It reads symbolic expressions from files and executes symbolic/algebraic transformations upon them. The answers are returned in a textual mathematical representation. As its landmark feature, the size of the considered expressions in FORM is only limited by the available disk space and not by the available RAM. FORM has been essential for many state-of-the-art computations in High Energy Physics.
|
|
5
|
+
|
|
6
|
+
FORM's original author is Jos Vermaseren of NIKHEF, the Dutch institute for subatomic physics. Other people that have made contributions can be found in the file "[AUTHORS](https://github.com/form-dev/form/blob/master/AUTHORS)".
|
|
7
|
+
|
|
8
|
+
Quick examples
|
|
9
|
+
--------------
|
|
10
|
+
|
|
11
|
+
The following FORM program repeatedly matches the power of a variable `x` in the expression `E`, as long as the power is more than 1 and creates two new terms with lower power:
|
|
12
|
+
|
|
13
|
+
```form
|
|
14
|
+
Symbol x,n;
|
|
15
|
+
Local E = x^10;
|
|
16
|
+
|
|
17
|
+
repeat id x^n?{>1} = x^(n-1) + x^(n-2);
|
|
18
|
+
|
|
19
|
+
Print;
|
|
20
|
+
.end
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
and yields `E = 34 + 55*x`.
|
|
24
|
+
|
|
25
|
+
The following FORM program matches the function `f` that has any arguments before encountering an `x` and any arguments after, and switches them around:
|
|
26
|
+
|
|
27
|
+
```form
|
|
28
|
+
CFunction f;
|
|
29
|
+
Symbol x;
|
|
30
|
+
Local E = f(1,2,x,3,4);
|
|
31
|
+
|
|
32
|
+
id f(?a,x,?b) = f(?b,?a);
|
|
33
|
+
|
|
34
|
+
Print;
|
|
35
|
+
.end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
and yields `E = f(3,4,1,2)`.
|
|
39
|
+
|
|
40
|
+
FORM can match many more complicated patterns and has many more features, as documented in the [additional information](#additional-information).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Additional information
|
|
44
|
+
----------------------
|
|
45
|
+
|
|
46
|
+
The latest release notes are available on the [Wiki](https://github.com/form-dev/form/wiki/Release-Notes-FORM-5.0); the latest reference manual can be found [here](https://form-dev.github.io/form-docs/stable/manual/), and the Form Cookbook can be found [here](https://github.com/form-dev/form/wiki/FORM-Cookbook).
|
|
47
|
+
|
|
48
|
+
More background information, a collection of FORM programs, and a number of courses can be found on the official [FORM website](http://www.nikhef.nl/~form) and on the [Wiki](https://github.com/form-dev/form/wiki).
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Bugs and remarks
|
|
52
|
+
----------------
|
|
53
|
+
For reporting bugs, asking questions, giving remarks and suggestions, we welcome you to use the [Issue Tracker](https://github.com/form-dev/form/issues) or [Discussion Forum](https://github.com/form-dev/form/discussions).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
import enscons
|
|
4
|
+
import packaging.tags
|
|
5
|
+
import toml
|
|
6
|
+
from SCons.Script import Copy, Environment, File, FindSourceFiles, Mkdir
|
|
7
|
+
from setuptools_scm import get_version
|
|
8
|
+
|
|
9
|
+
BUNDLED_LICENSE_FILES = [
|
|
10
|
+
"LICENSES_bundled.txt",
|
|
11
|
+
"form/COPYING",
|
|
12
|
+
"gmp/COPYINGv3",
|
|
13
|
+
"gmp/COPYING.LESSERv3",
|
|
14
|
+
"mpfr/COPYING",
|
|
15
|
+
"mpfr/COPYING.LESSER",
|
|
16
|
+
"flint/COPYING",
|
|
17
|
+
"flint/COPYING.LESSER",
|
|
18
|
+
"zlib/LICENSE",
|
|
19
|
+
"zstd/LICENSE",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_universal_platform_tag() -> str:
|
|
24
|
+
"""Return the wheel tag for universal Python 3, but specific platform."""
|
|
25
|
+
tag = next(packaging.tags.sys_tags())
|
|
26
|
+
return f"py3-none-{tag.platform}"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_make_job_count() -> int:
|
|
30
|
+
"""Return the number of parallel jobs to use when running make."""
|
|
31
|
+
process_cpu_count = getattr(os, "process_cpu_count", None) # Python 3.13+
|
|
32
|
+
count = None
|
|
33
|
+
if process_cpu_count:
|
|
34
|
+
count = process_cpu_count()
|
|
35
|
+
return count or os.cpu_count() or 1
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
pyproject = toml.load("pyproject.toml")
|
|
39
|
+
metadata = pyproject["project"]
|
|
40
|
+
metadata["version"] = get_version(root=".", fallback_root=".")
|
|
41
|
+
metadata.pop("dynamic")
|
|
42
|
+
|
|
43
|
+
env = Environment(
|
|
44
|
+
tools=["default", "packaging", enscons.generate],
|
|
45
|
+
PACKAGE_METADATA=metadata,
|
|
46
|
+
WHEEL_TAG=get_universal_platform_tag(),
|
|
47
|
+
ENV=os.environ,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
hepware_form = env.Command(
|
|
51
|
+
["hepware/form.done", "hepware/bin/tform"],
|
|
52
|
+
["hepware/Makefile"],
|
|
53
|
+
f"make -C hepware -j{get_make_job_count()} form.done",
|
|
54
|
+
)
|
|
55
|
+
hepware_licenses = env.Command(
|
|
56
|
+
["hepware/licenses.done"],
|
|
57
|
+
["hepware/Makefile", "hepware/LICENSES_bundled.txt"],
|
|
58
|
+
f"make -C hepware -j{get_make_job_count()} licenses.done",
|
|
59
|
+
)
|
|
60
|
+
# Independent make invocations do not coordinate their shared archive targets.
|
|
61
|
+
# Run them sequentially, collecting licenses after the FORM build.
|
|
62
|
+
env.Requires(hepware_licenses, hepware_form)
|
|
63
|
+
|
|
64
|
+
files = [
|
|
65
|
+
File("form-packages/README.md"),
|
|
66
|
+
File("form_bin/__init__.py"),
|
|
67
|
+
File("form_bin/__main__.py"),
|
|
68
|
+
File("form_bin/py.typed"),
|
|
69
|
+
env.Command(
|
|
70
|
+
"form_bin/tform",
|
|
71
|
+
[hepware_form],
|
|
72
|
+
["cp hepware/bin/tform form_bin/tform", "strip form_bin/tform"],
|
|
73
|
+
),
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
platformlib = env.Whl("platlib", files, root="")
|
|
77
|
+
license_dir = env["DIST_INFO_PATH"].Dir("licenses")
|
|
78
|
+
wheel_licenses = []
|
|
79
|
+
for path in BUNDLED_LICENSE_FILES:
|
|
80
|
+
target = license_dir.File(path)
|
|
81
|
+
# Pass the generated path only to Copy(), not as an env.Command() source;
|
|
82
|
+
# otherwise FindSourceFiles() would include the license texts in the sdist.
|
|
83
|
+
source_path = f"hepware/build/licenses/{path}"
|
|
84
|
+
wheel_licenses.extend(
|
|
85
|
+
env.Command(
|
|
86
|
+
target,
|
|
87
|
+
hepware_licenses,
|
|
88
|
+
[Mkdir(target.dir), Copy(target, source_path)],
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
bdist = env.WhlFile(source=platformlib + wheel_licenses)
|
|
92
|
+
|
|
93
|
+
File("PKG-INFO")
|
|
94
|
+
# Work around an enscons 0.30.0 issue where the sdist target_prefix
|
|
95
|
+
# uses the unnormalised package name.
|
|
96
|
+
# FindSourceFiles() will list every source file of every target
|
|
97
|
+
# defined so far.
|
|
98
|
+
sdist_env = env.Clone()
|
|
99
|
+
sdist_env["PACKAGE_NAME"] = sdist_env["PACKAGE_NAME_SAFE"]
|
|
100
|
+
sdist = sdist_env.SDist(source=FindSourceFiles())
|
|
101
|
+
# setuptools-scm can change the version without changing pyproject.toml.
|
|
102
|
+
# Make SCons regenerate PKG-INFO when the resolved version changes.
|
|
103
|
+
sdist_env.Depends("PKG-INFO", sdist_env.Value(metadata["version"]))
|
|
104
|
+
|
|
105
|
+
env.Alias("dist", sdist + bdist)
|
|
106
|
+
env.Alias("bdist", bdist)
|
|
107
|
+
env.Alias("sdist", sdist)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This directory is here for FORM package sources.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
__all__ = ("form", "form_command")
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import tempfile
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _form_cmd() -> list[str]:
|
|
8
|
+
"""Determine the path and the needed set of arguments to call
|
|
9
|
+
the form binary. Make sure the include paths are set up so
|
|
10
|
+
that form packages installed into the Python environment are
|
|
11
|
+
found.
|
|
12
|
+
"""
|
|
13
|
+
this_dir = os.path.abspath(os.path.dirname(__file__))
|
|
14
|
+
packages = os.path.join(os.path.dirname(this_dir), "form-packages")
|
|
15
|
+
if not packages.endswith(os.path.sep):
|
|
16
|
+
packages += os.path.sep
|
|
17
|
+
form_path = os.path.join(this_dir, "tform")
|
|
18
|
+
tmp_dir = tempfile.gettempdir()
|
|
19
|
+
form_tmp = os.environ.get("FORMTMP", tmp_dir)
|
|
20
|
+
form_tmpsort = os.environ.get("FORMTMPSORT", tmp_dir)
|
|
21
|
+
return [form_path, "-I", packages, "-t", form_tmp, "-ts", form_tmpsort]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def form(*args: str) -> None:
|
|
25
|
+
"""Run the form binary with the given arguments."""
|
|
26
|
+
import subprocess
|
|
27
|
+
|
|
28
|
+
subprocess.check_call(form_command + list(args)) # noqa: S603
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# This is the path and the needed set of arguments to call the
|
|
32
|
+
# form binary.
|
|
33
|
+
form_command: list[str] = _form_cmd()
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
This binary distribution bundles the following software:
|
|
2
|
+
|
|
3
|
+
Name: FORM
|
|
4
|
+
Website: https://www.nikhef.nl/~form/
|
|
5
|
+
Repository: https://github.com/form-dev/form
|
|
6
|
+
License: GPL-3.0-or-later
|
|
7
|
+
License file: form/COPYING
|
|
8
|
+
|
|
9
|
+
Name: GNU MP
|
|
10
|
+
Website: https://gmplib.org
|
|
11
|
+
Repository: https://gmplib.org/repo/gmp/
|
|
12
|
+
License: LGPL-3.0-or-later
|
|
13
|
+
License files: gmp/COPYINGv3, gmp/COPYING.LESSERv3
|
|
14
|
+
|
|
15
|
+
Name: GNU MPFR
|
|
16
|
+
Website: https://www.mpfr.org
|
|
17
|
+
Repository: https://gitlab.inria.fr/mpfr/mpfr
|
|
18
|
+
License: LGPL-3.0-or-later
|
|
19
|
+
License files: mpfr/COPYING, mpfr/COPYING.LESSER
|
|
20
|
+
|
|
21
|
+
Name: FLINT
|
|
22
|
+
Website: https://flintlib.org
|
|
23
|
+
Repository: https://github.com/flintlib/flint
|
|
24
|
+
License: LGPL-3.0-or-later
|
|
25
|
+
License files: flint/COPYING, flint/COPYING.LESSER
|
|
26
|
+
|
|
27
|
+
Name: zlib
|
|
28
|
+
Website: https://zlib.net
|
|
29
|
+
Repository: https://github.com/madler/zlib
|
|
30
|
+
License: Zlib
|
|
31
|
+
License file: zlib/LICENSE
|
|
32
|
+
|
|
33
|
+
Name: Zstandard
|
|
34
|
+
Website: https://facebook.github.io/zstd/
|
|
35
|
+
Repository: https://github.com/facebook/zstd
|
|
36
|
+
License: BSD-3-Clause
|
|
37
|
+
License file: zstd/LICENSE
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
CC = cc
|
|
2
|
+
CXX = c++
|
|
3
|
+
FETCH = curl -fsSL --retry 5 -o
|
|
4
|
+
|
|
5
|
+
.PHONY: clean
|
|
6
|
+
|
|
7
|
+
clean:
|
|
8
|
+
rm -rf bin/ build/ include/ lib/ share/ *.done
|
|
9
|
+
|
|
10
|
+
UNAME_S := $(shell uname -s)
|
|
11
|
+
UNAME_M := $(shell uname -m)
|
|
12
|
+
|
|
13
|
+
ifeq ($(UNAME_S),Darwin)
|
|
14
|
+
SHA256_CHECK = shasum -a 256 -c -
|
|
15
|
+
else
|
|
16
|
+
SHA256_CHECK = sha256sum -c -
|
|
17
|
+
endif
|
|
18
|
+
|
|
19
|
+
ifeq ($(UNAME_S),Darwin)
|
|
20
|
+
GC_SECTIONS_LDFLAG = -Wl,-dead_strip
|
|
21
|
+
else
|
|
22
|
+
GC_SECTIONS_LDFLAG = -Wl,--gc-sections
|
|
23
|
+
endif
|
|
24
|
+
|
|
25
|
+
ifeq ($(UNAME_S),Linux)
|
|
26
|
+
FORM_LIBS = -pthread
|
|
27
|
+
else
|
|
28
|
+
FORM_LIBS =
|
|
29
|
+
endif
|
|
30
|
+
|
|
31
|
+
ifeq ($(UNAME_S)-$(UNAME_M),Darwin-x86_64)
|
|
32
|
+
GMP_CONFIGURE_FLAGS = --with-pic
|
|
33
|
+
FLINT_CONFIGURE_FLAGS = --disable-gmp-internals --disable-mpfr-check
|
|
34
|
+
else
|
|
35
|
+
GMP_CONFIGURE_FLAGS =
|
|
36
|
+
FLINT_CONFIGURE_FLAGS =
|
|
37
|
+
endif
|
|
38
|
+
|
|
39
|
+
DIR = ${CURDIR}
|
|
40
|
+
DEP_CFLAGS = -I${DIR}/include -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections ${CFLAGS}
|
|
41
|
+
DEP_FFLAGS = -I${DIR}/include -O3 ${FFLAGS}
|
|
42
|
+
DEP_LDFLAGS = -L${DIR}/lib ${GC_SECTIONS_LDFLAG} ${LDFLAGS}
|
|
43
|
+
|
|
44
|
+
MAKEOVERRIDES =
|
|
45
|
+
|
|
46
|
+
build/.dir:
|
|
47
|
+
mkdir -p bin build include lib share
|
|
48
|
+
date >$@
|
|
49
|
+
|
|
50
|
+
## GMP
|
|
51
|
+
|
|
52
|
+
VER_gmp = 6.3.0
|
|
53
|
+
SHA256_gmp = a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
|
|
54
|
+
|
|
55
|
+
build/gmp-${VER_gmp}.tar.xz: build/.dir
|
|
56
|
+
rm -f build/gmp*.tar.xz
|
|
57
|
+
${FETCH} $@ "https://ftpmirror.gnu.org/gmp/gmp-${VER_gmp}.tar.xz" \
|
|
58
|
+
|| ${FETCH} $@ "https://ftp.gnu.org/gnu/gmp/gmp-${VER_gmp}.tar.xz" \
|
|
59
|
+
|| ${FETCH} $@ "https://gmplib.org/download/gmp/gmp-${VER_gmp}.tar.xz" \
|
|
60
|
+
|| { rm -f $@; exit 1; }
|
|
61
|
+
{ echo "${SHA256_gmp} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
62
|
+
|
|
63
|
+
gmp.done: build/gmp-${VER_gmp}.tar.xz
|
|
64
|
+
rm -rf build/gmp-*/
|
|
65
|
+
cd build && tar xf gmp-${VER_gmp}.tar.xz
|
|
66
|
+
cd build/gmp-*/ && mv configfsf.guess config.guess
|
|
67
|
+
cd build/gmp-*/ && \
|
|
68
|
+
env CC="${CC}" CXX="${CXX}" CFLAGS="-std=c11 ${DEP_CFLAGS}" CXXFLAGS="${DEP_CFLAGS}" LDFLAGS="${DEP_LDFLAGS}" \
|
|
69
|
+
./configure \
|
|
70
|
+
--prefix="${DIR}" --libdir="${DIR}/lib" \
|
|
71
|
+
--includedir="${DIR}/include" --bindir="${DIR}/bin" \
|
|
72
|
+
--enable-static --disable-shared --enable-cxx \
|
|
73
|
+
${GMP_CONFIGURE_FLAGS}
|
|
74
|
+
+${MAKE} -C build/gmp-*/
|
|
75
|
+
+${MAKE} -C build/gmp-*/ install
|
|
76
|
+
date >$@
|
|
77
|
+
|
|
78
|
+
## MPFR
|
|
79
|
+
|
|
80
|
+
VER_mpfr = 4.2.2
|
|
81
|
+
SHA256_mpfr = b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01
|
|
82
|
+
|
|
83
|
+
build/mpfr-${VER_mpfr}.tar.xz: build/.dir
|
|
84
|
+
rm -f build/mpfr*.tar.xz
|
|
85
|
+
${FETCH} $@ "https://ftpmirror.gnu.org/mpfr/mpfr-${VER_mpfr}.tar.xz" \
|
|
86
|
+
|| ${FETCH} $@ "https://ftp.gnu.org/gnu/mpfr/mpfr-${VER_mpfr}.tar.xz" \
|
|
87
|
+
|| ${FETCH} $@ "https://www.mpfr.org/mpfr-${VER_mpfr}/mpfr-${VER_mpfr}.tar.xz" \
|
|
88
|
+
|| { rm -f $@; exit 1; }
|
|
89
|
+
{ echo "${SHA256_mpfr} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
90
|
+
|
|
91
|
+
mpfr.done: build/mpfr-${VER_mpfr}.tar.xz gmp.done
|
|
92
|
+
rm -rf build/mpfr-*/
|
|
93
|
+
cd build && tar xf mpfr-${VER_mpfr}.tar.xz
|
|
94
|
+
cd build/mpfr-*/ && \
|
|
95
|
+
env CC="${CC}" CXX="${CXX}" CFLAGS="${DEP_CFLAGS}" CXXFLAGS="${DEP_CFLAGS}" LDFLAGS="${DEP_LDFLAGS}" \
|
|
96
|
+
./configure \
|
|
97
|
+
--prefix="${DIR}" --libdir="${DIR}/lib" \
|
|
98
|
+
--includedir="${DIR}/include" --bindir="${DIR}/bin" \
|
|
99
|
+
--enable-static --disable-shared --enable-thread-safe \
|
|
100
|
+
--with-gmp="${DIR}"
|
|
101
|
+
+${MAKE} -C build/mpfr-*/
|
|
102
|
+
+${MAKE} -C build/mpfr-*/ install
|
|
103
|
+
date >$@
|
|
104
|
+
|
|
105
|
+
## Flint
|
|
106
|
+
|
|
107
|
+
VER_flint = 3.6.0
|
|
108
|
+
SHA256_flint = b95e2c7792f5eea4a1c8d2d42c4098434756832e57a094b295eb5dfdc9b4c36b
|
|
109
|
+
|
|
110
|
+
build/flint-${VER_flint}.tar.gz: build/.dir
|
|
111
|
+
rm -f build/flint*.tar.gz
|
|
112
|
+
${FETCH} $@ "https://flintlib.org/download/flint-${VER_flint}.tar.gz" \
|
|
113
|
+
|| ${FETCH} $@ "https://github.com/flintlib/flint/releases/download/v${VER_flint}/flint-${VER_flint}.tar.gz" \
|
|
114
|
+
|| { rm -f $@; exit 1; }
|
|
115
|
+
{ echo "${SHA256_flint} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
116
|
+
|
|
117
|
+
flint.done: build/flint-${VER_flint}.tar.gz gmp.done mpfr.done
|
|
118
|
+
rm -rf build/flint-*/
|
|
119
|
+
cd build && tar xf flint-${VER_flint}.tar.gz
|
|
120
|
+
cd build/flint-*/ && mv config/configfsf.guess config/config.guess
|
|
121
|
+
cd build/flint-*/ && \
|
|
122
|
+
./configure \
|
|
123
|
+
--prefix="${DIR}" --enable-static --disable-shared \
|
|
124
|
+
CC="${CC}" CXX="${CXX}" CFLAGS="${DEP_CFLAGS} -Wno-deprecated-declarations -Wmissing-prototypes -Wno-stringop-overflow -Wno-stringop-overread -Werror=implicit-function-declaration -Wall -std=c11 -pedantic -O3" \
|
|
125
|
+
${FLINT_CONFIGURE_FLAGS} \
|
|
126
|
+
--with-gmp="${DIR}" \
|
|
127
|
+
--with-mpfr="${DIR}"
|
|
128
|
+
+${MAKE} -C build/flint-*/ V=1
|
|
129
|
+
+${MAKE} -C build/flint-*/ install
|
|
130
|
+
date >$@
|
|
131
|
+
|
|
132
|
+
## zlib
|
|
133
|
+
|
|
134
|
+
VER_zlib = 1.3.2
|
|
135
|
+
SHA256_zlib = bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16
|
|
136
|
+
|
|
137
|
+
build/zlib-${VER_zlib}.tar.gz: build/.dir
|
|
138
|
+
rm -f build/zlib*.tar.gz
|
|
139
|
+
${FETCH} $@ "https://zlib.net/fossils/zlib-${VER_zlib}.tar.gz" \
|
|
140
|
+
|| ${FETCH} $@ "https://github.com/madler/zlib/releases/download/v${VER_zlib}/zlib-${VER_zlib}.tar.gz" \
|
|
141
|
+
|| { rm -f $@; exit 1; }
|
|
142
|
+
{ echo "${SHA256_zlib} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
143
|
+
|
|
144
|
+
zlib.done: build/zlib-${VER_zlib}.tar.gz
|
|
145
|
+
rm -rf build/zlib-*/
|
|
146
|
+
cd build && tar xf zlib-${VER_zlib}.tar.gz
|
|
147
|
+
cd build/zlib-*/ && \
|
|
148
|
+
env CC="${CC}" CXX="${CXX}" CFLAGS="${DEP_CFLAGS}" \
|
|
149
|
+
./configure \
|
|
150
|
+
--prefix="${DIR}" --static
|
|
151
|
+
+${MAKE} -C build/zlib-*/
|
|
152
|
+
+${MAKE} -C build/zlib-*/ install
|
|
153
|
+
date >$@
|
|
154
|
+
|
|
155
|
+
## FORM
|
|
156
|
+
|
|
157
|
+
VER_form = 5.0.0
|
|
158
|
+
SHA256_form = 10d22acf2f0acf831b494e6a73682828980b9054ea8ec2b5dc46677dca8d6518
|
|
159
|
+
|
|
160
|
+
build/form-${VER_form}.tar.gz: build/.dir
|
|
161
|
+
rm -f build/form*.tar.gz
|
|
162
|
+
${FETCH} $@ "https://github.com/form-dev/form/releases/download/v${VER_form}/form-${VER_form}.tar.gz" \
|
|
163
|
+
|| { rm -f $@; exit 1; }
|
|
164
|
+
{ echo "${SHA256_form} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
165
|
+
|
|
166
|
+
form.done: build/form-${VER_form}.tar.gz flint.done gmp.done mpfr.done zlib.done zstd.done
|
|
167
|
+
rm -rf build/form-*/
|
|
168
|
+
cd build && tar xf form-${VER_form}.tar.gz
|
|
169
|
+
cd build/form-*/ && \
|
|
170
|
+
env CC="${CC}" CXX="${CXX}" CFLAGS="${DEP_CFLAGS} -g" CXXFLAGS="${DEP_CFLAGS} -g" LDFLAGS="${DEP_LDFLAGS}" LIBS="${FORM_LIBS}" \
|
|
171
|
+
./configure \
|
|
172
|
+
--prefix="${DIR}" --libdir="${DIR}/lib" \
|
|
173
|
+
--includedir="${DIR}/include" --bindir="${DIR}/bin" \
|
|
174
|
+
--enable-scalar=yes \
|
|
175
|
+
--enable-threaded=yes \
|
|
176
|
+
--enable-debug=no \
|
|
177
|
+
--enable-parform=no \
|
|
178
|
+
--enable-float=yes \
|
|
179
|
+
--enable-static-link=no \
|
|
180
|
+
--enable-native=no \
|
|
181
|
+
--with-flint="${DIR}" \
|
|
182
|
+
--with-gmp="${DIR}" \
|
|
183
|
+
--with-mpfr="${DIR}" \
|
|
184
|
+
--with-zlib="${DIR}" \
|
|
185
|
+
--with-zstd="${DIR}"
|
|
186
|
+
+${MAKE} -C build/form-*/
|
|
187
|
+
+${MAKE} -C build/form-*/ install
|
|
188
|
+
date >$@
|
|
189
|
+
|
|
190
|
+
## Zstd
|
|
191
|
+
|
|
192
|
+
VER_zstd = 1.5.7
|
|
193
|
+
SHA256_zstd = eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3
|
|
194
|
+
|
|
195
|
+
build/zstd-${VER_zstd}.tar.gz: build/.dir
|
|
196
|
+
rm -f build/zstd*.tar.gz
|
|
197
|
+
${FETCH} $@ "https://github.com/facebook/zstd/releases/download/v${VER_zstd}/zstd-${VER_zstd}.tar.gz" \
|
|
198
|
+
|| { rm -f $@; exit 1; }
|
|
199
|
+
{ echo "${SHA256_zstd} $@" | ${SHA256_CHECK}; } || { rm -f $@; exit 1; }
|
|
200
|
+
|
|
201
|
+
zstd.done: build/zstd-${VER_zstd}.tar.gz zlib.done
|
|
202
|
+
rm -rf build/zstd-*/
|
|
203
|
+
cd build && tar xf zstd-${VER_zstd}.tar.gz
|
|
204
|
+
@# build libzstd.a, libastd_zlibwrapper.a, and zstd
|
|
205
|
+
+${MAKE} -C build/zstd-*/lib/ CC=${CC} CXX=${CXX} CFLAGS="${DEP_CFLAGS}" LDFLAGS="${DEP_LDFLAGS}" VERBOSE=1 libzstd.a-release-nomt
|
|
206
|
+
+${MAKE} -C build/zstd-*/programs/ CC=${CC} CXX=${CXX} CFLAGS="${DEP_CFLAGS}" LDFLAGS="${DEP_LDFLAGS}" VERBOSE=1 HAVE_ZLIB=no HAVE_LZMA=no HAVE_LZ4=no zstd-nomt
|
|
207
|
+
+${MAKE} -C build/zstd-*/zlibWrapper/ CC=${CC} CXX=${CXX} CFLAGS="${DEP_CFLAGS} -DZWRAP_USE_ZSTD=1" LDFLAGS="${DEP_LDFLAGS}" VERBOSE=1 zstd_zlibwrapper.o gzclose.o gzlib.o gzread.o gzwrite.o
|
|
208
|
+
cd build/zstd-*/zlibWrapper/ && ${AR} rcs libzstd_zlibwrapper.a zstd_zlibwrapper.o gzclose.o gzlib.o gzread.o gzwrite.o
|
|
209
|
+
@# install libzstd.a, libastd_zlibwrapper.a, zstd*.h, and zstd
|
|
210
|
+
+${MAKE} -C build/zstd-*/lib/ PREFIX="${DIR}" VERBOSE=1 install-static install-includes
|
|
211
|
+
+${MAKE} -C build/zstd-*/programs/ PREFIX="${DIR}" VERBOSE=1 install
|
|
212
|
+
cd build/zstd-*/zlibWrapper/ && cp -a libzstd_zlibwrapper.a "${DIR}/lib/"
|
|
213
|
+
cd build/zstd-*/zlibWrapper/ && cp -a zstd_zlibwrapper.h "${DIR}/include/"
|
|
214
|
+
date >$@
|
|
215
|
+
|
|
216
|
+
## License files
|
|
217
|
+
|
|
218
|
+
LICENSE_STAMP_DIR = build/stamps/licenses
|
|
219
|
+
|
|
220
|
+
LICENSE_STAMPS = \
|
|
221
|
+
${LICENSE_STAMP_DIR}/LICENSES_bundled.done \
|
|
222
|
+
${LICENSE_STAMP_DIR}/form.done \
|
|
223
|
+
${LICENSE_STAMP_DIR}/gmp.done \
|
|
224
|
+
${LICENSE_STAMP_DIR}/mpfr.done \
|
|
225
|
+
${LICENSE_STAMP_DIR}/flint.done \
|
|
226
|
+
${LICENSE_STAMP_DIR}/zlib.done \
|
|
227
|
+
${LICENSE_STAMP_DIR}/zstd.done
|
|
228
|
+
|
|
229
|
+
licenses.done: ${LICENSE_STAMPS}
|
|
230
|
+
date >$@
|
|
231
|
+
|
|
232
|
+
${LICENSE_STAMP_DIR}/LICENSES_bundled.done: LICENSES_bundled.txt
|
|
233
|
+
mkdir -p ${@D} build/licenses
|
|
234
|
+
cp LICENSES_bundled.txt build/licenses/
|
|
235
|
+
date >$@
|
|
236
|
+
|
|
237
|
+
${LICENSE_STAMP_DIR}/form.done: build/form-${VER_form}.tar.gz
|
|
238
|
+
mkdir -p ${@D} build/licenses/form
|
|
239
|
+
tar -xf $< -C build/licenses/form --strip-components=1 form-${VER_form}/COPYING
|
|
240
|
+
date >$@
|
|
241
|
+
|
|
242
|
+
${LICENSE_STAMP_DIR}/gmp.done: build/gmp-${VER_gmp}.tar.xz
|
|
243
|
+
mkdir -p ${@D} build/licenses/gmp
|
|
244
|
+
tar -xf $< -C build/licenses/gmp --strip-components=1 gmp-${VER_gmp}/COPYINGv3 gmp-${VER_gmp}/COPYING.LESSERv3
|
|
245
|
+
date >$@
|
|
246
|
+
|
|
247
|
+
${LICENSE_STAMP_DIR}/mpfr.done: build/mpfr-${VER_mpfr}.tar.xz
|
|
248
|
+
mkdir -p ${@D} build/licenses/mpfr
|
|
249
|
+
tar -xf $< -C build/licenses/mpfr --strip-components=1 mpfr-${VER_mpfr}/COPYING mpfr-${VER_mpfr}/COPYING.LESSER
|
|
250
|
+
date >$@
|
|
251
|
+
|
|
252
|
+
${LICENSE_STAMP_DIR}/flint.done: build/flint-${VER_flint}.tar.gz
|
|
253
|
+
mkdir -p ${@D} build/licenses/flint
|
|
254
|
+
tar -xf $< -C build/licenses/flint --strip-components=1 flint-${VER_flint}/COPYING flint-${VER_flint}/COPYING.LESSER
|
|
255
|
+
date >$@
|
|
256
|
+
|
|
257
|
+
${LICENSE_STAMP_DIR}/zlib.done: build/zlib-${VER_zlib}.tar.gz
|
|
258
|
+
mkdir -p ${@D} build/licenses/zlib
|
|
259
|
+
tar -xf $< -C build/licenses/zlib --strip-components=1 zlib-${VER_zlib}/LICENSE
|
|
260
|
+
date >$@
|
|
261
|
+
|
|
262
|
+
${LICENSE_STAMP_DIR}/zstd.done: build/zstd-${VER_zstd}.tar.gz
|
|
263
|
+
mkdir -p ${@D} build/licenses/zstd
|
|
264
|
+
tar -xf $< -C build/licenses/zstd --strip-components=1 zstd-${VER_zstd}/LICENSE
|
|
265
|
+
date >$@
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "enscons.api"
|
|
3
|
+
requires = [ "enscons~=0.30.0", "packaging>=20.9", "setuptools-scm~=10.2", "toml~=0.10.2" ]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "form-bin"
|
|
7
|
+
description = "The FORM project for symbolic manipulation of very big expressions"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
license = "GPL-3.0-or-later"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
13
|
+
"Programming Language :: Python :: 3.10",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Programming Language :: Python :: 3.14",
|
|
18
|
+
"Programming Language :: Python :: 3.15",
|
|
19
|
+
]
|
|
20
|
+
dynamic = [ "version" ]
|
|
21
|
+
urls.discussions = "https://github.com/form-dev/form/discussions"
|
|
22
|
+
urls.documentation = "https://form-dev.github.io/form-docs/stable/manual/"
|
|
23
|
+
urls.homepage = "https://www.nikhef.nl/~form"
|
|
24
|
+
urls.issues = "https://github.com/form-dev/form/issues"
|
|
25
|
+
urls.source = "https://github.com/form-dev/form"
|
|
26
|
+
urls.wiki = "https://github.com/form-dev/form/wiki"
|
|
27
|
+
scripts.form = "form_bin.__main__:main"
|
|
28
|
+
scripts.form-bin = "form_bin.__main__:main"
|
|
29
|
+
|
|
30
|
+
[tool.ruff]
|
|
31
|
+
target-version = "py310"
|
|
32
|
+
extend-include = [ "SConstruct" ]
|
|
33
|
+
lint.select = [ "ALL" ]
|
|
34
|
+
lint.ignore = [
|
|
35
|
+
"COM812", # missing-trailing-comma, incompatible with formatter
|
|
36
|
+
"CPY001", # for now
|
|
37
|
+
"D", # for now
|
|
38
|
+
"D203", # incorrect-blank-line-before-class, incompatible with D211
|
|
39
|
+
"D213", # multi-line-summary-second-line, incompatible with D212
|
|
40
|
+
"PLC0415", # for now
|
|
41
|
+
"PTH", # for now
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[tool.check-wheel-contents]
|
|
45
|
+
toplevel = [ "form_bin", "form-packages" ]
|
|
46
|
+
ignore = [
|
|
47
|
+
"W002", # FLINT and MPFR provide identical LGPL license files.
|
|
48
|
+
"W010", # form-packages is a placeholder directory containing no Python modules.
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[tool.pyproject-fmt]
|
|
52
|
+
keep_full_version = true
|
|
53
|
+
max_supported_python = "3.15"
|
|
54
|
+
|
|
55
|
+
[tool.mypy]
|
|
56
|
+
python_version = "3.10"
|
|
57
|
+
warn_unreachable = true
|
|
58
|
+
strict = true
|
|
59
|
+
pretty = true
|
|
60
|
+
overrides = [ { module = [ "enscons", "SCons.*" ], ignore_missing_imports = true } ]
|
|
61
|
+
show_error_codes = true
|
|
62
|
+
|
|
63
|
+
[tool.yamlfix]
|
|
64
|
+
explicit_start = false
|
|
65
|
+
whitelines = 1
|