symengine 0.13.0__tar.gz → 0.14.1__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.
Files changed (116) hide show
  1. {symengine-0.13.0 → symengine-0.14.1}/.github/workflows/ci.yml +9 -9
  2. {symengine-0.13.0 → symengine-0.14.1}/.mailmap +2 -0
  3. {symengine-0.13.0 → symengine-0.14.1}/AUTHORS +3 -0
  4. {symengine-0.13.0 → symengine-0.14.1}/CMakeLists.txt +2 -2
  5. {symengine-0.13.0/symengine.egg-info → symengine-0.14.1}/PKG-INFO +12 -4
  6. symengine-0.14.1/README.md +118 -0
  7. {symengine-0.13.0 → symengine-0.14.1}/appveyor.yml +2 -2
  8. {symengine-0.13.0 → symengine-0.14.1}/bin/install_travis.sh +2 -2
  9. {symengine-0.13.0 → symengine-0.14.1}/cmake/FindPython.cmake +25 -11
  10. symengine-0.14.1/cmake/cython_test.cpp +4290 -0
  11. {symengine-0.13.0 → symengine-0.14.1}/cmake/cython_test.pyx +2 -5
  12. {symengine-0.13.0 → symengine-0.14.1}/setup.py +8 -8
  13. symengine-0.14.1/symengine/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  14. symengine-0.14.1/symengine/CMakeLists.txt +17 -0
  15. {symengine-0.13.0 → symengine-0.14.1}/symengine/__init__.py +1 -1
  16. symengine-0.14.1/symengine/cmake_install.cmake +79 -0
  17. symengine-0.14.1/symengine/lib/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  18. symengine-0.14.1/symengine/lib/CMakeFiles/symengine_wrapper.dir/DependInfo.cmake +25 -0
  19. symengine-0.14.1/symengine/lib/CMakeFiles/symengine_wrapper.dir/cmake_clean.cmake +17 -0
  20. symengine-0.14.1/symengine/lib/cmake_install.cmake +105 -0
  21. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/pywrapper.cpp +4 -4
  22. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/symengine.pxd +152 -152
  23. symengine-0.14.1/symengine/lib/symengine_wrapper.cpp +245395 -0
  24. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/symengine_wrapper.in.pyx +4 -10
  25. symengine-0.14.1/symengine/lib/symengine_wrapper.pxd +83 -0
  26. symengine-0.14.1/symengine/lib/symengine_wrapper.pyx +5674 -0
  27. symengine-0.14.1/symengine/tests/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  28. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/CMakeLists.txt +12 -7
  29. symengine-0.14.1/symengine/tests/cmake_install.cmake +87 -0
  30. {symengine-0.13.0 → symengine-0.14.1/symengine.egg-info}/PKG-INFO +12 -4
  31. {symengine-0.13.0 → symengine-0.14.1}/symengine.egg-info/SOURCES.txt +13 -1
  32. symengine-0.14.1/symengine.egg-info/top_level.txt +1 -0
  33. symengine-0.14.1/symengine_version.txt +1 -0
  34. symengine-0.13.0/README.md +0 -81
  35. symengine-0.13.0/symengine/CMakeLists.txt +0 -10
  36. symengine-0.13.0/symengine.egg-info/top_level.txt +0 -1
  37. symengine-0.13.0/symengine_version.txt +0 -1
  38. {symengine-0.13.0 → symengine-0.14.1}/.gitignore +0 -0
  39. {symengine-0.13.0 → symengine-0.14.1}/LICENSE +0 -0
  40. {symengine-0.13.0 → symengine-0.14.1}/MANIFEST.in +0 -0
  41. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/6_links_rhs.txt +0 -0
  42. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/Lambdify.py +0 -0
  43. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/Lambdify_reference.pyx +0 -0
  44. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand1.py +0 -0
  45. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand1_sage.py +0 -0
  46. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand2.py +0 -0
  47. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand2_sage.py +0 -0
  48. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand2b_sage.sage +0 -0
  49. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand2b_sympy.py +0 -0
  50. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand3.py +0 -0
  51. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand3_sage.py +0 -0
  52. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand4.py +0 -0
  53. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand4_sage.py +0 -0
  54. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand5.py +0 -0
  55. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand5_sage.py +0 -0
  56. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand6.py +0 -0
  57. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand6b.py +0 -0
  58. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expand7.py +0 -0
  59. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/expr.txt +0 -0
  60. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/heterogeneous_output_Lambdify.py +0 -0
  61. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/kane.py +0 -0
  62. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/kane_generate.py +0 -0
  63. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/legendre1.py +0 -0
  64. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/legendre1_sage.py +0 -0
  65. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/pydy_pendulum.py +0 -0
  66. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/symbench.py +0 -0
  67. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/symbench_def.py +0 -0
  68. {symengine-0.13.0 → symengine-0.14.1}/benchmarks/symbench_sage.py +0 -0
  69. {symengine-0.13.0 → symengine-0.14.1}/bin/test_python.py +0 -0
  70. {symengine-0.13.0 → symengine-0.14.1}/bin/test_symengine_unix.sh +0 -0
  71. {symengine-0.13.0 → symengine-0.14.1}/bin/test_travis.sh +0 -0
  72. {symengine-0.13.0 → symengine-0.14.1}/bin/trigger_feedstock.sh +0 -0
  73. {symengine-0.13.0 → symengine-0.14.1}/cmake/FindCython.cmake +0 -0
  74. {symengine-0.13.0 → symengine-0.14.1}/cmake/FindNumPy.cmake +0 -0
  75. {symengine-0.13.0 → symengine-0.14.1}/cmake/check_python_hypot.cpp +0 -0
  76. {symengine-0.13.0 → symengine-0.14.1}/cmake/get_suffix.py +0 -0
  77. {symengine-0.13.0 → symengine-0.14.1}/cmake/preprocess.py +0 -0
  78. {symengine-0.13.0 → symengine-0.14.1}/cmake/version_script.txt +0 -0
  79. {symengine-0.13.0 → symengine-0.14.1}/docs/conf.py +0 -0
  80. {symengine-0.13.0 → symengine-0.14.1}/docs/index.rst +0 -0
  81. {symengine-0.13.0 → symengine-0.14.1}/setup.cfg +0 -0
  82. {symengine-0.13.0 → symengine-0.14.1}/symengine/functions.py +0 -0
  83. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/CMakeLists.txt +0 -0
  84. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/__init__.py +0 -0
  85. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/pywrapper.h +0 -0
  86. {symengine-0.13.0 → symengine-0.14.1}/symengine/lib/symengine_wrapper.in.pxd +0 -0
  87. {symengine-0.13.0 → symengine-0.14.1}/symengine/printing.py +0 -0
  88. {symengine-0.13.0 → symengine-0.14.1}/symengine/sympy_compat.py +0 -0
  89. {symengine-0.13.0 → symengine-0.14.1}/symengine/test_utilities.py +0 -0
  90. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/__init__.py +0 -0
  91. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_arit.py +0 -0
  92. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_cse.py +0 -0
  93. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_dict_basic.py +0 -0
  94. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_eval.py +0 -0
  95. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_expr.py +0 -0
  96. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_functions.py +0 -0
  97. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_lambdify.py +0 -0
  98. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_logic.py +0 -0
  99. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_matrices.py +0 -0
  100. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_ntheory.py +0 -0
  101. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_number.py +0 -0
  102. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_pickling.py +0 -0
  103. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_printing.py +0 -0
  104. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_sage.py +0 -0
  105. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_series_expansion.py +0 -0
  106. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_sets.py +0 -0
  107. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_solve.py +0 -0
  108. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_subs.py +0 -0
  109. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_symbol.py +0 -0
  110. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_sympify.py +0 -0
  111. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_sympy_compat.py +0 -0
  112. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_sympy_conv.py +0 -0
  113. {symengine-0.13.0 → symengine-0.14.1}/symengine/tests/test_var.py +0 -0
  114. {symengine-0.13.0 → symengine-0.14.1}/symengine/utilities.py +0 -0
  115. {symengine-0.13.0 → symengine-0.14.1}/symengine.egg-info/dependency_links.txt +0 -0
  116. {symengine-0.13.0 → symengine-0.14.1}/symengine.egg-info/not-zip-safe +0 -0
