passagemath-homfly 10.6.40__cp313-cp313-win_arm64.whl

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.
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-homfly
2
+
3
+ from sage.all__sagemath_homfly import *
@@ -0,0 +1,2 @@
1
+ Version: 1.11.2
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7t3g7gdn\\cp313-win_arm64\\build\\venv\\Scripts\\delvewheel', 'repair', '-vv', '--custom-patch', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7t3g7gdn\\cp313-win_arm64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7t3g7gdn\\cp313-win_arm64\\built_wheel\\passagemath_homfly-10.6.40-cp313-cp313-win_arm64.whl']
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-homfly
3
+ Version: 10.6.40
4
+ Summary: passagemath: Homfly polynomials of knots/links with libhomfly
5
+ Author-email: The Sage Developers <sage-support@googlegroups.com>
6
+ Maintainer: Matthias Köppe, passagemath contributors
7
+ License-Expression: GPL-2.0-or-later
8
+ Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
+ Project-URL: repo (upstream), https://github.com/sagemath/sage
10
+ Project-URL: repo, https://github.com/passagemath/passagemath
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
+ Project-URL: homepage (upstream), https://www.sagemath.org
13
+ Project-URL: discourse, https://passagemath.discourse.group
14
+ Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
15
+ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Programming Language :: Python :: 3 :: Only
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
30
+ Requires-Python: <3.15,>=3.10
31
+ Description-Content-Type: text/x-rst
32
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
33
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
34
+ Provides-Extra: test
35
+ Requires-Dist: passagemath-graphs; extra == "test"
36
+ Requires-Dist: passagemath-repl; extra == "test"
37
+
38
+ ==========================================================================================
39
+ passagemath: Homfly polynomials of knots/links with libhomfly
40
+ ==========================================================================================
41
+
42
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
43
+ source mathematical software in Python, released under the GNU General
44
+ Public Licence GPLv2+.
45
+
46
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
47
+ developed 2005-2025 under the motto “Creating a Viable Open Source
48
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
49
+
50
+ The passagemath fork uses the motto "Creating a Free Passage Between the
51
+ Scientific Python Ecosystem and Mathematical Software Communities."
52
+ It was created in October 2024 with the following goals:
53
+
54
+ - providing modularized installation with pip,
55
+ - establishing first-class membership in the scientific Python
56
+ ecosystem,
57
+ - giving `clear attribution of upstream
58
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
59
+ - providing independently usable Python interfaces to upstream
60
+ libraries,
61
+ - offering `platform portability and integration testing
62
+ services <https://github.com/passagemath/passagemath/issues/704>`__
63
+ to upstream projects,
64
+ - inviting collaborations with upstream projects,
65
+ - `building a professional, respectful, inclusive
66
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
67
+ - `empowering Sage users to participate in the scientific Python ecosystem
68
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
69
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
70
+ serverless deployment with Javascript,
71
+ - developing a native Windows port.
72
+
73
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
74
+ available online.
75
+
76
+ passagemath attempts to support and provides binary wheels suitable for
77
+ all major Linux distributions and recent versions of macOS.
78
+
79
+ Binary wheels for native Windows (x86_64) are are available for a subset of
80
+ the passagemath distributions. Use of the full functionality of passagemath
81
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
82
+ or virtualization.
83
+
84
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
85
+
86
+
87
+ About this pip-installable distribution package
88
+ -----------------------------------------------
89
+
90
+ This pip-installable distribution ``passagemath-homfly`` provides a Cython interface
91
+ to the `libhomfly <https://github.com/miguelmarco/libhomfly>`_ library.
92
+
93
+
94
+ What is included
95
+ ----------------
96
+
97
+ * `sage.libs.homfly <https://github.com/passagemath/passagemath/blob/main/src/sage/libs/homfly.pyx>`_
98
+
99
+
100
+ Examples
101
+ --------
102
+
103
+ ::
104
+
105
+ $ pipx run --pip-args="--prefer-binary" --spec "passagemath-homfly[test]" ipython
106
+
107
+ In [1]: from sage.libs.homfly import homfly_polynomial_dict
108
+
109
+ In [2]: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
110
+
111
+ In [3]: homfly_polynomial_dict(trefoil)
112
+ Out[3]: {(-4, 0): -1, (-2, 0): -2, (-2, 2): 1}
@@ -0,0 +1,12 @@
1
+ passagemath_homfly/__init__.py,sha256=fMNOe_XkLgPa4znvxGJNQQCbdWVGlOyMm4d4z8evh10,86
2
+ passagemath_homfly-10.6.40.dist-info/DELVEWHEEL,sha256=7FYR9okdw13BLov3fVPM_nAg_-16KF-GrY72WUbeDGY,438
3
+ passagemath_homfly-10.6.40.dist-info/METADATA,sha256=PNGAJZ6DjcuMb6SgwAPTlZKhz4kVK4FiKQYyrf8NB_Y,5029
4
+ passagemath_homfly-10.6.40.dist-info/RECORD,,
5
+ passagemath_homfly-10.6.40.dist-info/top_level.txt,sha256=MBew0hgloNn4j2ZkYrRV9cJmjL2LALohdPPW3Qai1Cc,25
6
+ passagemath_homfly-10.6.40.dist-info/WHEEL,sha256=QL7uMKXoDJRpSwAf1VOVpjVXYPYll2YWTJ-omqdO8-4,101
7
+ passagemath_homfly.libs/libgc-1-3fe5ec40991cb9b17dd7dfde202a9a23.dll,sha256=P-XsQJkcubF919_eICqaIy3_9sraz_n3pHya3DBtBSQ,610816
8
+ passagemath_homfly.libs/libhomfly-0-a0e22e03c4723a24684619941c3858cc.dll,sha256=Zvll7HhHEm2MXYlliPQzve3xKTmUFMp1Xe6h-Ws_11A,132608
9
+ sage/all__sagemath_homfly.py,sha256=6O2ZEKzh3LB5UVWPwt64A2YIvajqcnh9XtHCwNZgttk,407
10
+ sage/libs/all__sagemath_homfly.py,sha256=acUGFX0Wx4P0uJwgj5m9ANtfRaZriA7rgY4-VlJE8xc,45
11
+ sage/libs/homfly.cp313-win_arm64.pyd,sha256=96PgxJSVrfjQtS2Xp0cAXy6e3QYJJxRIWkGY1GLS-4w,28672
12
+ sage/libs/homfly.pyx,sha256=RKaj10MXyfdAIqnDec18931GnQrOSPATo92NsdPNCe8,2988
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-win_arm64
5
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_homfly
3
+ sage
@@ -0,0 +1,13 @@
1
+ # sage_setup: distribution = sagemath-homfly
2
+ # start delvewheel patch
3
+ def _delvewheel_patch_1_11_2():
4
+ import os
5
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'passagemath_homfly.libs'))):
6
+ os.add_dll_directory(libs_dir)
7
+
8
+
9
+ _delvewheel_patch_1_11_2()
10
+ del _delvewheel_patch_1_11_2
11
+ # end delvewheel patch
12
+
13
+ from sage.all__sagemath_graphs import *
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-homfly
Binary file
sage/libs/homfly.pyx ADDED
@@ -0,0 +1,104 @@
1
+ # sage_setup: distribution = sagemath-homfly
2
+ # distutils: libraries = homfly gc
3
+ r"""
4
+ Cython wrapper for libhomfly library
5
+
6
+ This is used to call the libhomfly library directly from python. Knots
7
+ and links are passed following the convention in libhomfly. It is basically
8
+ the oriented Gauss code, represented as a string of integers separated
9
+ by spaces as follows:
10
+
11
+ - how many strings,
12
+
13
+ - for each string, how many crossings, then
14
+
15
+ - for each crossing, the cross name, then `1` if over, `-1` if under
16
+
17
+ - for each crossing, the name of the crossing and `1` if right, `-1` if left.
18
+
19
+ If there are `n` crossings, they must be named `0, 1, ..., n-1`.
20
+
21
+ AUTHORS:
22
+
23
+ - Miguel Marco (2015-03-24): initial version.
24
+ """
25
+
26
+ # ****************************************************************************
27
+ # Copyright (C) 2015 Miguel Marco <mmarco@unizar.es>
28
+ #
29
+ # Distributed under the terms of the GNU General Public License (GPL)
30
+ # as published by the Free Software Foundation; either version 2 of
31
+ # the License, or (at youroption) any later version.
32
+ # https://www.gnu.org/licenses/
33
+ # ****************************************************************************
34
+
35
+ from cysignals.signals cimport sig_on, sig_off
36
+
37
+ from sage.cpython.string cimport str_to_bytes, char_to_str
38
+
39
+ cdef extern from "homfly.h":
40
+ ctypedef int word
41
+ ctypedef signed long int sb4
42
+ ctypedef unsigned short int ub2
43
+ ctypedef signed short int sb2
44
+ struct Term:
45
+ sb4 coef
46
+ sb2 m
47
+ sb2 l
48
+ struct Poly:
49
+ Term* term
50
+ sb4 len
51
+ Poly* homfly(char *argv)
52
+ char* homfly_str(char *argv)
53
+
54
+
55
+ def homfly_polynomial_string(link):
56
+ r"""
57
+ Return the HOMFLY polynomial of a link.
58
+
59
+ INPUT:
60
+
61
+ - ``link`` -- string of space-separated integers representing the link
62
+
63
+ OUTPUT: string with the HOMFLY polynomial in the variables `M` and `L`
64
+
65
+ EXAMPLES::
66
+
67
+ sage: from sage.libs.homfly import homfly_polynomial_string
68
+ sage: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
69
+ sage: homfly_polynomial_string(trefoil)
70
+ ' - L^-4 - 2L^-2 + M^2L^-2'
71
+ """
72
+ link = str_to_bytes(link)
73
+ sig_on()
74
+ cdef char* c_output = homfly_str(link)
75
+ sig_off()
76
+ return char_to_str(c_output)
77
+
78
+
79
+ def homfly_polynomial_dict(link):
80
+ """
81
+ Return a dictionary representing the HOMFLY polynomial of a link.
82
+
83
+ INPUT:
84
+
85
+ - ``link`` -- string of space-separated integers representing the link
86
+
87
+ EXAMPLES::
88
+
89
+ sage: from sage.libs.homfly import homfly_polynomial_dict
90
+ sage: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
91
+ sage: homfly_polynomial_dict(trefoil)
92
+ {(-4, 0): -1, (-2, 0): -2, (-2, 2): 1}
93
+ """
94
+ link = str_to_bytes(link)
95
+ cdef Term ter
96
+ sig_on()
97
+ cdef Poly* c_output = homfly(link)
98
+ sig_off()
99
+ cdef int l = c_output.len
100
+ d = {}
101
+ for i in range(l):
102
+ ter = c_output.term[i]
103
+ d[(int(ter.l), int(ter.m))] = int(ter.coef)
104
+ return d