Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use git tag instead of sdist #8

Merged
merged 13 commits into from
Oct 6, 2019
4 changes: 4 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .ci_support/linux_python3.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
c_compiler:
- gcc
c_compiler_version:
- '7'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- condaforge/linux-anvil-comp7
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- '3.7'
4 changes: 2 additions & 2 deletions .ci_support/osx_python2.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ MACOSX_DEPLOYMENT_TARGET:
c_compiler:
- clang
c_compiler_version:
- '4'
- '9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '4'
- '9'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_python3.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ MACOSX_DEPLOYMENT_TARGET:
c_compiler:
- clang
c_compiler_version:
- '4'
- '9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '4'
- '9'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
Expand Down
24 changes: 24 additions & 0 deletions .ci_support/osx_python3.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
c_compiler:
- clang
c_compiler_version:
- '9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '9'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.9'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- '3.7'
18 changes: 18 additions & 0 deletions .ci_support/win_c_compilervs2015cxx_compilervs2015python3.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
c_compiler:
- vs2015
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- vs2015
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- '3.7'
zip_keys:
- - python
- c_compiler
- cxx_compiler
21 changes: 21 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions recipe/CMakeLists.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -206,8 +206,8 @@ set(COOLPROP_INCLUDE_DIRECTORIES ${APP_INCLUDE_DIRS} CACHE LIST "List of include
#######################################
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake/Modules/")

-set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 2.4)
-find_package (PythonInterp 2.7 REQUIRED)
+find_package (Python COMPONENTS Interpreter REQUIRED)
+set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
if(CMAKE_DL_LIBS)
find_package (${CMAKE_DL_LIBS} REQUIRED)
endif()
3 changes: 3 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd wrappers\Python
"%PYTHON%" setup.py install cmake=vc%VS_MAJOR%,%ARCH%
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
2 changes: 2 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd wrappers/Python
"$PYTHON" setup.py install cmake=default,$ARCH
46 changes: 38 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
{% set name = "CoolProp" %}

# WARNING external resources may need update as well
{% set version = "6.2.1" %}
{% set sha256 = "d5b85af023ffc93d3f85770dee571712f3858f72579e89a7d13b2f796d933732" %}
{% set sha256 = "e94a65e5bbf150e4010816160f66b2095dc70b598461bb1fa664bb5791922c93" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}
- url: https://github.com/CoolProp/{{ name }}/archive/v{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
- setup.patch
- CMakeLists.patch
# External dependencies
# See https://github.com/CoolProp/CoolProp/tree/master/externals
- url: https://github.com/catchorg/Catch2/archive/v1.12.2.tar.gz
sha256: 27bf01d20692e534a8963f96c6ca797df2b4ba6551db0379510c376558d75e3c
folder: externals/Catch
- url: https://github.com/eigenteam/eigen-git-mirror/archive/3.3.5.tar.gz
sha256: 992855522dfdd0dea74d903dcd082cdb01c1ae72be5145e2fe646a0892989e43
folder: externals/Eigen
- url: https://github.com/CoolProp/IF97/archive/7108b0394d9b1e19d3f5ce0b9aeab02d41391daf.zip
sha256: d761daa6570b6e6ae9cf01554b845d22ae9d3d58f12f658d3670ed3a28fa888b
folder: externals/IF97
- url: https://github.com/CoolProp/REFPROP-headers/archive/5fccb00f750c93644a1b32d631b020bebf073eff.zip
sha256: 83de4a949ffaf16257c12b2edf72f6fd62cb7babdfa4d578fe17e341c9712b94
folder: externals/REFPROP-headers
- url: https://github.com/fmtlib/fmt/archive/4.1.0.tar.gz
sha256: 46628a2f068d0e33c716be0ed9dcae4370242df135aed663a180b9fd8e36733d
folder: externals/fmtlib
- url: https://github.com/msgpack/msgpack-c/archive/cpp-3.0.1.tar.gz
sha256: 1b834ab0b5b41da1dbfb96dd4a673f6de7e79dbd7f212f45a553ff9cc54abf3b
folder: externals/msgpack-c
- url: https://github.com/pybind/pybind11/archive/v2.2.3.tar.gz
sha256: 3a3b7b651afab1c5ba557f4c37d785a522b8030dfc765da26adc2ecd1de940ea
folder: externals/pybind11
- url: https://github.com/Tencent/rapidjson/archive/73063f5002612c6bf64fe24f851cd5cc0d83eef9.zip
sha256: 013edcc40afd7a550899e443ac70bc16b6a36867393be50f1def35674e2be08c
folder: externals/rapidjson

build:
number: 1001
script: "python -m pip install --no-deps --ignore-installed ."
skip: true # [py<34 or py>36]
number: 1002

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
host:
- python
- pip
- cython
- setuptools
run:
- python
- numpy
Expand All @@ -32,7 +62,7 @@ test:
imports:
- CoolProp
- CoolProp.tests
- CoolProp.Plots
- CoolProp.Plots # [not py2k or not linux]
- CoolProp.GUI

about:
Expand Down
45 changes: 45 additions & 0 deletions recipe/setup.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/wrappers/Python/setup.py b/wrappers/Python/setup.py
--- a/wrappers/Python/setup.py
+++ b/wrappers/Python/setup.py
@@ -48,14 +48,6 @@ if __name__=='__main__':

# Trying to change the standard library for C++
import platform
- try:
- macVersion = platform.mac_ver()[0].split('.')
- if int(macVersion[0]) >= 10 and int(macVersion[1]) > 8:
- os.environ["CC"] = "gcc"
- os.environ["CXX"] = "g++"
- print('switching compiler to g++ for OSX')
- except:
- pass

# ******************************
# CMAKE OPTIONS
@@ -110,7 +110,7 @@ if __name__=='__main__':
if cmake_bitness == '32':
cmake_config_args += ['-G','"Visual Studio 9 2008"']
elif cmake_bitness == '64':
- cmake_config_args += ['-G','"Visual Studio 9 2008 Win64"']
+ cmake_config_args += ['-G','"NMake Makefiles"']
else:
raise ValueError('cmake_bitness must be either 32 or 64; got ' + cmake_bitness)
elif cmake_compiler == 'vc10':
@@ -126,7 +126,7 @@ if __name__=='__main__':
if cmake_bitness == '32':
cmake_config_args += ['-G','"Visual Studio 14 2015"']
elif cmake_bitness == '64':
- cmake_config_args += ['-G','"Visual Studio 14 2015 Win64"']
+ cmake_config_args += ['-G','"NMake Makefiles"']
else:
raise ValueError('cmake_bitness must be either 32 or 64; got ' + cmake_bitness)
elif cmake_compiler == 'mingw':
@@ -169,7 +169,7 @@ if __name__=='__main__':

# Now find the static library that we just built
static_libs = []
- for search_suffix in ['Release/*.lib','Release/*.a', 'Debug/*.lib', 'Debug/*.a','*.a']:
+ for search_suffix in ['Release/*.lib','Release/*.a', 'Debug/*.lib', 'Debug/*.a', '*.a', '*.lib']:
static_libs += glob.glob(os.path.join(cmake_build_dir,search_suffix))

if len(static_libs) != 1: