symengine 0.13.0__tar.gz → 0.14.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.
- {symengine-0.13.0 → symengine-0.14.0}/.mailmap +1 -0
- {symengine-0.13.0 → symengine-0.14.0}/AUTHORS +2 -0
- {symengine-0.13.0 → symengine-0.14.0}/CMakeLists.txt +1 -1
- {symengine-0.13.0/symengine.egg-info → symengine-0.14.0}/PKG-INFO +1 -1
- symengine-0.14.0/README.md +118 -0
- {symengine-0.13.0 → symengine-0.14.0}/bin/install_travis.sh +2 -2
- {symengine-0.13.0 → symengine-0.14.0}/cmake/FindPython.cmake +24 -10
- symengine-0.14.0/cmake/cython_test.cpp +4195 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/cython_test.pyx +2 -5
- {symengine-0.13.0 → symengine-0.14.0}/setup.py +1 -1
- symengine-0.14.0/symengine/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/__init__.py +1 -1
- symengine-0.14.0/symengine/cmake_install.cmake +50 -0
- symengine-0.14.0/symengine/lib/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- symengine-0.14.0/symengine/lib/CMakeFiles/symengine_wrapper.dir/DependInfo.cmake +20 -0
- symengine-0.14.0/symengine/lib/CMakeFiles/symengine_wrapper.dir/cmake_clean.cmake +16 -0
- symengine-0.14.0/symengine/lib/cmake_install.cmake +87 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/pywrapper.cpp +4 -4
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine.pxd +152 -152
- symengine-0.14.0/symengine/lib/symengine_wrapper.cpp +236987 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pyx +4 -4
- symengine-0.14.0/symengine/lib/symengine_wrapper.pxd +64 -0
- symengine-0.14.0/symengine/lib/symengine_wrapper.pyx +5503 -0
- {symengine-0.13.0 → symengine-0.14.0/symengine.egg-info}/PKG-INFO +1 -1
- {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/SOURCES.txt +10 -0
- symengine-0.14.0/symengine_version.txt +1 -0
- symengine-0.13.0/README.md +0 -81
- symengine-0.13.0/symengine_version.txt +0 -1
- {symengine-0.13.0 → symengine-0.14.0}/.github/workflows/ci.yml +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/.gitignore +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/LICENSE +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/MANIFEST.in +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/appveyor.yml +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/6_links_rhs.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/Lambdify.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/Lambdify_reference.pyx +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand1.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand1_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2b_sage.sage +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2b_sympy.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand3.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand3_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand4.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand4_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand5.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand5_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand6.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand6b.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand7.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expr.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/heterogeneous_output_Lambdify.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/kane.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/kane_generate.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/legendre1.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/legendre1_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/pydy_pendulum.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench_def.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/bin/test_python.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/bin/test_symengine_unix.sh +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/bin/test_travis.sh +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/bin/trigger_feedstock.sh +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/FindCython.cmake +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/FindNumPy.cmake +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/check_python_hypot.cpp +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/get_suffix.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/preprocess.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/cmake/version_script.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/docs/conf.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/docs/index.rst +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/setup.cfg +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/CMakeLists.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/functions.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/CMakeLists.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/__init__.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/pywrapper.h +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pxd +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/printing.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/sympy_compat.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/test_utilities.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/CMakeLists.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/__init__.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_arit.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_cse.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_dict_basic.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_eval.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_expr.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_functions.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_lambdify.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_logic.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_matrices.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_ntheory.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_number.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_pickling.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_printing.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sage.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_series_expansion.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sets.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_solve.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_subs.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_symbol.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympify.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympy_compat.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympy_conv.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_var.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine/utilities.py +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/dependency_links.txt +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/not-zip-safe +0 -0
- {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/top_level.txt +0 -0
@@ -13,7 +13,7 @@ set(CMAKE_PREFIX_PATH ${SymEngine_DIR} ${CMAKE_PREFIX_PATH})
|
|
13
13
|
|
14
14
|
include(GNUInstallDirs)
|
15
15
|
|
16
|
-
find_package(SymEngine 0.
|
16
|
+
find_package(SymEngine 0.14.0 REQUIRED CONFIG
|
17
17
|
PATH_SUFFIXES lib/cmake/symengine cmake/symengine CMake/)
|
18
18
|
message("SymEngine_DIR : " ${SymEngine_DIR})
|
19
19
|
message("SymEngine Version : " ${SymEngine_VERSION})
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# SymEngine Python Wrappers
|
2
|
+
|
3
|
+
Python wrappers to the C++ library [SymEngine](https://github.com/symengine/symengine),
|
4
|
+
a fast C++ symbolic manipulation library.
|
5
|
+
|
6
|
+
[](https://travis-ci.org/symengine/symengine.py)
|
7
|
+
[](https://ci.appveyor.com/project/symengine/symengine-py/branch/master)
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
### Pip
|
12
|
+
|
13
|
+
See License section for information about wheels
|
14
|
+
|
15
|
+
```bash
|
16
|
+
pip install symengine --user
|
17
|
+
```
|
18
|
+
|
19
|
+
### Conda package manager
|
20
|
+
|
21
|
+
```bash
|
22
|
+
conda install python-symengine -c conda-forge
|
23
|
+
```
|
24
|
+
|
25
|
+
### Build from source
|
26
|
+
|
27
|
+
Install prerequisites.
|
28
|
+
|
29
|
+
```bash
|
30
|
+
CMake >= 2.8.12
|
31
|
+
Python3 >= 3.8
|
32
|
+
Cython >= 0.29.24
|
33
|
+
SymEngine >= 0.7.0
|
34
|
+
```
|
35
|
+
|
36
|
+
For **SymEngine**, only a specific commit/tag (see `symengine_version.txt`) is
|
37
|
+
supported. The latest git master branch may not work as there may be breaking
|
38
|
+
changes in **SymEngine**.
|
39
|
+
|
40
|
+
Python wrappers can be installed by,
|
41
|
+
|
42
|
+
```bash
|
43
|
+
python setup.py install
|
44
|
+
```
|
45
|
+
|
46
|
+
Additional options to `setup.py` are:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
python setup.py install build_ext
|
50
|
+
--symengine-dir=/path/to/symengine/install/dir # Path to SymEngine install directory or build directory
|
51
|
+
--compiler=mingw32|msvc|cygwin # Select the compiler for Windows
|
52
|
+
--generator=cmake-generator # CMake Generator
|
53
|
+
--build-type=Release|Debug # Set build-type for multi-configuration generators like MSVC
|
54
|
+
--define="var1=value1;var2=value2" # Give options to CMake
|
55
|
+
--inplace # Build the extension in source tree
|
56
|
+
```
|
57
|
+
|
58
|
+
Standard options to `setup.py` like `--user`, `--prefix` can be used to
|
59
|
+
configure install location. NumPy is used if found by default, if you wish
|
60
|
+
to make your choice of NumPy use explicit: then add
|
61
|
+
e.g. `WITH_NUMPY=False` to `--define`.
|
62
|
+
|
63
|
+
### Notes on Dependencies
|
64
|
+
|
65
|
+
If you intend to evaluate floating-point expressions (using **lambdify**),
|
66
|
+
you should consider linking against **LLVM**. Many users might also benefit
|
67
|
+
from linking against **FLINT**, as it is now LGPL-licensed.
|
68
|
+
|
69
|
+
In general, **sudo** is only required if you are installing to the default
|
70
|
+
prefix (`/usr/local`). We recommend specifying a custom prefix
|
71
|
+
(`--prefix=$HOME/.local`) to avoid requiring administrative privileges,
|
72
|
+
which most users can do without using **sudo**.
|
73
|
+
|
74
|
+
If you're uncomfortable specifying the prefix manually, we suggest using
|
75
|
+
**Conda** or installing the pre-built wheels via **pip** instead of building
|
76
|
+
from source.
|
77
|
+
|
78
|
+
## Verification
|
79
|
+
|
80
|
+
You can verify the installation of **SymEngine** by using the provided code
|
81
|
+
snippet in this README. This snippet ensures that the installation works as
|
82
|
+
expected and that basic functionality is available.
|
83
|
+
|
84
|
+
```python
|
85
|
+
from symengine import var
|
86
|
+
x, y, z = var('x y z')
|
87
|
+
e = (x + y + z)**2
|
88
|
+
expanded_e = e.expand()
|
89
|
+
print(expanded_e)
|
90
|
+
```
|
91
|
+
This will output:
|
92
|
+
```python
|
93
|
+
x**2 + y**2 + z**2 + 2*x*y + 2*x*z + 2*y*z
|
94
|
+
```
|
95
|
+
|
96
|
+
Note: The verification code provided above checks the functionality of
|
97
|
+
SymEngine. For additional verification specific to SymEngine, please refer to
|
98
|
+
the [official SymEngine Python bindings repository](https://github.com/symengine/symengine.py)
|
99
|
+
for further tests and examples.
|
100
|
+
|
101
|
+
## License
|
102
|
+
|
103
|
+
symengine.py is MIT licensed and uses several LGPL, BSD-3, and MIT licensed
|
104
|
+
libraries.
|
105
|
+
|
106
|
+
Licenses for the dependencies of pip wheels are as follows:
|
107
|
+
|
108
|
+
- pip wheels on Unix use **GMP** (LGPL-3.0-or-later),
|
109
|
+
**MPFR** (LGPL-3.0-or-later), **MPC** (LGPL-3.0-or-later),
|
110
|
+
**LLVM** (Apache-2.0), **zlib** (Zlib), **libxml2** (MIT),
|
111
|
+
**zstd** (BSD-3-Clause), and **symengine** (MIT AND BSD-3-Clause).
|
112
|
+
- pip wheels on Windows use **MPIR** (LGPL-3.0-or-later) instead of **GMP**
|
113
|
+
above and **pthreads-win32** (LGPL-3.0-or-later) additionally.
|
114
|
+
- **NumPy** (BSD-3-Clause) and **SymPy** (BSD-3-Clause) are optional
|
115
|
+
dependencies.
|
116
|
+
- Sources for these binary dependencies can be found on
|
117
|
+
[symengine-wheels](https://github.com/symengine/symengine-wheels/releases).
|
118
|
+
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# symengine's bin/install_travis.sh will install miniconda
|
4
4
|
|
5
|
-
export conda_pkgs="python=${PYTHON_VERSION} pip
|
5
|
+
export conda_pkgs="python=${PYTHON_VERSION} pip pytest gmp mpfr"
|
6
6
|
|
7
7
|
if [[ "${WITH_NUMPY}" != "no" ]]; then
|
8
8
|
export conda_pkgs="${conda_pkgs} numpy";
|
@@ -27,7 +27,7 @@ if [[ "${WITH_SAGE}" == "yes" ]]; then
|
|
27
27
|
export conda_pkgs="${conda_pkgs} sage=8.1";
|
28
28
|
fi
|
29
29
|
|
30
|
-
conda install -q ${conda_pkgs}
|
30
|
+
conda install -q ${conda_pkgs} "cython>=0.29.24"
|
31
31
|
|
32
32
|
if [[ "${WITH_SYMPY}" != "no" ]]; then
|
33
33
|
pip install sympy;
|
@@ -22,26 +22,36 @@ execute_process(
|
|
22
22
|
string(STRIP ${PYTHON_LIB_PATH} PYTHON_LIB_PATH)
|
23
23
|
|
24
24
|
execute_process(
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
COMMAND ${PYTHON_BIN} -c "import sys; print(sys.prefix)"
|
26
|
+
OUTPUT_VARIABLE PYTHON_PREFIX_PATH
|
27
|
+
)
|
28
28
|
|
29
29
|
string(STRIP ${PYTHON_PREFIX_PATH} PYTHON_PREFIX_PATH)
|
30
30
|
|
31
31
|
execute_process(
|
32
|
-
|
32
|
+
COMMAND ${PYTHON_BIN} -c "import sys; print('%s.%s' % sys.version_info[:2])"
|
33
33
|
OUTPUT_VARIABLE PYTHON_VERSION
|
34
|
-
|
34
|
+
)
|
35
35
|
string(STRIP ${PYTHON_VERSION} PYTHON_VERSION)
|
36
36
|
message(STATUS "Python version: ${PYTHON_VERSION}")
|
37
37
|
|
38
38
|
string(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOTS ${PYTHON_VERSION})
|
39
39
|
|
40
|
+
execute_process(
|
41
|
+
COMMAND ${PYTHON_BIN} -c "import sysconfig;print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))"
|
42
|
+
OUTPUT_VARIABLE PY_GIL_DISABLED
|
43
|
+
)
|
44
|
+
string(STRIP ${PY_GIL_DISABLED} PY_GIL_DISABLED)
|
45
|
+
|
46
|
+
if ("${PY_GIL_DISABLED}" STREQUAL "True")
|
47
|
+
set (PY_THREAD "t")
|
48
|
+
endif()
|
49
|
+
|
40
50
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
41
51
|
FIND_LIBRARY(PYTHON_LIBRARY NAMES
|
42
|
-
python${PYTHON_VERSION}
|
52
|
+
python${PYTHON_VERSION}${PY_THREAD}
|
43
53
|
python${PYTHON_VERSION}m
|
44
|
-
python${PYTHON_VERSION_WITHOUT_DOTS}
|
54
|
+
python${PYTHON_VERSION_WITHOUT_DOTS}${PY_THREAD}
|
45
55
|
PATHS ${PYTHON_LIB_PATH} ${PYTHON_PREFIX_PATH}/lib ${PYTHON_PREFIX_PATH}/libs
|
46
56
|
PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE}
|
47
57
|
NO_DEFAULT_PATH
|
@@ -51,8 +61,8 @@ endif()
|
|
51
61
|
|
52
62
|
execute_process(
|
53
63
|
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['purelib'])"
|
54
|
-
|
55
|
-
|
64
|
+
OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
|
65
|
+
)
|
56
66
|
string(STRIP ${PYTHON_INSTALL_PATH_tmp} PYTHON_INSTALL_PATH_tmp)
|
57
67
|
set(PYTHON_INSTALL_PATH ${PYTHON_INSTALL_PATH_tmp}
|
58
68
|
CACHE BOOL "Python install path")
|
@@ -120,7 +130,7 @@ macro(ADD_PYTHON_LIBRARY name)
|
|
120
130
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/version_script.txt
|
121
131
|
${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt @ONLY)
|
122
132
|
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
123
|
-
LINK_FLAGS " -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt")
|
133
|
+
LINK_FLAGS " \"-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt\"")
|
124
134
|
ELSE()
|
125
135
|
add_library(${name} SHARED ${ARGN})
|
126
136
|
ENDIF()
|
@@ -129,5 +139,9 @@ macro(ADD_PYTHON_LIBRARY name)
|
|
129
139
|
IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
130
140
|
target_link_libraries(${name} ${PYTHON_LIBRARY})
|
131
141
|
set_target_properties(${name} PROPERTIES SUFFIX ".pyd")
|
142
|
+
IF("${PY_GIL_DISABLED}" STREQUAL "True")
|
143
|
+
target_compile_definitions(${name} PRIVATE Py_GIL_DISABLED=1)
|
144
|
+
ENDIF()
|
132
145
|
ENDIF()
|
146
|
+
|
133
147
|
endmacro(ADD_PYTHON_LIBRARY)
|