Skip to content

Commit

Permalink
compare string versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgen-lentz committed Feb 6, 2025
1 parent 4e7bbf8 commit 4294777
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push]
env:
CIBW_ARCHS_LINUX: auto
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_BEFORE_BUILD: pip install cython setuptools packaging
CIBW_BEFORE_BUILD: pip install cython
CIBW_SKIP: pp* *_i686 *-win32 *musllinux*
CIBW_TEST_COMMAND: python -m amplpy.tests
# TODO:
Expand Down Expand Up @@ -34,7 +34,6 @@ jobs:
CIBW_ARCHS_MACOS: ${{ env.CIBW_ARCHS_MACOS }}
CIBW_BEFORE_BUILD: ${{ env.CIBW_BEFORE_BUILD }}
CIBW_SKIP: ${{ env.CIBW_SKIP }}
CIBW_BUILD_FRONTEND: ${{ env.CIBW_BUILD_FRONTEND }}
CIBW_TEST_COMMAND: ${{ env.CIBW_TEST_COMMAND }}
CIBW_TEST_REQUIRES: ${{ env.CIBW_TEST_REQUIRES }}

Expand Down Expand Up @@ -105,7 +104,6 @@ jobs:
CIBW_ARCHS_MACOS: ${{ env.CIBW_ARCHS_MACOS }}
CIBW_BUILD: ${{ matrix.build }}
CIBW_SKIP: ${{ env.CIBW_SKIP }}
CIBW_BUILD_FRONTEND: ${{ env.CIBW_BUILD_FRONTEND }}
CIBW_TEST_COMMAND: ${{ env.CIBW_TEST_COMMAND }}
CIBW_TEST_REQUIRES: --index-url https://pypi.ampl.com --extra-index-url https://pypi.org/simple ampl_module_base

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
* PyPI Repository: https://pypi.python.org/pypi/amplpy
'''
from setuptools import setup, Extension
from packaging.version import Version
from Cython.Build import cythonize
from Cython.Compiler.Version import version as cython_version
import platform
Expand Down Expand Up @@ -167,7 +166,7 @@ def link_args():

compiler_directives = {"language_level": "3", 'binding': True, "embedsignature": True,
"boundscheck": False, "wraparound": False}
if Version(cython_version) >= Version("3.1.0a0"):
if cython_version == "3.1.0a0":
compiler_directives["freethreading_compatible"] = True

setup(
Expand Down

0 comments on commit 4294777

Please sign in to comment.