@@ -37,13 +37,13 @@ jobs:
37
37
  CC: gcc
38
38
 
39
39
  - BUILD_TYPE: Release
40
- PYTHON_VERSION: '3.8'
40
+ PYTHON_VERSION: '3.13'
41
41
  BUILD_SHARED_LIBS: yes
42
42
  OS: ubuntu-20.04
43
43
  CC: gcc
44
44
 
45
45
  - BUILD_TYPE: Release
46
- PYTHON_VERSION: '3.8'
46
+ PYTHON_VERSION: '3.13'
47
47
  WITH_MPFR: yes
48
48
  INTEGER_CLASS: gmpxx
49
49
  WITH_NUMPY: no
@@ -51,14 +51,14 @@ jobs:
51
51
  CC: gcc
52
52
 
53
53
  - BUILD_TYPE: Release
54
- PYTHON_VERSION: '3.8'
54
+ PYTHON_VERSION: '3.13'
55
55
  WITH_MPC: yes
56
56
  OS: ubuntu-20.04
57
57
  CC: gcc
58
58
 
59
59
  - BUILD_TYPE: Release
60
60
  WITH_MPFR: yes
61
- PYTHON_VERSION: '3.8'
61
+ PYTHON_VERSION: '3.13'
62
62
  OS: ubuntu-20.04
