Skip to content

Commit

Permalink
Target Python 3.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
aclark-aquaveo authored and Tsubashi committed Feb 8, 2022
1 parent 7afe187 commit b10a4ae
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 49 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/XmsMesher-CI.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: XmsMesher-4.0
name: XmsMesher-5.0

on: [push, pull_request]

Expand All @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
platform: [macos-10.15]
python-version: [3.6]
python-version: ['3.10']

steps:
# Checkout Sources
Expand Down Expand Up @@ -48,15 +48,15 @@ jobs:
fail-fast: false
matrix:
platform: [macos-10.15]
python-version: [3.6]
python-version: ['3.10']
build_type: [Release, Debug]

env:
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 4.0.0
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/4.0.0
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
Expand Down Expand Up @@ -166,16 +166,16 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-18.04]
python-version: [3.6]
python-version: ['3.10']
compiler-version: [6, 7]
build_type: [Release, Debug]

env:
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 4.0.0
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/4.0.0
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
Expand Down Expand Up @@ -293,17 +293,17 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
python-version: [3.6.8]
platform: [windows-2019]
python-version: ['3.10']
compiler-version: [16]
build_type: [Release, Debug]

env:
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 4.0.0
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/4.0.0
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project(xmsmesherlib C CXX)

set(BUILD_TESTING NO CACHE BOOL "Enable/Disable testing")
set(IS_CONDA_BUILD NO CACHE BOOL "Set this if you want to make a conda package.")
set(PYTHON_TARGET_VERSION 3.6 CACHE STRING "Version of python to link to for python wrapping.")
set(PYTHON_TARGET_VERSION 3.10 CACHE STRING "Version of python to link to for python wrapping.")
set(CONDA_PREFIX "" CACHE PATH "Path to the conda environment used to build.")
set(IS_PYTHON_BUILD NO CACHE BOOL "Set this if you want to build the python bindings.")
set(XMS_TEST_PATH ${PROJECT_SOURCE_DIR}/test_files/ CACHE PATH "Path to test files for testing")
Expand Down Expand Up @@ -61,8 +61,8 @@ if(IS_PYTHON_BUILD)
include("${CONDA_PREFIX}/share/cmake/pybind11/pybind11Config.cmake")
include("${CONDA_PREFIX}/share/cmake/pybind11/pybind11ConfigVersion.cmake")
include("${CONDA_PREFIX}/share/cmake/pybind11/pybind11Tools.cmake")

else()
list(APPEND CMAKE_MODULE_PATH "${CONAN_PYBIND11_ROOT}/share/cmake/pybind11")
include("${CONAN_PYBIND11_ROOT}/share/cmake/pybind11/pybind11Targets.cmake")
include("${CONAN_PYBIND11_ROOT}/share/cmake/pybind11/FindPythonLibsNew.cmake")
include("${CONAN_PYBIND11_ROOT}/share/cmake/pybind11/pybind11Config.cmake")
Expand Down
8 changes: 4 additions & 4 deletions _package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

requires = [
'numpy',
'xmscore>=4.0.2',
'xmsgrid>=5.0.5',
'xmsinterp>=4.0.1',
'xmscore>=6.0.0',
'xmsgrid>=7.0.0',
'xmsinterp>=6.0.0',
]

version = __version__

setup(
python_requires='>=3.6',
python_requires='>=3.10',
name='xmsmesher',
version=version,
packages=['xms.mesher', 'xms.mesher.meshing', 'xms.mesher.api'],
Expand Down
2 changes: 1 addition & 1 deletion _package/xms/mesher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from . import meshing # NOQA: F401
from .api.mesh import generate_mesh # NOQA: F401

__version__ = '4.0.0'
__version__ = '5.0.0'
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Add environment variables to build definitions
XMS_VERSION = os.environ.get('XMS_VERSION', None)
python_target_version = os.environ.get('PYTHON_TARGET_VERSION', "3.6")
python_target_version = os.environ.get('PYTHON_TARGET_VERSION', "3.10")
release_python = os.environ.get('RELEASE_PYTHON', 'False')
aquapi_username = os.environ.get('AQUAPI_USERNAME', None)
aquapi_password = os.environ.get('AQUAPI_PASSWORD', None)
Expand Down
12 changes: 6 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def configure(self):

self.options['xmsgrid'].pybind = self.options.pybind
self.options['xmsgrid'].testing = self.options.testing

if s_compiler == 'Visual Studio':
self.options['xmscore'].wchar_t = self.options.wchar_t
self.options['xmsinterp'].wchar_t = self.options.wchar_t
Expand All @@ -70,11 +70,11 @@ def requirements(self):

# Pybind if not clang
if not self.settings.compiler == "clang" and self.options.pybind:
self.requires("pybind11/2.5.0@aquaveo/testing")
self.requires("pybind11/2.9.1@aquaveo/stable")

self.requires("xmscore/5.0.1@aquaveo/stable")
self.requires("xmsgrid/6.0.0@aquaveo/stable")
self.requires("xmsinterp/5.0.0@aquaveo/stable")
self.requires("xmscore/6.0.0@aquaveo/stable")
self.requires("xmsgrid/7.0.0@aquaveo/stable")
self.requires("xmsinterp/6.0.0@aquaveo/stable")

def build(self):
cmake = CMake(self)
Expand All @@ -87,7 +87,7 @@ def build(self):
cmake.definitions["IS_PYTHON_BUILD"] = self.options.pybind
cmake.definitions["BUILD_TESTING"] = self.options.testing
cmake.definitions["XMS_TEST_PATH"] = "test_files"
cmake.definitions["PYTHON_TARGET_VERSION"] = self.env.get("PYTHON_TARGET_VERSION", "3.6")
cmake.definitions["PYTHON_TARGET_VERSION"] = self.env.get("PYTHON_TARGET_VERSION", "3.10")
if self.settings.compiler == 'Visual Studio':
cmake.definitions["USE_NATIVE_WCHAR_T"] = (self.options.wchar_t == 'builtin')
cmake.configure(source_folder=".")
Expand Down
46 changes: 23 additions & 23 deletions examples/xms.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#xms.yml
# Configuration file for creating a Conda environment with dependencies needed for the xms libraries.
# Create the environment by running the following command (after installing Miniconda):
# $ conda env create -f xms.yml

name: xms

channels:
- Aquaveo
- pyviz/label/dev
- defaults
- conda-forge
dependencies:
- python=3.6.*
- xmscore
- xmsinterp
- xmsgrid
- xmsmesher
- xmsextractor
- xmsstamper
- xmsgridtrace
- pyviz
#xms.yml
# Configuration file for creating a Conda environment with dependencies needed for the xms libraries.
# Create the environment by running the following command (after installing Miniconda):
# $ conda env create -f xms.yml

name: xms

channels:
- Aquaveo
- pyviz/label/dev
- defaults
- conda-forge

dependencies:
- python=3.10.*
- xmscore
- xmsinterp
- xmsgrid
- xmsmesher
- xmsextractor
- xmsstamper
- xmsgridtrace
- pyviz

0 comments on commit b10a4ae

Please sign in to comment.