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.
Files changed (112) hide show
  1. {symengine-0.13.0 → symengine-0.14.0}/.mailmap +1 -0
  2. {symengine-0.13.0 → symengine-0.14.0}/AUTHORS +2 -0
  3. {symengine-0.13.0 → symengine-0.14.0}/CMakeLists.txt +1 -1
  4. {symengine-0.13.0/symengine.egg-info → symengine-0.14.0}/PKG-INFO +1 -1
  5. symengine-0.14.0/README.md +118 -0
  6. {symengine-0.13.0 → symengine-0.14.0}/bin/install_travis.sh +2 -2
  7. {symengine-0.13.0 → symengine-0.14.0}/cmake/FindPython.cmake +24 -10
  8. symengine-0.14.0/cmake/cython_test.cpp +4195 -0
  9. {symengine-0.13.0 → symengine-0.14.0}/cmake/cython_test.pyx +2 -5
  10. {symengine-0.13.0 → symengine-0.14.0}/setup.py +1 -1
  11. symengine-0.14.0/symengine/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  12. {symengine-0.13.0 → symengine-0.14.0}/symengine/__init__.py +1 -1
  13. symengine-0.14.0/symengine/cmake_install.cmake +50 -0
  14. symengine-0.14.0/symengine/lib/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  15. symengine-0.14.0/symengine/lib/CMakeFiles/symengine_wrapper.dir/DependInfo.cmake +20 -0
  16. symengine-0.14.0/symengine/lib/CMakeFiles/symengine_wrapper.dir/cmake_clean.cmake +16 -0
  17. symengine-0.14.0/symengine/lib/cmake_install.cmake +87 -0
  18. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/pywrapper.cpp +4 -4
  19. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine.pxd +152 -152
  20. symengine-0.14.0/symengine/lib/symengine_wrapper.cpp +236987 -0
  21. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pyx +4 -4
  22. symengine-0.14.0/symengine/lib/symengine_wrapper.pxd +64 -0
  23. symengine-0.14.0/symengine/lib/symengine_wrapper.pyx +5503 -0
  24. {symengine-0.13.0 → symengine-0.14.0/symengine.egg-info}/PKG-INFO +1 -1
  25. {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/SOURCES.txt +10 -0
  26. symengine-0.14.0/symengine_version.txt +1 -0
  27. symengine-0.13.0/README.md +0 -81
  28. symengine-0.13.0/symengine_version.txt +0 -1
  29. {symengine-0.13.0 → symengine-0.14.0}/.github/workflows/ci.yml +0 -0
  30. {symengine-0.13.0 → symengine-0.14.0}/.gitignore +0 -0
  31. {symengine-0.13.0 → symengine-0.14.0}/LICENSE +0 -0
  32. {symengine-0.13.0 → symengine-0.14.0}/MANIFEST.in +0 -0
  33. {symengine-0.13.0 → symengine-0.14.0}/appveyor.yml +0 -0
  34. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/6_links_rhs.txt +0 -0
  35. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/Lambdify.py +0 -0
  36. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/Lambdify_reference.pyx +0 -0
  37. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand1.py +0 -0
  38. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand1_sage.py +0 -0
  39. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2.py +0 -0
  40. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2_sage.py +0 -0
  41. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2b_sage.sage +0 -0
  42. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand2b_sympy.py +0 -0
  43. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand3.py +0 -0
  44. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand3_sage.py +0 -0
  45. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand4.py +0 -0
  46. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand4_sage.py +0 -0
  47. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand5.py +0 -0
  48. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand5_sage.py +0 -0
  49. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand6.py +0 -0
  50. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand6b.py +0 -0
  51. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expand7.py +0 -0
  52. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/expr.txt +0 -0
  53. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/heterogeneous_output_Lambdify.py +0 -0
  54. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/kane.py +0 -0
  55. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/kane_generate.py +0 -0
  56. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/legendre1.py +0 -0
  57. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/legendre1_sage.py +0 -0
  58. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/pydy_pendulum.py +0 -0
  59. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench.py +0 -0
  60. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench_def.py +0 -0
  61. {symengine-0.13.0 → symengine-0.14.0}/benchmarks/symbench_sage.py +0 -0
  62. {symengine-0.13.0 → symengine-0.14.0}/bin/test_python.py +0 -0
  63. {symengine-0.13.0 → symengine-0.14.0}/bin/test_symengine_unix.sh +0 -0
  64. {symengine-0.13.0 → symengine-0.14.0}/bin/test_travis.sh +0 -0
  65. {symengine-0.13.0 → symengine-0.14.0}/bin/trigger_feedstock.sh +0 -0
  66. {symengine-0.13.0 → symengine-0.14.0}/cmake/FindCython.cmake +0 -0
  67. {symengine-0.13.0 → symengine-0.14.0}/cmake/FindNumPy.cmake +0 -0
  68. {symengine-0.13.0 → symengine-0.14.0}/cmake/check_python_hypot.cpp +0 -0
  69. {symengine-0.13.0 → symengine-0.14.0}/cmake/get_suffix.py +0 -0
  70. {symengine-0.13.0 → symengine-0.14.0}/cmake/preprocess.py +0 -0
  71. {symengine-0.13.0 → symengine-0.14.0}/cmake/version_script.txt +0 -0
  72. {symengine-0.13.0 → symengine-0.14.0}/docs/conf.py +0 -0
  73. {symengine-0.13.0 → symengine-0.14.0}/docs/index.rst +0 -0
  74. {symengine-0.13.0 → symengine-0.14.0}/setup.cfg +0 -0
  75. {symengine-0.13.0 → symengine-0.14.0}/symengine/CMakeLists.txt +0 -0
  76. {symengine-0.13.0 → symengine-0.14.0}/symengine/functions.py +0 -0
  77. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/CMakeLists.txt +0 -0
  78. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/__init__.py +0 -0
  79. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/pywrapper.h +0 -0
  80. {symengine-0.13.0 → symengine-0.14.0}/symengine/lib/symengine_wrapper.in.pxd +0 -0
  81. {symengine-0.13.0 → symengine-0.14.0}/symengine/printing.py +0 -0
  82. {symengine-0.13.0 → symengine-0.14.0}/symengine/sympy_compat.py +0 -0
  83. {symengine-0.13.0 → symengine-0.14.0}/symengine/test_utilities.py +0 -0
  84. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/CMakeLists.txt +0 -0
  85. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/__init__.py +0 -0
  86. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_arit.py +0 -0
  87. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_cse.py +0 -0
  88. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_dict_basic.py +0 -0
  89. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_eval.py +0 -0
  90. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_expr.py +0 -0
  91. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_functions.py +0 -0
  92. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_lambdify.py +0 -0
  93. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_logic.py +0 -0
  94. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_matrices.py +0 -0
  95. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_ntheory.py +0 -0
  96. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_number.py +0 -0
  97. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_pickling.py +0 -0
  98. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_printing.py +0 -0
  99. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sage.py +0 -0
  100. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_series_expansion.py +0 -0
  101. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sets.py +0 -0
  102. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_solve.py +0 -0
  103. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_subs.py +0 -0
  104. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_symbol.py +0 -0
  105. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympify.py +0 -0
  106. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympy_compat.py +0 -0
  107. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_sympy_conv.py +0 -0
  108. {symengine-0.13.0 → symengine-0.14.0}/symengine/tests/test_var.py +0 -0
  109. {symengine-0.13.0 → symengine-0.14.0}/symengine/utilities.py +0 -0
  110. {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/dependency_links.txt +0 -0
  111. {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/not-zip-safe +0 -0
  112. {symengine-0.13.0 → symengine-0.14.0}/symengine.egg-info/top_level.txt +0 -0
@@ -21,3 +21,4 @@ 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>
@@ -36,3 +36,5 @@ 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>
@@ -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
1
  Metadata-Version: 2.1
2
2
  Name: symengine
3
- Version: 0.13.0
3
+ Version: 0.14.0
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
@@ -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
+
@@ -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 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
@@ -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
- OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
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)