Cross-compiling with Py03 (and docker)

Hi guys, I'm trying to cross compile a python module generated with Py03 from Linux to Windows using Cross. I made a custom docker file (since the standard ones don't have Python).

FROM japaric/x86_64-pc-windows-gnu

RUN sed -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list  && \
        sed -e 's/security.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list    && \   
        apt-get update -y && \
        apt-get install python python3 python3-dev libpython3-dev gcc-multilib -y

However when I try to build I always run into an issue with '-lpythonXY' not being found.

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/dllcrt2.o" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o" "-L" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.175j96pezim55naw.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.17g0wpkir3f6tcis.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1hphuiwuk5fg0e4l.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1mz4bmddyv25qbhd.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1qe4vkbupiukccw4.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1rmfbm42crc1hie.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1sngerf8y0bjdomu.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1w02c2i613jmh2b3.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.21epokdkx7sp6b43.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.24cefahwm8mej388.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.253zg73vdg5rizff.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2989qetoci43r7wa.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2dtmy4bgdvh2ocsf.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2gqpja9w8ex8yuzk.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2hj4lsbmndp27hya.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2i75z39teyuc1weq.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2ie6mb9b2np66414.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2tz94tu8hu5ehr62.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2vjtsamf5ijeribi.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2vx0ccciesllendb.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2vy93zjjii8ubfgt.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2w0ipm8ikw7933db.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.2zjqr2rp1rf35vu2.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.30k4vywy4m8qotcq.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.31i5kt058jmua3vq.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.32q4wyaoxraxus5a.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.38qhkldeu3fvwb4x.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3hekko47nj4eve6h.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3qatk7fmjbj5ph.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3qqhiw7rflge99ks.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3tfjio1x091hha9v.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3twrze22qu0kdidi.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.3w8cpir4am1xpcv4.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.41pf08y29mszc769.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.41zimddokclzt4aj.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.44vnem30c3y61rc9.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.46quu367b1ewbtur.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4ce3b84dmxjjet30.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4h1hxdq80uo7fcbc.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4ifwzkuj77qgknvz.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4kh9wl1dplobtli0.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4kuufusy88paitt0.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4nsjmmzx9o16z7de.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4s46qzwa1mqsj0vm.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4tvu2qfl5lzg0imt.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.4w0obxcxugvj1npx.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.5acr3of8qhqddh08.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.5dkq1gsb63q3rf9y.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.5dzpb08zfdmuv1p5.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.5jbmvkg7yc08124.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.96ozn88i52onuad.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.c8ni3coao9oxt3i.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.e4sqa0c0cfqxmm9.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.fsghithd3j7j73b.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.hr4qa0owlralugw.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.mzvm70ox8b4u0zj.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.xb6yulqiim2a0ff.rcgu.o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.z4mi1ochni0ysjd.rcgu.o" "-o" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.dll" "-Wl,--version-script=/tmp/rustcec42XW/list" "/target/x86_64-pc-windows-gnu/debug/deps/rusty.1qzgswi52t69ivoq.rcgu.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/target/x86_64-pc-windows-gnu/debug/deps" "-L" "/target/debug/deps" "-L" "/cargo/registry/src/github.com-1ecc6299db9ec823/winapi-x86_64-pc-windows-gnu-0.4.0/lib" "-L" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib" "-Wl,-Bstatic" "/target/x86_64-pc-windows-gnu/debug/deps/libpyo3-17cc6635d80c1ec3.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libspin-f5e078d75cfc28a3.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libinventory-572fc5b8c155b0ae.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libmashup-562837bf60445957.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libproc_macro_hack-9c45c87e08668995.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnoise-7176f5a2908ea843.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/librand-2de5e1ed604aca1f.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/librand-7732c6e0df7038a7.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libwinapi-4746ec64ebab27fd.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libimage-6742f6cffd0e6871.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libscoped_threadpool-56afb8c0c0a61008.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libgif-2aeb547b4a4e19d8.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libcolor_quant-bd78eb8fb14b9a74.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/liblzw-3ee751ad2bf7c616.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libjpeg_decoder-ec1ca3cdcc62f008.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/librayon-c9b4cb2d48f39acf.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libeither-601b944e98172229.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/librayon_core-2357db7ae9656eba.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_cpus-36f7058235851940.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/liblibc-d26f2f346272f39c.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libcrossbeam_deque-8386a13dce76f464.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libcrossbeam_epoch-5decac8251508569.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libscopeguard-9f426225aa4b2d17.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libmemoffset-25e26393af045feb.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/liblazy_static-0ca4b7673e6e10a1.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libcrossbeam_utils-2c856857fabce9f0.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libcfg_if-708bfa3edd13a518.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libarrayvec-45075d587a7723b7.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnodrop-7c49f8f9b945c1ae.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libpng-ca7e3bce3e9e8e83.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libdeflate-3451f383b49fdaaa.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libinflate-8566a45812ad399b.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libadler32-cc5fa20e77ba3510.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libbitflags-3805d16e45fd3388.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libenum_primitive-be13b89c9aecd2dc.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_traits-1efb2f3209b451ad.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_rational-3bccf6d5dcd09a64.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_iter-39c6a8000917163e.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_integer-82f891326fe85326.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libnum_traits-ea71645e0b1f867e.rlib" "/target/x86_64-pc-windows-gnu/debug/deps/libbyteorder-7568b2c9570bffcd.rlib" "-Wl,--start-group" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libstd-060902919c67e31f.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libpanic_unwind-d0bc47b232ea8ee2.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libbacktrace_sys-42071d2c281aead1.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libunwind-2fb83540665644b0.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_demangle-707f611e0a8292f0.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/liblibc-5b239997cd5bcae5.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc-b08b819192b9c5b2.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_std_workspace_core-2dc182dc453aaafd.rlib" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libcore-1c0912a2d1c80f65.rlib" "-Wl,--end-group" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/libcompiler_builtins-0c141d58c3e34716.rlib" "-Wl,-Bdynamic" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lpythonXY" "-lwinapi_advapi32" "-lwinapi_credui" "-lwinapi_kernel32" "-lwinapi_secur32" "-ladvapi32" "-lws2_32" "-luserenv" "-Wl,-Bstatic" "-lgcc_eh" "-lpthread" "-shared" "-Wl,-Bdynamic" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-lmsvcrt" "-luser32" "-lkernel32" "/rust/lib/rustlib/x86_64-pc-windows-gnu/lib/rsend.o"
  = note: /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          /usr/bin/x86_64-w64-mingw32-ld: cannot find -lpythonXY
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

