Skip to content

Commit d6bb7df

Browse files
authored
Merge pull request #93 from isuruf/isuruf-patch-2
Fix version mismatch of gcc and libstdc++ in appveyor
2 parents e0089ee + 5666148 commit d6bb7df

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
22
project(python_wrapper)
33

44
set(CMAKE_PREFIX_PATH ${SymEngine_DIR} ${CMAKE_PREFIX_PATH})
5-
find_package(SymEngine 0.1.0 REQUIRED CONFIG
5+
find_package(SymEngine 0.2.0 REQUIRED CONFIG
66
PATH_SUFFIXES lib/cmake/symengine cmake/symengine CMake/)
77
message("SymEngine_DIR : " ${SymEngine_DIR})
88
set(CMAKE_BUILD_TYPE ${SYMENGINE_BUILD_TYPE})

appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ environment:
1616
- BUILD_TYPE: "Release"
1717
COMPILER: MSVC15
1818
PLATFORM: "x64"
19-
PYTHON_VERSION: 27-x64
19+
PYTHON_VERSION: 35-x64
2020
- BUILD_TYPE: "Debug"
2121
COMPILER: MinGW
2222
PYTHON_VERSION: 27
2323
- BUILD_TYPE: "Release"
2424
COMPILER: MinGW
25-
PYTHON_VERSION: 34
25+
PYTHON_VERSION: 35
2626
- BUILD_TYPE: "Release"
2727
COMPILER: MinGW-w64
2828
PYTHON_VERSION: 27-x64
2929
- BUILD_TYPE: "Debug"
3030
COMPILER: MinGW-w64
31-
PYTHON_VERSION: 27-x64
31+
PYTHON_VERSION: 35-x64
3232

3333
install:
3434
- set PYTHON_SOURCE_DIR=%CD%
@@ -44,6 +44,8 @@ install:
4444

4545
- if [%COMPILER%]==[MinGW] set PATH=C:\MinGW\bin;%PATH%
4646
- if [%COMPILER%]==[MinGW] mingw-get update
47+
# workaround for https://github.com/appveyor/ci/issues/996
48+
- if [%COMPILER%]==[MinGW] mingw-get upgrade mingw32-libstdc++
4749
- if [%COMPILER%]==[MinGW] mingw-get install mingw32-gmp
4850

4951
- if [%COMPILER%]==[MinGW-w64] set PATH=C:\mingw64\bin;%PATH%
@@ -88,7 +90,7 @@ build_script:
8890
test_script:
8991
- if not [%COMPILER%]==[MSVC15] nosetests
9092
- mkdir empty && cd empty
91-
- python %PYTHON_SOURCE_DIR%\bin\test_python.py
93+
- if [%COMPILER%]==[MinGW] if [%BUILD_TYPE%]==[RELEASE] python %PYTHON_SOURCE_DIR%\bin\test_python.py
9294

9395
# Enable this to be able to login to the build worker. You can use the
9496
# `remmina` program in Ubuntu, use the login information that the line below

symengine/lib/pywrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PyNumber::PyNumber(PyObject* pyobject, const RCP<const PyModule> &pymodule) :
2727
pyobject_(pyobject), pymodule_(pymodule) {
2828
}
2929

30-
std::size_t PyNumber::__hash__() const {
30+
hash_t PyNumber::__hash__() const {
3131
return PyObject_Hash(pyobject_);
3232
}
3333

@@ -210,7 +210,7 @@ int PyFunctionClass::compare(const PyFunctionClass &x) const {
210210
return PyObject_RichCompareBool(pyobject_, x.pyobject_, Py_LT) == 1 ? 1 : -1;
211211
}
212212

213-
std::size_t PyFunctionClass::hash() const {
213+
hash_t PyFunctionClass::hash() const {
214214
if (hash_ == 0)
215215
hash_ = PyObject_Hash(pyobject_);
216216
return hash_;
@@ -250,7 +250,7 @@ RCP<const Basic> PyFunction::diff_impl(const RCP<const Symbol> &s) const {
250250
return pyfunction_class_->get_py_module()->diff_(pyobject_, s);
251251
}
252252

253-
std::size_t PyFunction::__hash__() const {
253+
hash_t PyFunction::__hash__() const {
254254
return PyObject_Hash(pyobject_);
255255
}
256256

symengine/lib/symengine/pywrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class PyNumber : public NumberWrapper {
102102
virtual std::string __str__() const;
103103
virtual int compare(const Basic &o) const;
104104
virtual bool __eq__(const Basic &o) const;
105-
virtual std::size_t __hash__() const;
105+
virtual hash_t __hash__() const;
106106
};
107107

108108
/*! Class to represent the parent class for a PyFunction. Stores
@@ -117,7 +117,7 @@ class PyFunctionClass : public EnableRCPFromThis<PyFunctionClass> {
117117
//! Name of the function
118118
std::string name_;
119119
//! Hash of the python function
120-
mutable size_t hash_;
120+
mutable hash_t hash_;
121121
//! PyModule that this python function belongs to
122122
RCP<const PyModule> pymodule_;
123123
public:
@@ -129,7 +129,7 @@ class PyFunctionClass : public EnableRCPFromThis<PyFunctionClass> {
129129
PyObject* call(const vec_basic &vec) const;
130130
bool __eq__(const PyFunctionClass &x) const;
131131
int compare(const PyFunctionClass &x) const;
132-
std::size_t hash() const;
132+
hash_t hash() const;
133133
};
134134

135135
/*! Class to represent the parent class for a PyFunction. Stores
@@ -158,7 +158,7 @@ class PyFunction : public FunctionWrapper {
158158
virtual RCP<const Basic> diff_impl(const RCP<const Symbol> &x) const;
159159
virtual int compare(const Basic &o) const;
160160
virtual bool __eq__(const Basic &o) const;
161-
virtual std::size_t __hash__() const;
161+
virtual hash_t __hash__() const;
162162
};
163163

164164
}

symengine_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
253bf6b393cdb6207551dd1525ec6ba0cc4ab5eb
1+
v0.2.0

0 commit comments

Comments
 (0)