diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index ffef437..e5c1b6f 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -8,7 +8,7 @@ yum install -y cmake3 gsl-devel zlib-devel ln -fs /usr/bin/cmake3 /usr/bin/cmake -ALL_PYTHON="cp37-cp37m cp38-cp38" +ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38" # Compile wheels for pkg in $ALL_PYTHON; do diff --git a/builder/start.sh b/builder/start.sh index 31f95f0..9fbc185 100755 --- a/builder/start.sh +++ b/builder/start.sh @@ -9,4 +9,4 @@ if ! [ -e ${d}/setup.py ] ; then exit 1 fi -podman run -ti --rm -e PLAT=manylinux2014_x86_64 -v ${d}:/io:Z quay.io/pypa/manylinux2014_x86_64 /io/builder/build-wheels.sh +podman run -ti --rm -e PLAT=manylinux2010_x86_64 -v ${d}:/io:Z quay.io/pypa/manylinux2010_x86_64 /io/builder/build-wheels.sh diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index 61ba1a0..ed9195e 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -513,7 +513,8 @@ def writeGadget(str filename, object simulation): simdata.TotalNumPart = NumPart simdata.NumPart = NumPart - cxx_writeGadget(filename, &simdata) + filename_b = bytes(filename, 'utf-8') + cxx_writeGadget(filename_b, &simdata) def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = False, bool loadPosition = True, bool loadVelocity = False, bool loadId = False, bool loadMass = False): """ loadRamses(basepath, snapshot_id, cpu_id, doublePrecision = False, loadPosition = True, loadVelocity = False) diff --git a/python/cosmotool/simu.py b/python/cosmotool/simu.py index 2389926..157e107 100644 --- a/python/cosmotool/simu.py +++ b/python/cosmotool/simu.py @@ -98,12 +98,12 @@ def simpleWriteGadget(filename, positions, boxsize=1.0, Hubble=100, Omega_M=0.30 s.positions = positions - if velocities: + if velocities is not None: s.velocities = velocities else: s.velocities = [np.zeros(positions[0].size,dtype=np.float32)]*3 - if identifiers: + if identifiers is not None: s.identifiers = identifiers else: s.identifiers = np.arange(positions[0].size, dtype=np.int64)