Skip to content

Commit 129420e

Browse files
committed
Require recent development version of libdiffpy.
1 parent a3cb751 commit 129420e

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ before_install:
6161
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage
6262
- $NOMC || conda config --add channels diffpy
6363

64+
# FIXME - remove after libdiffpy release 1.3.3
65+
- $NOMC || conda config --add channels pavoljuhas/channel/dev
66+
6467
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
6568
- $NOAPT || sudo apt-get update -qq
6669
- $NOAPT || sudo apt-get install -y

conda-recipe/meta.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ requirements:
2020
- python
2121
- setuptools
2222
- numpy 1.9.2
23-
- libdiffpy >=1.3.2,1.3.*
23+
# FIXME - adjust for libdiffpy 1.3.3
24+
- libdiffpy >=1.3.2.post24
2425
- pycifrw
2526
- diffpy.structure
2627
- scons
@@ -29,7 +30,8 @@ requirements:
2930
- python
3031
- setuptools
3132
- numpy >=1.9.2
32-
- libdiffpy >=1.3.2,1.3.*
33+
# FIXME - adjust for libdiffpy 1.3.3
34+
- libdiffpy >=1.3.2.post24
3335
- pycifrw
3436
- diffpy.structure
3537
- pyobjcryst 2.0*

srrealmodule/srreal_converters.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
#include <diffpy/srreal/QuantityType.hpp>
3535
#include <diffpy/version.hpp>
3636

37-
#if DIFFPY_VERSION < 1003002000
38-
#error "diffpy.srreal requires libdiffpy 1.3.2 or later."
37+
// FIXME - adjust for libdiffpy 1.3.3
38+
#if DIFFPY_VERSION < 1003002024
39+
#error "diffpy.srreal requires libdiffpy 1.3.2.post24 or later."
3940
#endif
4041

4142
/// Conversion function that supports implicit conversions in

srrealmodule/wrap_PairQuantity.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,8 @@ std::string stringevaluatortype(PQEvaluatorType tp)
359359
return evtp_BASIC;
360360
case OPTIMIZED:
361361
return evtp_OPTIMIZED;
362-
#if DIFFPY_VERSION >= 1003002023
363362
case CHECK:
364363
return evtp_CHECK;
365-
#endif
366364
}
367365
const char* emsg = "Unknown internal value of PQEvaluatorType.";
368366
PyErr_SetString(PyExc_NotImplementedError, emsg);
@@ -381,15 +379,10 @@ void setevaluatortype(PairQuantity& pq, const std::string& tp)
381379
{
382380
if (tp == evtp_BASIC) return pq.setEvaluatorType(BASIC);
383381
if (tp == evtp_OPTIMIZED) return pq.setEvaluatorType(OPTIMIZED);
384-
#if DIFFPY_VERSION >= 1003002023
385382
if (tp == evtp_CHECK) return pq.setEvaluatorType(CHECK);
386383
python::object emsg = ("evaluatortype must be one of %r." %
387384
python::make_tuple(python::make_tuple(
388385
evtp_BASIC, evtp_OPTIMIZED, evtp_CHECK)));
389-
#else
390-
python::object emsg = ("evaluatortype must be either %r or %r." %
391-
python::make_tuple(evtp_BASIC, evtp_OPTIMIZED));
392-
#endif
393386
PyErr_SetObject(PyExc_ValueError, emsg.ptr());
394387
throw_error_already_set();
395388
}

0 commit comments

Comments
 (0)