From 701366408a8fa4f220fe77516d0eb39bdf4049fc Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 2 Oct 2023 17:32:36 -0500 Subject: [PATCH 1/9] Require python>=3.8 and bump version to 0.11 --- setup.py | 11 ++++++----- symengine/__init__.py | 4 ++-- symengine_version.txt | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 88f2d1c7..1c5e9207 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ import platform # Make sure the system has the right Python version. -if sys.version_info[:2] < (3, 7): - print("SymEngine requires Python 3.7 or newer. " +if sys.version_info[:2] < (3, 8): + print("SymEngine requires Python 3.8 or newer. " "Python %d.%d detected" % sys.version_info[:2]) sys.exit(-1) @@ -222,7 +222,7 @@ def finalize_options(self): ''' setup(name="symengine", - version="0.10.0", + version="0.11.0", description="Python library providing wrappers to SymEngine", setup_requires=['cython>=0.29.24'], long_description=long_description, @@ -230,7 +230,7 @@ def finalize_options(self): author_email="symengine@googlegroups.com", license="MIT", url="https://github.com/symengine/symengine.py", - python_requires='>=3.7,<4', + python_requires='>=3.8,<4', zip_safe=False, packages=['symengine', 'symengine.lib', 'symengine.tests'], cmdclass = cmdclass, @@ -241,9 +241,10 @@ def finalize_options(self): 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Scientific/Engineering :: Physics', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ] ) diff --git a/symengine/__init__.py b/symengine/__init__.py index fa72ded4..b6002a28 100644 --- a/symengine/__init__.py +++ b/symengine/__init__.py @@ -1,7 +1,7 @@ import os import sys -if sys.version_info >= (3, 8, 0) and sys.platform == 'win32' \ +if sys.platform == 'win32' \ and 'SYMENGINE_PY_ADD_PATH_TO_SEARCH_DIRS' in os.environ: for directory in os.environ['PATH'].split(';'): if os.path.isdir(directory): @@ -63,7 +63,7 @@ def __getattr__(name): raise AttributeError(f"module 'symengine' has no attribute '{name}'") -__version__ = "0.10.0" +__version__ = "0.11.0" # To not expose internals diff --git a/symengine_version.txt b/symengine_version.txt index c91125db..4f7638fd 100644 --- a/symengine_version.txt +++ b/symengine_version.txt @@ -1 +1 @@ -v0.10.1 +v0.11.1 From 2a3f762bf1c9e5e5e92efbbb1a824c8f3e29e915 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 2 Oct 2023 18:17:17 -0500 Subject: [PATCH 2/9] update appveyor --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 30da13f3..cb17323e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,14 +24,14 @@ environment: CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 - BUILD_TYPE: "Debug" COMPILER: MinGW-w64 - PYTHON_VERSION: 37-x64 + PYTHON_VERSION: 39-x64 WITH_NUMPY: no - BUILD_TYPE: "Release" COMPILER: MinGW-w64 - PYTHON_VERSION: 37-x64 + PYTHON_VERSION: 39-x64 - BUILD_TYPE: "Debug" COMPILER: MinGW-w64 - PYTHON_VERSION: 37-x64 + PYTHON_VERSION: 39-x64 WITH_SYMPY: no - BUILD_TYPE: "Release" COMPILER: MSVC15 From 2bdf33ff9c8b546ce883dcb944a771ad72f9494b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 2 Oct 2023 18:50:24 -0500 Subject: [PATCH 3/9] Fix GHA yaml --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 324d6ad2..6993dd9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,13 +37,13 @@ jobs: CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.7' + PYTHON_VERSION: '3.8' BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.7' + PYTHON_VERSION: '3.8' WITH_MPFR: yes INTEGER_CLASS: gmpxx WITH_NUMPY: no @@ -91,7 +91,7 @@ jobs: CC: clang - BUILD_TYPE: Release - PYTHON_VERSION: '3.7' + PYTHON_VERSION: '3.8' WITH_NUMPY: yes OS: ubuntu-20.04 CC: clang @@ -108,7 +108,7 @@ jobs: EXTRA_APT_PACKAGES: 'llvm-14' - BUILD_TYPE: Debug - PYTHON_VERSION: '3.7' + PYTHON_VERSION: '3.8' WITH_SCIPY: yes WITH_LLVM: 5.0 OS: macos-latest @@ -121,7 +121,7 @@ jobs: CC: clang - BUILD_TYPE: Debug - PYTHON_VERSION: '3.7' + PYTHON_VERSION: '3.8' WITH_NUMPY: no OS: macos-latest CC: gcc @@ -183,6 +183,7 @@ jobs: WITH_MPC: ${{ matrix.WITH_MPC }} MAKEFLAGS: ${{ matrix.MAKEFLAGS }} BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - name: Deploy Documentation if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}} From 7e7b9df9d11b326fc450c7faf7097905c39967fe Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 7 Oct 2023 04:01:56 -0500 Subject: [PATCH 4/9] Fix appveyor tests --- appveyor.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index cb17323e..69467fd4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,6 @@ version: '{build}' -# Uncomment this to enable the fast build environment if your account does not -# support it automatically: -#os: Visual Studio 2015 RC +image: Visual Studio 2019 environment: global: @@ -16,7 +14,6 @@ environment: CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 WITH_MPFR: yes WITH_MPC: yes - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - BUILD_TYPE: "Release" COMPILER: MSVC15 PLATFORM: "x64" @@ -45,7 +42,6 @@ environment: PLATFORM: "x64" PYTHON_VERSION: 310-x64 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 WITH_MPFR: yes WITH_MPC: yes WITH_LLVM: yes @@ -103,15 +99,16 @@ install: - if [%COMPILER%]==[MinGW] set "CMAKE_GENERATOR=MinGW Makefiles" - if [%COMPILER%]==[MinGW-w64] set "CMAKE_GENERATOR=MinGW Makefiles" -- if [%COMPILER%]==[MSVC15] cmake -DCMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library .. -- if [%COMPILER%]==[MinGW] cmake -DCMAKE_PREFIX_PATH=C:\MinGW -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. -- if [%COMPILER%]==[MinGW-w64] cmake -DCMAKE_PREFIX_PATH=C:\mingw64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. +- if [%COMPILER%]==[MSVC15] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=%CONDA_PREFIX%\\Library" +- if [%COMPILER%]==[MinGW] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=C:\MinGW -DCMAKE_BUILD_TYPE=%BUILD_TYPE%" +- if [%COMPILER%]==[MinGW-w64] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=C:\mingw64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%" -- if [%WITH_MPFR%]==[yes] cmake -DWITH_MPFR=yes .. -- if [%WITH_MPC%]==[yes] cmake -DWITH_MPC=yes .. -- if [%WITH_LLVM%]==[yes] cmake -DWITH_LLVM=yes -DMSVC_USE_MT=no .. +- if [%WITH_MPFR%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_MPFR=yes" +- if [%WITH_MPC%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_MPC=yes" +- if [%WITH_LLVM%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_LLVM=yes -DMSVC_USE_MT=no" -- cmake -DBUILD_SHARED_LIBS=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no -DCMAKE_INSTALL_PREFIX=C:\symengine .. +- echo "CMAKE_ARGS: %CMAKE_ARGS%" +- cmake %CMAKE_ARGS% -DBUILD_SHARED_LIBS=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no -DCMAKE_INSTALL_PREFIX=C:\symengine .. - cmake --build . --config %BUILD_TYPE% --target install - cd ../../ From 557c231a9c8bcc13ef0aae0ee34195f09b693d59 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 7 Oct 2023 04:02:53 -0500 Subject: [PATCH 5/9] Fix syntax --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 69467fd4..3c5b227b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: '{build}' -image: Visual Studio 2019 +image: "Visual Studio 2019" environment: global: From 26aeb30336f3538ed0ee7be8dd0177efb03561e0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 7 Oct 2023 04:04:04 -0500 Subject: [PATCH 6/9] Try to fix yaml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3c5b227b..40fd5ab3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -107,7 +107,7 @@ install: - if [%WITH_MPC%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_MPC=yes" - if [%WITH_LLVM%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_LLVM=yes -DMSVC_USE_MT=no" -- echo "CMAKE_ARGS: %CMAKE_ARGS%" +- echo "CMAKE_ARGS=%CMAKE_ARGS%" - cmake %CMAKE_ARGS% -DBUILD_SHARED_LIBS=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no -DCMAKE_INSTALL_PREFIX=C:\symengine .. - cmake --build . --config %BUILD_TYPE% --target install From 696676efb221948960e68e23f359d91edb4510a6 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 30 Oct 2023 21:01:23 -0500 Subject: [PATCH 7/9] Update for new requirements --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 40fd5ab3..0966b24a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,7 +33,7 @@ environment: - BUILD_TYPE: "Release" COMPILER: MSVC15 PLATFORM: "Win32" - PYTHON_VERSION: 37 + PYTHON_VERSION: 39 CONDA_INSTALL_LOCN: C:\\Miniconda36 WITH_MPFR: yes WITH_MPC: yes @@ -61,7 +61,7 @@ install: - if [%COMPILER%]==[MSVC15] echo %PATH% - if [%COMPILER%]==[MSVC15] if [%WITH_MPFR%]==[yes] conda install --yes mpfr=3.1.5 - if [%COMPILER%]==[MSVC15] if [%WITH_MPC%]==[yes] conda install --yes mpc=1.0.3 -- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] conda install --yes llvmdev=3.9 +- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] conda install --yes llvmdev=4.0 - if [%COMPILER%]==[MinGW] set "PATH=C:\MinGW\bin;%PATH%" - if [%COMPILER%]==[MinGW] mingw-get update From ea09366f72de6397e9c66db10f5dd0373202b7c8 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 30 Oct 2023 21:17:05 -0500 Subject: [PATCH 8/9] Install cython with wheels --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0966b24a..bde013d2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -83,8 +83,7 @@ install: - set "PATH=C:\Python%PYTHON_VERSION%;C:\Python%PYTHON_VERSION%\Scripts;%PATH%" - echo %PATH% -- pip install nose pytest -- pip install --install-option="--no-cython-compile" cython +- pip install nose pytest cython - if NOT [%WITH_NUMPY%]==[no] pip install numpy - if NOT [%WITH_SYMPY%]==[no] pip install sympy From 946e6612194cd0d2f7883e080061afe994c6d6ec Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 31 Oct 2023 07:41:11 -0500 Subject: [PATCH 9/9] Disable MinGW-w64 builds for now This was using MSVC built python with a non-UCRT based MinGW-w64 and it was a hack anyway. To get it properly working we probably need a MinGW-w64 based python or a UCRT based MinGW-w64. --- appveyor.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bde013d2..05e6b6eb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,17 +19,29 @@ environment: PLATFORM: "x64" PYTHON_VERSION: 38-x64 CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 - - BUILD_TYPE: "Debug" - COMPILER: MinGW-w64 - PYTHON_VERSION: 39-x64 - WITH_NUMPY: no - BUILD_TYPE: "Release" - COMPILER: MinGW-w64 - PYTHON_VERSION: 39-x64 - - BUILD_TYPE: "Debug" - COMPILER: MinGW-w64 + COMPILER: MSVC15 + PLATFORM: "x64" PYTHON_VERSION: 39-x64 WITH_SYMPY: no + CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 + - BUILD_TYPE: "Release" + COMPILER: MSVC15 + PLATFORM: "x64" + PYTHON_VERSION: 311-x64 + WITH_NUMPY: no + CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 + #- BUILD_TYPE: "Debug" + # COMPILER: MinGW-w64 + # PYTHON_VERSION: 39-x64 + # WITH_NUMPY: no + #- BUILD_TYPE: "Release" + # COMPILER: MinGW-w64 + # PYTHON_VERSION: 39-x64 + #- BUILD_TYPE: "Debug" + # COMPILER: MinGW-w64 + # PYTHON_VERSION: 39-x64 + # WITH_SYMPY: no - BUILD_TYPE: "Release" COMPILER: MSVC15 PLATFORM: "Win32"