63
63
  CC: gcc
64
64
 
@@ -84,14 +84,14 @@ jobs:
84
84
  # CC: gcc
85
85
 
86
86
  - BUILD_TYPE: Debug
87
- PYTHON_VERSION: '3.8'
87
+ PYTHON_VERSION: '3.13'
88
88
  WITH_BFD: yes
89
89
  BUILD_SHARED_LIBS: yes
90
90
  OS: ubuntu-20.04
91
91
  CC: clang
92
92
 
93
93
  - BUILD_TYPE: Release
94
- PYTHON_VERSION: '3.8'
94
+ PYTHON_VERSION: '3.13'
95
95
  WITH_NUMPY: yes
96
96
  OS: ubuntu-20.04
97
97
  CC: clang
@@ -108,7 +108,7 @@ jobs:
108
108
  EXTRA_APT_PACKAGES: 'llvm-14'
109
109
 
110
110
  - BUILD_TYPE: Debug
111
- PYTHON_VERSION: '3.8'
111
+ PYTHON_VERSION: '3.13'
112
112
  WITH_SCIPY: yes
113
113
  WITH_LLVM: 5.0
114
114
  OS: macos-13
@@ -121,13 +121,13 @@ jobs:
121
121
  CC: clang
122
122
 
123
123
  - BUILD_TYPE: Debug
124
- PYTHON_VERSION: '3.8'
124
+ PYTHON_VERSION: '3.13'
125
125
  WITH_NUMPY: no
126
126
  OS: macos-13
127
127
  CC: gcc
128
128
 
129
129
  - BUILD_TYPE: Release
130
- PYTHON_VERSION: '3.8'
130
+ PYTHON_VERSION: '3.13'
131
131
  OS: macos-13
132
132
  CC: gcc
133
133
 
@@ -21,3 +21,5 @@ Abhinav Agarwal <abhinavagarwal1996@gmail.com>
21
21
  Nilay Pochhi <pochhi.nilay@gmail.com>
22
22
  Björn Dahlgren <bjodah@gmail.com>