I couldn't find any references to Python(x, y) in the Py03 docs. And it looks like there aren't any packages for Ubuntu Zesty (the ones the cross guys use), so I'm kind of stuck. Am I missing something else? Is this error really about that library?

dgrunwald is doing this:
compile with rustc -l dylib=pythonXY:python27
(He did the original that Pyo3 is a fork of I believe)

as found here:

Hope this helps!

Thanks for the idea, but unfortunately it doesn't seem to help. Looks like it doesn't work because my crate isn't the one linking to PythonXY.

$ cross rustc --target x86_64-pc-windows-gnu -- -l dylib=pythonXY:python34 --verbose
+ "rustup" "target" "list"
+ "cargo" "fetch" "--manifest-path" "/home/januz/projects/code_rusty/rusty/Cargo.toml"
+ "rustc" "--print" "sysroot"
+ "docker" "run" "--userns" "host" "--rm" "--user" "1000:1000" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=januz" "-e" "XARGO_HOME=/xargo" "-v" "/home/januz/.xargo:/xargo" "-v" "/home/januz/.cargo:/cargo" "-v" "/home/januz/projects/code_rusty/rusty:/project:ro" "-v" "/home/januz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:ro" "-v" "/home/januz/projects/code_rusty/rusty/target:/target" "-w" "/project" "-it" "januz/win_python" "sh" "-c" "PATH=$PATH:/rust/bin \"cargo\" \"rustc\" \"--target\" \"x86_64-pc-windows-gnu\" \"--\" \"-l\" \"dylib=pythonXY:python34\" \"--verbose\""
   Compiling rusty v0.1.0 (/project)
error: renaming of the library `pythonXY` was specified, however this crate contains no #[link(...)] attributes referencing this library.

error: aborting due to previous error

error: Could not compile `rusty`.