From b27d5a75f54b4509ae9eadf4bb63b3b64d573532 Mon Sep 17 00:00:00 2001 From: WrathfulSpatula Date: Wed, 3 Jul 2024 10:07:04 -0400 Subject: [PATCH] Pure language! (v1.29.8) --- .github/workflows/build.yml | 28 ++++++---------------------- pyqrack/qrack_system/qrack_system.py | 9 ++++----- setup.py | 16 ++++++++++------ 3 files changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9dbaf22..39e6186 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,15 +25,10 @@ jobs: repository: 'unitaryfund/qrack' path: qrack - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install Python Dependencies run: | python -m pip install --upgrade pip - python -m pip install wheel setuptools + python -m pip install wheel setuptools python3 - name: Prepare Build Environment (Linux) run: | @@ -78,15 +73,10 @@ jobs: repository: 'unitaryfund/qrack' path: qrack - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install Python Dependencies run: | python -m pip install --upgrade pip - python -m pip install wheel setuptools + python -m pip install wheel setuptools python3 - name: Prepare Build Environment (Linux) run: | @@ -130,16 +120,10 @@ jobs: with: repository: 'unitaryfund/qrack' path: qrack - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install Python Dependencies run: | python -m pip install --upgrade pip - python -m pip install wheel setuptools + python -m pip install wheel setuptools python3 - name: Prepare Build Environment (Linux) run: | @@ -187,7 +171,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.10' - name: Install Python Dependencies run: | @@ -206,7 +190,7 @@ jobs: cd qrack mkdir build cd build - cmake -DCMAKE_CXX_FLAGS=-I\ /opt/homebrew/opt/opencl-clhpp-headers/include -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF -DENABLE_RDRAND=OFF -DENABLE_OPENCL=OFF -DENABLE_FIXED_POINT=ON -DQBCAPPOW=12 -DCPP_STD=14 .. + cmake -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF -DENABLE_RDRAND=OFF -DENABLE_OPENCL=OFF -DENABLE_FIXED_POINT=ON -DQBCAPPOW=12 -DCPP_STD=14 .. make qrack_pinvoke qrack_cl_precompile - name: Build Wheel @@ -243,7 +227,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.10' - name: Install Python Dependencies run: | diff --git a/pyqrack/qrack_system/qrack_system.py b/pyqrack/qrack_system/qrack_system.py index 1bad4e2..cf37807 100644 --- a/pyqrack/qrack_system/qrack_system.py +++ b/pyqrack/qrack_system/qrack_system.py @@ -16,22 +16,21 @@ # found in the LICENSE file or at https://opensource.org/licenses/MIT. import os -import pathlib from ctypes import * from sys import platform as _platform class QrackSystem: def __init__(self): - path = pathlib.Path(__file__).absolute().parent + path = "." if os.environ.get('PYQRACK_SHARED_LIB_PATH') != None: shared_lib_path = os.environ.get('PYQRACK_SHARED_LIB_PATH') elif _platform == "win32": - shared_lib_path = str(path / "qrack_lib/qrack_pinvoke.dll") + shared_lib_path = "qrack_lib/qrack_pinvoke.dll" elif _platform == "darwin": - shared_lib_path = str(path / "qrack_lib/libqrack_pinvoke.dylib") + shared_lib_path = "qrack_lib/libqrack_pinvoke.dylib" else: - shared_lib_path = str(path / "qrack_lib/libqrack_pinvoke.so") + shared_lib_path = "qrack_lib/libqrack_pinvoke.so" try: self.qrack_lib = CDLL(shared_lib_path) diff --git a/setup.py b/setup.py index d8b0a0b..7547ef3 100644 --- a/setup.py +++ b/setup.py @@ -4,18 +4,15 @@ from setuptools import setup -VERSION = "1.29.6" +VERSION = "1.29.8" # Read long description from README. README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md') with open(README_PATH) as readme_file: README = readme_file.read() -# This is technically a module included in the language standard by PEP, -# but some systems might opt not to implement any particular PEP. -requirements = [ - "pathlib" -] +# Pure language standard! +requirements = [] setup( name='pyqrack', @@ -36,12 +33,19 @@ "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: C++", + "Programming Language :: Python :: 3.0", + "Programming Language :: Python :: 3.1", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "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", "Topic :: Scientific/Engineering", ], keywords="pyqrack qrack simulator quantum gpu",