23
23
  Richard Otis <richard.otis@outlook.com> richardotis
24
+ Firat Bezir <bezir.1@osu.edu>
25
+ Adrian Ostrowski <adrian.ostrowski@intel.com> <81568391+aostrowski-hbn@users.noreply.github.com>
@@ -36,3 +36,6 @@ Pieter Eendebak <pieter.eendebak@gmail.com>
36
36
  Ayush Kumar <ayushk7102@gmail.com>
37
37
  Christian Clauss <cclauss@me.com>
38
38
  Moraxyc <i@qaq.li>
39
+ Aaron Miller <78561124+aaron-skydio@users.noreply.github.com>
40
+ Firat Bezir <bezir.1@osu.edu>
41
+ Adrian Ostrowski <adrian.ostrowski@intel.com>
@@ -1,4 +1,4 @@
1
- cmake_minimum_required(VERSION 2.8.12)
1
+ cmake_minimum_required(VERSION 2.8.12...4.0.0)
2
2
 
3
3
  if (POLICY CMP0057)
4
4
  cmake_policy(SET CMP0057 NEW) # needed for llvm >= 16
@@ -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.8.1 REQUIRED CONFIG
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})
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: symengine
3
- Version: 0.13.0
3
+ Version: 0.14.1
4
4
  Summary: Python library providing wrappers to SymEngine
5
5
  Home-page: https://github.com/symengine/symengine.py
6
6
  Author: SymEngine development team
@@ -12,14 +12,22 @@ Classifier: Programming Language :: Python
12
12
  Classifier: Topic :: Scientific/Engineering
13
13
  Classifier: Topic :: Scientific/Engineering :: Mathematics
14
14
  Classifier: Topic :: Scientific/Engineering :: Physics
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
- Requires-Python: >=3.8,<4
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: >=3.9,<4
21
21
  License-File: LICENSE
22
22
  License-File: AUTHORS
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: home-page
28
+ Dynamic: license
29
+ Dynamic: requires-python
30
+ Dynamic: summary
23
31
 
24
32
 
25
33
  SymEngine is a standalone fast C++ symbolic manipulation library.
@@ -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
+ [![Build Status](https://travis-ci.org/symengine/symengine.py.svg)](https://travis-ci.org/symengine/symengine.py)
7
+ [![Build status](https://ci.appveyor.com/api/projects/status/sl189l9ck3gd8qvk/branch/master?svg=true)](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
+
@@ -24,7 +24,7 @@ environment:
24
24
  - BUILD_TYPE: "Release"
25
25
  COMPILER: MSVC15
26
26
  PLATFORM: "x64"
27
- PYTHON_VERSION: 38-x64
27
+ PYTHON_VERSION: 312-x64
28
28
  CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
29
29
  - BUILD_TYPE: "Release"
30
30
  COMPILER: MSVC15
@@ -97,7 +97,7 @@ install:
97
97
 
98
98
  - set "PATH=C:\Python%PYTHON_VERSION%;C:\Python%PYTHON_VERSION%\Scripts;%PATH%"
99
99
  - echo %PATH%
100
- - pip install nose pytest cython
100
+ - pip install nose pytest cython setuptools
101
101
  - if NOT [%WITH_NUMPY%]==[no] pip install numpy
102
102
  - if NOT [%WITH_SYMPY%]==[no] pip install sympy
103
103
 
@@ -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 'cython>=0.29.24' pytest gmp mpfr"
5
+ export conda_pkgs="python=${PYTHON_VERSION} pip pytest setuptools 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
- COMMAND ${PYTHON_BIN} -c "import sys; print(sys.prefix)"
26
- OUTPUT_VARIABLE PYTHON_PREFIX_PATH
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
- COMMAND ${PYTHON_BIN} -c "import sys; print('%s.%s' % sys.version_info[:2])"
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
- COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['purelib'])"
54
- OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
55
- )
63
+ COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['platlib'])"
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)