symengine 0.11.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.11.0 → symengine-0.14.0}/.github/workflows/ci.yml +6 -5
- {symengine-0.11.0 → symengine-0.14.0}/.mailmap +1 -0
- {symengine-0.11.0 → symengine-0.14.0}/AUTHORS +3 -0
- {symengine-0.11.0 → symengine-0.14.0}/CMakeLists.txt +1 -1
- {symengine-0.11.0/symengine.egg-info → symengine-0.14.0}/PKG-INFO +1 -1
- symengine-0.14.0/README.md +118 -0
- {symengine-0.11.0 → symengine-0.14.0}/appveyor.yml +21 -19
- {symengine-0.11.0 → symengine-0.14.0}/bin/install_travis.sh +6 -2
- {symengine-0.11.0 → symengine-0.14.0}/cmake/FindPython.cmake +27 -13
- symengine-0.14.0/cmake/cython_test.cpp +4195 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/cython_test.pyx +2 -5
- {symengine-0.11.0 → symengine-0.14.0}/cmake/get_suffix.py +1 -1
- {symengine-0.11.0 → symengine-0.14.0}/setup.py +1 -1
- symengine-0.14.0/symengine/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- {symengine-0.11.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.11.0 → symengine-0.14.0}/symengine/lib/pywrapper.cpp +4 -4
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/symengine.pxd +152 -152
- symengine-0.14.0/symengine/lib/symengine_wrapper.cpp +236987 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pxd +6 -5
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pyx +63 -42
- symengine-0.14.0/symengine/lib/symengine_wrapper.pxd +64 -0
- symengine-0.14.0/symengine/lib/symengine_wrapper.pyx +5503 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_arit.py +6 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_functions.py +12 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_logic.py +4 -1
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_matrices.py +3 -1
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_subs.py +7 -1
- {symengine-0.11.0 → symengine-0.14.0/symengine.egg-info}/PKG-INFO +1 -1
- {symengine-0.11.0 → symengine-0.14.0}/symengine.egg-info/SOURCES.txt +10 -0
- symengine-0.14.0/symengine_version.txt +1 -0
- symengine-0.11.0/README.md +0 -81
- symengine-0.11.0/symengine_version.txt +0 -1
- {symengine-0.11.0 → symengine-0.14.0}/.gitignore +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/LICENSE +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/MANIFEST.in +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/6_links_rhs.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/Lambdify.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/Lambdify_reference.pyx +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand1.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand1_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand2.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand2_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand2b_sage.sage +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand2b_sympy.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand3.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand3_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand4.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand4_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand5.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand5_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand6.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand6b.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expand7.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/expr.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/heterogeneous_output_Lambdify.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/kane.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/kane_generate.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/legendre1.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/legendre1_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/pydy_pendulum.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/symbench.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/symbench_def.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/benchmarks/symbench_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/bin/test_python.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/bin/test_symengine_unix.sh +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/bin/test_travis.sh +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/bin/trigger_feedstock.sh +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/FindCython.cmake +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/FindNumPy.cmake +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/check_python_hypot.cpp +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/preprocess.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/cmake/version_script.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/docs/conf.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/docs/index.rst +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/setup.cfg +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/CMakeLists.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/functions.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/CMakeLists.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/__init__.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/lib/pywrapper.h +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/printing.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/sympy_compat.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/test_utilities.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/CMakeLists.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/__init__.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_cse.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_dict_basic.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_eval.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_expr.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_lambdify.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_ntheory.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_number.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_pickling.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_printing.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_sage.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_series_expansion.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_sets.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_solve.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_symbol.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_sympify.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_sympy_compat.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_sympy_conv.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/tests/test_var.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine/utilities.py +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine.egg-info/dependency_links.txt +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine.egg-info/not-zip-safe +0 -0
- {symengine-0.11.0 → symengine-0.14.0}/symengine.egg-info/top_level.txt +0 -0
@@ -111,32 +111,33 @@ jobs:
|
|
111
111
|
PYTHON_VERSION: '3.8'
|
112
112
|
WITH_SCIPY: yes
|
113
113
|
WITH_LLVM: 5.0
|
114
|
-
OS: macos-
|
114
|
+
OS: macos-13
|
115
115
|
CC: clang
|
116
116
|
|
117
117
|
- BUILD_TYPE: Release
|
118
118
|
PYTHON_VERSION: '3.9'
|
119
119
|
WITH_NUMPY: no
|
120
|
-
OS: macos-
|
120
|
+
OS: macos-13
|
121
121
|
CC: clang
|
122
122
|
|
123
123
|
- BUILD_TYPE: Debug
|
124
124
|
PYTHON_VERSION: '3.8'
|
125
125
|
WITH_NUMPY: no
|
126
|
-
OS: macos-
|
126
|
+
OS: macos-13
|
127
127
|
CC: gcc
|
128
128
|
|
129
129
|
- BUILD_TYPE: Release
|
130
130
|
PYTHON_VERSION: '3.8'
|
131
|
-
OS: macos-
|
131
|
+
OS: macos-13
|
132
132
|
CC: gcc
|
133
133
|
|
134
134
|
- BUILD_TYPE: Release
|
135
|
-
PYTHON_VERSION: '3.
|
135
|
+
PYTHON_VERSION: '3.11'
|
136
136
|
OS: ubuntu-20.04
|
137
137
|
WITH_MPC: yes
|
138
138
|
WITH_MPFR: yes
|
139
139
|
WITH_FLINT: yes
|
140
|
+
WITH_FLINT_PY: yes
|
140
141
|
WITH_SCIPY: yes
|
141
142
|
WITH_DOCS: yes
|
142
143
|
INTEGER_CLASS: flint
|
@@ -35,3 +35,6 @@ Garming Sam <garming@catalyst.net.nz>
|
|
35
35
|
Pieter Eendebak <pieter.eendebak@gmail.com>
|
36
36
|
Ayush Kumar <ayushk7102@gmail.com>
|
37
37
|
Christian Clauss <cclauss@me.com>
|
38
|
+
Moraxyc <i@qaq.li>
|
39
|
+
Aaron Miller <78561124+aaron-skydio@users.noreply.github.com>
|
40
|
+
Firat Bezir <bezir.1@osu.edu>
|
@@ -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
|
+
|
@@ -7,30 +7,37 @@ environment:
|
|
7
7
|
PLATFORMTOOLSET: "v140"
|
8
8
|
|
9
9
|
matrix:
|
10
|
+
- BUILD_TYPE: "Release"
|
11
|
+
COMPILER: MSVC15
|
12
|
+
PLATFORM: "Win32"
|
13
|
+
PYTHON_VERSION: 39
|
14
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
15
|
+
WITH_MPFR: yes
|
16
|
+
WITH_MPC: yes
|
10
17
|
- BUILD_TYPE: "Release"
|
11
18
|
COMPILER: MSVC15
|
12
19
|
PLATFORM: "x64"
|
13
20
|
PYTHON_VERSION: 310-x64
|
14
|
-
CONDA_INSTALL_LOCN: C:\\
|
21
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
15
22
|
WITH_MPFR: yes
|
16
23
|
WITH_MPC: yes
|
17
24
|
- BUILD_TYPE: "Release"
|
18
25
|
COMPILER: MSVC15
|
19
26
|
PLATFORM: "x64"
|
20
27
|
PYTHON_VERSION: 38-x64
|
21
|
-
CONDA_INSTALL_LOCN: C:\\
|
28
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
22
29
|
- BUILD_TYPE: "Release"
|
23
30
|
COMPILER: MSVC15
|
24
31
|
PLATFORM: "x64"
|
25
32
|
PYTHON_VERSION: 39-x64
|
26
33
|
WITH_SYMPY: no
|
27
|
-
CONDA_INSTALL_LOCN: C:\\
|
34
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
28
35
|
- BUILD_TYPE: "Release"
|
29
36
|
COMPILER: MSVC15
|
30
37
|
PLATFORM: "x64"
|
31
38
|
PYTHON_VERSION: 311-x64
|
32
39
|
WITH_NUMPY: no
|
33
|
-
CONDA_INSTALL_LOCN: C:\\
|
40
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
34
41
|
#- BUILD_TYPE: "Debug"
|
35
42
|
# COMPILER: MinGW-w64
|
36
43
|
# PYTHON_VERSION: 39-x64
|
@@ -42,18 +49,11 @@ environment:
|
|
42
49
|
# COMPILER: MinGW-w64
|
43
50
|
# PYTHON_VERSION: 39-x64
|
44
51
|
# WITH_SYMPY: no
|
45
|
-
- BUILD_TYPE: "Release"
|
46
|
-
COMPILER: MSVC15
|
47
|
-
PLATFORM: "Win32"
|
48
|
-
PYTHON_VERSION: 39
|
49
|
-
CONDA_INSTALL_LOCN: C:\\Miniconda36
|
50
|
-
WITH_MPFR: yes
|
51
|
-
WITH_MPC: yes
|
52
52
|
- BUILD_TYPE: "Release"
|
53
53
|
COMPILER: MSVC15
|
54
54
|
PLATFORM: "x64"
|
55
55
|
PYTHON_VERSION: 310-x64
|
56
|
-
CONDA_INSTALL_LOCN: C:\\
|
56
|
+
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
|
57
57
|
WITH_MPFR: yes
|
58
58
|
WITH_MPC: yes
|
59
59
|
WITH_LLVM: yes
|
@@ -61,19 +61,21 @@ environment:
|
|
61
61
|
install:
|
62
62
|
- set PYTHON_SOURCE_DIR=%CD%
|
63
63
|
- git clone https://github.com/sympy/symengine symengine-cpp
|
64
|
+
- if [%PLATFORM%]==[Win32] set "CONDA_SUBDIR=win-32"
|
64
65
|
|
65
66
|
- if [%COMPILER%]==[MSVC15] call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
|
66
|
-
- if [%COMPILER%]==[MSVC15]
|
67
|
-
- if [%COMPILER%]==[MSVC15]
|
68
|
-
- if [%COMPILER%]==[MSVC15] if [%
|
69
|
-
- if [%COMPILER%]==[MSVC15]
|
67
|
+
- if [%COMPILER%]==[MSVC15] set "CONDA_DEPS=mpir=3.0.0 vc=14"
|
68
|
+
- if [%COMPILER%]==[MSVC15] if [%WITH_MPFR%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% mpfr=3.1.5"
|
69
|
+
- if [%COMPILER%]==[MSVC15] if [%WITH_MPC%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% mpc=1.0.3"
|
70
|
+
- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% llvmdev=4.0"
|
71
|
+
- if [%COMPILER%]==[MSVC15] set "CONDA_DEPS=%CONDA_DEPS% -c conda-forge"
|
72
|
+
- if [%COMPILER%]==[MSVC15] if [%BUILD_TYPE%]==[Debug] set "CONDA_DEPS=%CONDA_DEPS% -c symengine/label/debug"
|
73
|
+
- if [%COMPILER%]==[MSVC15] conda create -n deps --yes %CONDA_DEPS%
|
74
|
+
- if [%COMPILER%]==[MSVC15] call conda activate deps
|
70
75
|
- if [%COMPILER%]==[MSVC15] echo %CONDA_PREFIX%
|
71
76
|
- if [%COMPILER%]==[MSVC15] echo %PATH%
|
72
77
|
- if [%COMPILER%]==[MSVC15] set "PATH=%PATH%;%CONDA_PREFIX%\\Library\\bin;%CONDA_PREFIX%"
|
73
78
|
- if [%COMPILER%]==[MSVC15] echo %PATH%
|
74
|
-
- if [%COMPILER%]==[MSVC15] if [%WITH_MPFR%]==[yes] conda install --yes mpfr=3.1.5
|
75
|
-
- if [%COMPILER%]==[MSVC15] if [%WITH_MPC%]==[yes] conda install --yes mpc=1.0.3
|
76
|
-
- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] conda install --yes llvmdev=4.0
|
77
79
|
|
78
80
|
- if [%COMPILER%]==[MinGW] set "PATH=C:\MinGW\bin;%PATH%"
|
79
81
|
- if [%COMPILER%]==[MinGW] mingw-get update
|
@@ -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";
|
@@ -16,6 +16,10 @@ if [[ "${WITH_DOCS}" == "yes" ]]; then
|
|
16
16
|
export conda_pkgs="${conda_pkgs} sphinx recommonmark";
|
17
17
|
fi
|
18
18
|
|
19
|
+
if [[ "${WITH_FLINT_PY}" == "yes" ]]; then
|
20
|
+
export conda_pkgs="${conda_pkgs} python-flint"; # python-flint affects sympy, see e.g. sympy/sympy#26645
|
21
|
+
fi
|
22
|
+
|
19
23
|
if [[ "${WITH_SAGE}" == "yes" ]]; then
|
20
24
|
# This is split to avoid the 10 minute limit
|
21
25
|
conda install -q sagelib=8.1
|
@@ -23,7 +27,7 @@ if [[ "${WITH_SAGE}" == "yes" ]]; then
|
|
23
27
|
export conda_pkgs="${conda_pkgs} sage=8.1";
|
24
28
|
fi
|
25
29
|
|
26
|
-
conda install -q ${conda_pkgs}
|
30
|
+
conda install -q ${conda_pkgs} "cython>=0.29.24"
|
27
31
|
|
28
32
|
if [[ "${WITH_SYMPY}" != "no" ]]; then
|
29
33
|
pip install sympy;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
set(PYTHON_BIN python CACHE STRING "Python executable name")
|
2
2
|
|
3
3
|
execute_process(
|
4
|
-
COMMAND ${PYTHON_BIN} -c "from
|
4
|
+
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['include'])"
|
5
5
|
OUTPUT_VARIABLE PYTHON_SYS_PATH
|
6
6
|
)
|
7
7
|
string(STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
|
@@ -16,32 +16,42 @@ set(PYTHON_INSTALL_HEADER_PATH ${PYTHON_INCLUDE_PATH}/symengine
|
|
16
16
|
CACHE BOOL "Python install headers path")
|
17
17
|
|
18
18
|
execute_process(
|
19
|
-
COMMAND ${PYTHON_BIN} -c "from
|
19
|
+
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
|
20
20
|
OUTPUT_VARIABLE PYTHON_LIB_PATH
|
21
21
|
)
|
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
|
@@ -50,9 +60,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
50
60
|
endif()
|
51
61
|
|
52
62
|
execute_process(
|
53
|
-
|
54
|
-
|
55
|
-
|
63
|
+
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['purelib'])"
|
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)
|